Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,11 @@ def text2text(input_text):
|
|
41 |
|
42 |
# Does not seem to care if it goes over 512... humm...
|
43 |
# To make it faster generate 100 tokens at a time
|
|
|
|
|
|
|
|
|
|
|
44 |
outputs = model.generate(input_ids, max_new_tokens=100, do_sample=True, temperature=0.7, top_p=0.8)
|
45 |
|
46 |
# Remove <pad> and </s> eof sequence tokens
|
|
|
41 |
|
42 |
# Does not seem to care if it goes over 512... humm...
|
43 |
# To make it faster generate 100 tokens at a time
|
44 |
+
# sampling mode.. don't greedily take the highest probability token every time. Helps it chat with some variation
|
45 |
+
# temperature.. how random should the sampling be.
|
46 |
+
# top_p Which set of tokens to sample from. Filters out some low probability tokens before smapling.
|
47 |
+
#
|
48 |
+
# input_ids should not be over 512 tokens. This method does not break over 512 tokens.. what is it doing?
|
49 |
outputs = model.generate(input_ids, max_new_tokens=100, do_sample=True, temperature=0.7, top_p=0.8)
|
50 |
|
51 |
# Remove <pad> and </s> eof sequence tokens
|