Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def respond(
|
|
104 |
|
105 |
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(torch.float16).to('cuda') # .to(accelerator.device)
|
106 |
input_ids2 = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, return_tensors="pt") #.to('cuda')
|
107 |
-
|
108 |
input_str= str(input_ids2)
|
109 |
print('input str = ', input_str)
|
110 |
## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Hello, how are you?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>
|
|
|
104 |
|
105 |
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(torch.float16).to('cuda') # .to(accelerator.device)
|
106 |
input_ids2 = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, return_tensors="pt") #.to('cuda')
|
107 |
+
print(f"Converted input_ids dtype: {input_ids.dtype}")
|
108 |
input_str= str(input_ids2)
|
109 |
print('input str = ', input_str)
|
110 |
## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Hello, how are you?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>
|