question: setting reasoning effort
#66
by
TheBigBlockPC
- opened
how can i set the reasoning effort of the LLM
is it compatible with TextIteratorStreamer
Harmony is simply a chat format, so yes
@TheBigBlockPC found in their cookbook:
messages = [
{"role": "system", "content": "Always respond in riddles"},
{"role": "user", "content": "Explain why the meaning of life is 42", "reasoning_effort": "high"},
]
For some reason following their cookbook like this
messages = [
{"role": "system", "content": "Always respond in riddles"},
{"role": "user", "content": "Explain why the meaning of life is 42", "reasoning_effort": "high"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to(model.device)
didn't work
Changing it to
messages = [
{"role": "system", "content": "Always respond in riddles"},
{"role": "user", "content": "Explain why the meaning of life is 42"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
reasoning_effort="high"
).to(model.device)
worked for me