Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -29,11 +29,11 @@ def run_generation(user_text, use_assistant, temperature, max_new_tokens):
|
|
29 |
assistant_model=assistant_model if use_assistant else None,
|
30 |
streamer=streamer,
|
31 |
max_new_tokens=max_new_tokens,
|
32 |
-
min_new_tokens=max_new_tokens,
|
33 |
do_sample=do_sample,
|
34 |
top_p=0.95,
|
35 |
temperature=float(temperature),
|
36 |
top_k=50,
|
|
|
37 |
)
|
38 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
39 |
start = time.time()
|
|
|
29 |
assistant_model=assistant_model if use_assistant else None,
|
30 |
streamer=streamer,
|
31 |
max_new_tokens=max_new_tokens,
|
|
|
32 |
do_sample=do_sample,
|
33 |
top_p=0.95,
|
34 |
temperature=float(temperature),
|
35 |
top_k=50,
|
36 |
+
eos_token_id=-1, # ensures `max_new_tokens` new tokens are always generated, can't reach EOS
|
37 |
)
|
38 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
39 |
start = time.time()
|