Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
|
@@ -151,7 +151,7 @@ context = torch.tensor([enc.encode("Once upon a time there was a knight called B
|
|
| 151 |
|
| 152 |
# Test generation with a higher number of tokens and adjusted temperature
|
| 153 |
max_new_tokens = 150 # Increase the token limit for a longer generation
|
| 154 |
-
temperature = 0.
|
| 155 |
generated_text_idx = model.generate(context, max_new_tokens)
|
| 156 |
generated_text = enc.decode(generated_text_idx[0].tolist())
|
| 157 |
|
|
|
|
| 151 |
|
| 152 |
# Test generation with a higher number of tokens and adjusted temperature
|
| 153 |
max_new_tokens = 150 # Increase the token limit for a longer generation
|
| 154 |
+
temperature = 0.5 # More focused, less random
|
| 155 |
generated_text_idx = model.generate(context, max_new_tokens)
|
| 156 |
generated_text = enc.decode(generated_text_idx[0].tolist())
|
| 157 |
|