Norod78 commited on
Commit
8705a13
1 Parent(s): 75a15fb

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -25,8 +25,8 @@ You might also be interested in checking out Apple's [CoreNet Github page](https
25
  If you duplicate this space, make sure you have access to [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
26
  because this model uses it as a tokenizer.
27
 
28
- # Note: Use this model for only for completing sentences.
29
- ## While the user interface is of a chatbot for convenience, this is a base model and is not fine-tuned for chatbot tasks or instruction following tasks. As such, the model is not provided a chat history and will complete your text based on the last given prompt only.
30
  """
31
 
32
  LICENSE = """
@@ -77,7 +77,10 @@ def generate(
77
  top_k=top_k,
78
  temperature=temperature,
79
  num_beams=1,
 
80
  repetition_penalty=repetition_penalty,
 
 
81
  )
82
  t = Thread(target=model.generate, kwargs=generate_kwargs)
83
  t.start()
 
25
  If you duplicate this space, make sure you have access to [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
26
  because this model uses it as a tokenizer.
27
 
28
+ # Note: Use this model for only for completing sentences and instruction following.
29
+ ## While the user interface is a chatbot for convenience, this is an instruction tuned model not fine-tuned for chatbot tasks. As such, the model is not provided a chat history and will complete your text based on the last given prompt only.
30
  """
31
 
32
  LICENSE = """
 
77
  top_k=top_k,
78
  temperature=temperature,
79
  num_beams=1,
80
+ pad_token_id = tokenizer.eos_token_id,
81
  repetition_penalty=repetition_penalty,
82
+ no_repeat_ngram_size=5,
83
+ early_stopping=True,
84
  )
85
  t = Thread(target=model.generate, kwargs=generate_kwargs)
86
  t.start()