mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-19 20:57:54 +00:00
feat(options): add repeat_last_n
(#2660)
feat(options): add repeat_last_n Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
b783c811db
commit
a8bfb6f9c2
@ -886,6 +886,8 @@ struct llama_server_context
|
|||||||
{"task_id", slot->task_id},
|
{"task_id", slot->task_id},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
LOG_TEE("sampling: \n%s\n", llama_sampling_print(slot->sparams).c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,12 +142,14 @@ func gRPCPredictOpts(c config.BackendConfig, modelPath string) *pb.PredictOption
|
|||||||
MirostatTAU: float32(*c.LLMConfig.MirostatTAU),
|
MirostatTAU: float32(*c.LLMConfig.MirostatTAU),
|
||||||
Debug: *c.Debug,
|
Debug: *c.Debug,
|
||||||
StopPrompts: c.StopWords,
|
StopPrompts: c.StopWords,
|
||||||
Repeat: int32(c.RepeatPenalty),
|
Repeat: int32(c.RepeatLastN),
|
||||||
|
FrequencyPenalty: float32(c.FrequencyPenalty),
|
||||||
|
PresencePenalty: float32(c.PresencePenalty),
|
||||||
|
Penalty: float32(c.RepeatPenalty),
|
||||||
NKeep: int32(c.Keep),
|
NKeep: int32(c.Keep),
|
||||||
Batch: int32(c.Batch),
|
Batch: int32(c.Batch),
|
||||||
IgnoreEOS: c.IgnoreEOS,
|
IgnoreEOS: c.IgnoreEOS,
|
||||||
Seed: getSeed(c),
|
Seed: getSeed(c),
|
||||||
FrequencyPenalty: float32(c.FrequencyPenalty),
|
|
||||||
MLock: *c.MMlock,
|
MLock: *c.MMlock,
|
||||||
MMap: *c.MMap,
|
MMap: *c.MMap,
|
||||||
MainGPU: c.MainGPU,
|
MainGPU: c.MainGPU,
|
||||||
|
@ -25,7 +25,10 @@ type PredictionOptions struct {
|
|||||||
Batch int `json:"batch" yaml:"batch"`
|
Batch int `json:"batch" yaml:"batch"`
|
||||||
IgnoreEOS bool `json:"ignore_eos" yaml:"ignore_eos"`
|
IgnoreEOS bool `json:"ignore_eos" yaml:"ignore_eos"`
|
||||||
RepeatPenalty float64 `json:"repeat_penalty" yaml:"repeat_penalty"`
|
RepeatPenalty float64 `json:"repeat_penalty" yaml:"repeat_penalty"`
|
||||||
Keep int `json:"n_keep" yaml:"n_keep"`
|
|
||||||
|
RepeatLastN int `json:"repeat_last_n" yaml:"repeat_last_n"`
|
||||||
|
|
||||||
|
Keep int `json:"n_keep" yaml:"n_keep"`
|
||||||
|
|
||||||
FrequencyPenalty float64 `json:"frequency_penalty" yaml:"frequency_penalty"`
|
FrequencyPenalty float64 `json:"frequency_penalty" yaml:"frequency_penalty"`
|
||||||
PresencePenalty float64 `json:"presence_penalty" yaml:"presence_penalty"`
|
PresencePenalty float64 `json:"presence_penalty" yaml:"presence_penalty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user