mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 10:45:42 +01:00
Added max_new_tokens as a config option to llm yaml block (#1317)
* added max_new_tokens as a configuration option to the llm block in settings * Update fern/docs/pages/manual/settings.mdx Co-authored-by: lopagela <lpglm@orange.fr> * Update private_gpt/settings/settings.py Add default value for max_new_tokens = 256 Co-authored-by: lopagela <lpglm@orange.fr> * Addressed location of docs comment * reformatting from running 'make check' * remove default config value from settings.yaml --------- Co-authored-by: lopagela <lpglm@orange.fr>
This commit is contained in:
parent
baf29f06fa
commit
9c192ddd73
3 changed files with 20 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ class LLMComponent:
|
|||
self.llm = LlamaCPP(
|
||||
model_path=str(models_path / settings.local.llm_hf_model_file),
|
||||
temperature=0.1,
|
||||
max_new_tokens=settings.llm.max_new_tokens,
|
||||
# llama2 has a context window of 4096 tokens,
|
||||
# but we set it lower to allow for some wiggle room
|
||||
context_window=3900,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue