Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PredictOption ¶
type PredictOption func(p *PredictOptions)
func SetSeed ¶
func SetSeed(seed int) PredictOption
SetSeed sets the random seed for sampling text generation.
func SetTemperature ¶
func SetTemperature(temp float64) PredictOption
SetTemperature sets the temperature value for text generation.
func SetThreads ¶
func SetThreads(threads int) PredictOption
SetThreads sets the number of threads to use for text generation.
func SetTokens ¶
func SetTokens(tokens int) PredictOption
SetTokens sets the number of tokens to generate.
func SetTopP ¶
func SetTopP(topp float64) PredictOption
SetTopP sets the value for nucleus sampling.
type PredictOptions ¶
var DefaultOptions PredictOptions = PredictOptions{
Seed: -1,
Threads: 4,
Tokens: 200,
TopK: 40,
TopP: 0.90,
Temperature: 0.96,
Batch: 9,
}
func NewPredictOptions ¶
func NewPredictOptions(opts ...PredictOption) PredictOptions
Create a new PredictOptions object with the given options.
type Starcoder ¶
type Starcoder struct {
// contains filtered or unexported fields
}
func NewStarcoder ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.