Run the models
Prompt format and sampling
Chat template, thinking and non-thinking modes, and the sampling and output limits each model card recommends.
On this page
Use the embedded chat template
Every repository ships the model's chat template: chat_template.jinja beside the Transformers and MLX weights, and embedded in each GGUF file. Let your runtime apply it instead of writing prompt markup by hand: apply_chat_template in Transformers, --jinja in llama.cpp, and the chat endpoints of llama.cpp and vLLM.
- End-of-sequence token:
<|im_end|>. Padding token:<|endoftext|>. - Text in, text out. The base model's vision encoder is not included.
Thinking and non-thinking
Noema 1.5 4B thinks by default and switches through the chat template. Noema 1.5 2B is recommended without thinking for instructions, structured output and code. Noema 2B was trained and evaluated without thinking.
| Model | Modes | Context |
|---|---|---|
| Noema 1.5 4B | Thinking (default) · non-thinking, selected through the chat template | 262,144 tokens (architecture limit); outputs evaluated to 81,920 |
| Noema 1.5 2B | Non-thinking (recommended) · thinking | 262,144 tokens (architecture limit); independently validated to 24,576 |
| Noema 2B | Non-thinking (trained and evaluated); thinking mode is not supported | 262,144 tokens (architecture limit) |
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
enable_thinking=False,
return_dict=True,
return_tensors="pt",
)Read the answer
With thinking on, the reasoning trace comes first and ends at </think>; the answer follows. Split on the last </think>, or let vLLM's qwen3 reasoning parser return the two separately.
reasoning, _, answer = text.rpartition("</think>")
print(answer.strip())In multi-turn use, keep only the final answers in the conversation history. The Noema 1.5 4B chat template already drops earlier reasoning traces. In the Noema app, Reasoning history controls this for supported GGUF models.
Sampling for Noema 1.5 4B
| Use | Thinking | Temperature | Top-p | Top-k | Presence penalty | Output limit |
|---|---|---|---|---|---|---|
| General reasoning (recommended default) | On | 0.6 | 0.95 | 20 | 0 | 32,768 |
| Competition math and programming (Deep only) | On | 0.6 | 0.95 | 20 | 0 | 81,920 |
| Qwen's general thinking preset | On | 1.0 | 0.95 | 20 | 1.5 | 32,768 |
| Direct answers, chat and structured output | Off | 0.7 | 0.8 | 20 | 1.5 | 8,192 to 16,384 |
Thinking is on by default; pass enable_thinking=False to the chat template to answer directly. Avoid greedy decoding with thinking on, which makes repetition more likely in any reasoning model. In multi-turn use, keep only final answers in the history.
Sampling for Noema 1.5 2B
| Use | Thinking | Temperature | Top-p | Top-k | Presence penalty | Output limit |
|---|---|---|---|---|---|---|
| Instructions, structured output and code (recommended) | Off | 0 (greedy) | 1 | Off | 0 | Set a limit |
| Harder reasoning | On | 1.0 | 0.95 | 20 | 1.5 | Set a limit |
The packaged defaults are greedy and stop at <|im_end|>. Deployments should enforce output limits and detect repeated spans, especially with thinking on.
Sampling for Noema 2B
| Use | Thinking | Temperature | Top-p | Top-k | Presence penalty | Output limit |
|---|---|---|---|---|---|---|
| Non-thinking (trained and evaluated) | Off | 0.7 | 0.8 | 20 | 1.5 | Set a limit |
Do not use greedy decoding: this model family can enter repetition loops under greedy sampling. The presence penalty applies on engines that support it, such as vLLM and llama.cpp.