Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenerateOptions ¶
type GenerateOptions struct {
NumKeep int `json:"num_keep"` //: 5,
Seed int `json:"seed"` //: 42,
NumPredit int `json:"num_predict"` //: 100,
TopK int `json:"top_k"` //: 20,
TopP float32 `json:"top_p"` //: 0.9,
TfsZ float32 `json:"tfs_z"` //: 0.5,
TypicalP float32 `json:"typical_p"` //: 0.7,
RepeatLastN int `json:"repeat_last_n"` //: 33,
Temperature float32 `json:"temperature"` //: 0.8,
RepeatPenalty float32 `json:"repeat_penalty"` //: 1.2,
PresencePenalty float32 `json:"presence_penalty"` //: 1.5,
FrequencyPenalty float32 `json:"frequency_penalty"` //: 1.0,
Mirostat float32 `json:"mirostat"` //: 1,
MirostatTau float32 `json:"mirostat_tau"` //: 0.8,
MirostatEta float32 `json:"mirostat_eta"` //: 0.6,
PenalizeNewline bool `json:"penalize_newline"` //: true,
Stop []string `json:"stop"` //: ["\n", "user:"],
Numa bool `json:"numa"` //: false,
NumCtx int `json:"num_ctx"` //: 1024,
NumBatch int `json:"num_batch"` //: 2,
NumGpu int `json:"num_gpu"` //: 1,
MainGpu int `json:"main_gpu"` //: 0,
LowVram bool `json:"low_vram"` //: false,
F16KV bool `json:"f16_kv"` //: true,
VocabOnly bool `json:"vocab_only"` //: false,
UseMMAP bool `json:"use_mmap"` //: true,
UseMLock bool `json:"use_mlock"` //: false,
NumThread int `json:"num_thread"` //: 8
}
type GenerateRequest ¶
type GenerateResponse ¶
type GenerateResponse struct {
Error string `json:"error,omitempty"`
Model string `json:"model"`
Response string `json:"response"`
Done bool `json:"done"`
DoneReason string `json:"done_reason"`
CreateAt time.Time `json:"created_at"` // "2024-07-22T11:34:39.896275469Z"
TotalDuration time.Duration `json:"total_duration,omitempty"` //16537307773
LoadDuration time.Duration `json:"load_duration,omitempty"` //14068211
PromptEvalCount int64 `json:"prompt_eval_count,omitempty"` //9
PromptEvalDuration time.Duration `json:"prompt_eval_duration,omitempty"` //195979000
EvalCount int64 `json:"eval_count,omitempty"` //97
EvalDuration time.Duration `json:"eval_duration,omitempty"` //16281091000
Context []int `json:"-"` // context: [32010,3750,338,278,...,6575,4366,1213,13,29913]
}
Click to show internal directories.
Click to hide internal directories.