Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func (*Executor) StartInference ¶
func (e *Executor) StartInference(config InferenceConfig) (<-chan string, error)
type InferenceConfig ¶
type InferenceConfig struct {
ModelPath string `json:"model_path"`
Prompt string `json:"prompt"`
SystemPrompt string `json:"system_prompt"`
Temperature float64 `json:"temperature"` // 0.0 to 2.0
TopP float64 `json:"top_p"` // 0.0 to 1.0
TopK int `json:"top_k"` // 0 to 100
RepeatPenalty float64 `json:"repeat_penalty"` // 1.0 to 2.0
MaxTokens int `json:"max_tokens"` // -1 for infinite
Threads int `json:"threads"` // number of CPU threads
}
InferenceConfig holds parameters for text generation
func DefaultConfig ¶
func DefaultConfig() InferenceConfig
type ServerRequest ¶
type ServerResponse ¶
Click to show internal directories.
Click to hide internal directories.