Spaces:
Sleeping
Sleeping
0.8 fixed wrong device
Browse files
app.py
CHANGED
@@ -136,7 +136,7 @@ def generate_both(system_prompt, input_text, chatbot_a, chatbot_b, max_new_token
|
|
136 |
if "Pharia" in model_id_b:
|
137 |
logging.debug("model b is Pharia based, applying own template")
|
138 |
formatted_message_b = apply_chat_template(new_messages_a, add_generation_prompt=True)
|
139 |
-
input_ids_b = tokenizer_b(formatted_message_b, return_tensors="pt").input_ids.to(
|
140 |
else:
|
141 |
input_ids_b = tokenizer_b.apply_chat_template(
|
142 |
new_messages_b,
|
|
|
136 |
if "Pharia" in model_id_b:
|
137 |
logging.debug("model b is Pharia based, applying own template")
|
138 |
formatted_message_b = apply_chat_template(new_messages_a, add_generation_prompt=True)
|
139 |
+
input_ids_b = tokenizer_b(formatted_message_b, return_tensors="pt").input_ids.to(model_b.device)
|
140 |
else:
|
141 |
input_ids_b = tokenizer_b.apply_chat_template(
|
142 |
new_messages_b,
|