nicholascao
commited on
Commit
·
65473cb
1
Parent(s):
ea8ce86
Docs: update README.md
Browse files
README.md
CHANGED
@@ -45,7 +45,7 @@ model = AutoModelForCausalLM.from_pretrained('nicholascao/chatbloom-1b7-sft').ha
|
|
45 |
inputs = tokenizer('<Human>:Hello<Assistant>:', return_tensors='pt').to(torch.cuda.current_device())
|
46 |
model.to(torch.cuda.current_device())
|
47 |
|
48 |
-
output = model.generate(**inputs, max_length=
|
49 |
output = tokenizer.decode(output[0], skip_special_tokens=True)
|
50 |
print(output)
|
51 |
```
|
|
|
45 |
inputs = tokenizer('<Human>:Hello<Assistant>:', return_tensors='pt').to(torch.cuda.current_device())
|
46 |
model.to(torch.cuda.current_device())
|
47 |
|
48 |
+
output = model.generate(**inputs, max_length=1024, do_sample=True, temperature=0.8, top_k=50, early_stopping=True, repetition_penalty=1.05)
|
49 |
output = tokenizer.decode(output[0], skip_special_tokens=True)
|
50 |
print(output)
|
51 |
```
|