sandz7 commited on
Commit
89477ee
Β·
1 Parent(s): e4851f5

tuned the parameters for generation

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -43,7 +43,10 @@ def llama_generation(input_text: str,
43
 
44
  # llama generation looks for the numeric vectors not the tensors so there is no need for **input_ids rather just input_ids
45
  output_ids = llama_model.generate(input_ids=input_ids,
46
- max_new_tokens=256)
 
 
 
47
 
48
  # Decode
49
  output_text = llama_tokenizer.decode(output_ids[0],
 
43
 
44
  # llama generation looks for the numeric vectors not the tensors so there is no need for **input_ids rather just input_ids
45
  output_ids = llama_model.generate(input_ids=input_ids,
46
+ max_new_tokens=256,
47
+ temperature=0.7,
48
+ top_p=0.9,
49
+ repetition_penalty=2.0)
50
 
51
  # Decode
52
  output_text = llama_tokenizer.decode(output_ids[0],