Aleksandr Maiorov commited on
Commit
58d7ca2
·
1 Parent(s): 13d6e67

- правка в настройках модели

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,12 +42,12 @@ llm = LlamaCPP(
42
  temperature=0.1,
43
  max_new_tokens=256,
44
  # llama2 has a context window of 4096 tokens, but we set it lower to allow for some wiggle room
45
- context_window=16384,
46
  # kwargs to pass to __call__()
47
  generate_kwargs={},
48
  # kwargs to pass to __init__()
49
  # set to at least 1 to use GPU
50
- model_kwargs={"n_gpu_layers": -1},
51
  # transform inputs into Llama2 format
52
  messages_to_prompt=messages_to_prompt,
53
  completion_to_prompt=completion_to_prompt,
 
42
  temperature=0.1,
43
  max_new_tokens=256,
44
  # llama2 has a context window of 4096 tokens, but we set it lower to allow for some wiggle room
45
+ context_window=2046,
46
  # kwargs to pass to __call__()
47
  generate_kwargs={},
48
  # kwargs to pass to __init__()
49
  # set to at least 1 to use GPU
50
+ model_kwargs={"n_gpu_layers": -1, "num_return_sequences": 1, "no_repeat_ngram_size": 2, "n_threads": 2},
51
  # transform inputs into Llama2 format
52
  messages_to_prompt=messages_to_prompt,
53
  completion_to_prompt=completion_to_prompt,