Marvinmw commited on
Commit
9b61756
·
verified ·
1 Parent(s): 41c281b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -94,15 +94,15 @@ text = "YOUR INPUT"
94
  inputs = tokenizer(text, return_tensors="pt").to(device)
95
 
96
  # Generate text
 
97
  generated_outputs = model.generate(
98
  input_ids=inputs['input_ids'],
99
  attention_mask=inputs['attention_mask'],
100
  max_length=1024,
101
  do_sample=True,
102
- temperature=0.7,
103
- top_p=0.95,
104
- top_k=50,
105
- repetition_penalty=1.2,
106
  eos_token_id=tokenizer.eos_token_id,
107
  )
108
 
 
94
  inputs = tokenizer(text, return_tensors="pt").to(device)
95
 
96
  # Generate text
97
+ # You can change the generation config
98
  generated_outputs = model.generate(
99
  input_ids=inputs['input_ids'],
100
  attention_mask=inputs['attention_mask'],
101
  max_length=1024,
102
  do_sample=True,
103
+ temperature=0.2,
104
+ top_p=0.9,
105
+ repetition_penalty=1.1,
 
106
  eos_token_id=tokenizer.eos_token_id,
107
  )
108