Model response concatenated
#4
by
inuwamobarak
- opened
Why is the response concatenated like this:
# Define the input prompt
chat = [
{
"role": "user",
"content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location."
},
]
# Tokenize input
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
# Generate model output
output = model.generate(**input_tokens, max_new_tokens=100)
# Decode and print the response
response = tokenizer.batch_decode(output, skip_special_tokens=True)
print(response)
RESPONSE:
userPlease list one IBM Research laboratory located in the United States. You should only output its name and location.
assistant1. IBM Research - Austin, Texas
Why is there no space between the user or assistant and the string?