Instructions to use NoemaAI-labs/Noema-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NoemaAI-labs/Noema-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NoemaAI-labs/Noema-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NoemaAI-labs/Noema-2B") model = AutoModelForCausalLM.from_pretrained("NoemaAI-labs/Noema-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NoemaAI-labs/Noema-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NoemaAI-labs/Noema-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/Noema-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NoemaAI-labs/Noema-2B
- SGLang
How to use NoemaAI-labs/Noema-2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NoemaAI-labs/Noema-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/Noema-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NoemaAI-labs/Noema-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/Noema-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NoemaAI-labs/Noema-2B with Docker Model Runner:
docker model run hf.co/NoemaAI-labs/Noema-2B
Noema-2B
Noema-2B is a 2B-parameter reasoning model post-trained from
Qwen/Qwen3.5-2B (a hybrid
Gated-DeltaNet / softmax-attention backbone). It was produced by a small,
fully pre-registered, single-GPU post-training program ($120 of rented
A100 time) aimed at pushing a 2B model past its weight class on
reasoning, math, code, and instruction-following behavior — in
non-thinking mode, with fewer output tokens.
The defensible one-line summary:
Beats its weight class on reasoning / code / instruction-following behavior at roughly two-thirds the token cost of its predecessor; concedes some factual recall; and matches-or-ties a 9B reference model on 84% of a held-out set of 130 verifiable prompts.
A GGUF build (F16 + Q4_K_M / Q6_K / Q8_0) for llama.cpp and
compatible runtimes is published separately at
NoemaAI-labs/Noema-2B-GGUF.
Highlights
- Budget-robust reasoner. ~35% fewer completion tokens than the previous Noema checkpoint on GSM8K, and an accuracy@2048 / accuracy@4096 budget-robustness ratio of 95.7% (vs 82.4% for the base model) — it keeps its answers inside a fixed context budget far more reliably.
- Trained-in, not scaffolded. All gains are in the weights (LoRA on a frozen base, merged). No RAG, tools, or inference-time scaffolds.
- Honest scope. Every number below is non-thinking mode
(
enable_thinking=False), measured on a frozen, seed-pinned harness.
Benchmarks (non-thinking mode)
Measured on the project's frozen evaluation harness (transformers 5.12.1, bf16, A100-class hardware, seed 1234). Subsets are n=100–200 unless noted (±4–5 pt s.e.); MATH-500 and GSM8K are full/reserved sets.
| Task | Base Qwen3.5-2B | Noema-2B |
|---|---|---|
| GSM8K (k=1, sampled) | 79.2 | 82.5 |
| GSM8K (self-consistency @8) | 84.2 | 91.7 |
| MATH-500 (@2048 tokens) | 55.4 | 66.2 |
| IFEval-100 (strict) | 65 | 73 |
| BBH-100 | 66 | 65 |
| ARC-C-100 | 84 | 83 |
| MMLU-200 | 53.5 | 49.0 |
Read this honestly: the model wins clearly on the trained families (math, code, instruction-following) and on self-consistency headroom, is roughly flat on general reasoning (BBH/ARC-C), and regresses on factual recall (MMLU) — a real, measured knowledge tax, not a formatting artifact. See Limitations.
Modern standardized benchmarks (head-to-head vs base, same harness)
Run directly against the base model on current, widely-reported public benchmarks — EvalPlus for code, MMLU-Pro for broad knowledge — non-thinking, Q8_0 GGUF, identical harness and prompts, so every delta is clean. (These EvalPlus code numbers use the standard EvalPlus harness and are not directly comparable to the internal-harness panel above.)
| Benchmark | Base Qwen3.5-2B | Noema-2B | Δ |
|---|---|---|---|
| HumanEval | 39.0 | 53.7 | +14.7 |
| HumanEval+ | 36.0 | 50.0 | +14.0 |
| MBPP | 60.6 | 63.5 | +2.9 |
| MBPP+ | 48.4 | 50.0 | +1.6 |
| MMLU-Pro (5-shot CoT) | 52.9 | 51.1 | −1.8 |
Code is where the post-training shows — Noema beats base on all four EvalPlus code metrics, headlined by a +14-point HumanEval(+) jump, while broad-knowledge MMLU-Pro stays essentially flat (−1.8). A clean demonstration that the math/code/instruction training transfers to standard modern code benchmarks at only a small knowledge cost.
Intended use
General-purpose assistant and reasoning model at the 2B scale, with particular strength in:
- grade-school and competition math (GSM8K / MATH-style),
- short program synthesis (MBPP-style),
- following formatting / instruction constraints (IFEval-style),
especially in compute- or memory-constrained deployments where the lower token count (fewer decode steps, smaller KV-cache, reliable behavior under a fixed context budget) matters.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "NoemaAI-labs/Noema-2B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "A farmer has 17 red apples and 25 green apples. How many in total?"}]
inputs = tok.apply_chat_template(
messages,
add_generation_prompt=True,
enable_thinking=False, # Noema is tuned and evaluated in non-thinking mode
return_tensors="pt",
).to(model.device)
out = model.generate(inputs, max_new_tokens=512) # inherits the shipped sampling defaults (see below)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
This model uses the Qwen3.5 hybrid (Gated-DeltaNet) architecture. Use a
transformersversion that supportsmodel_type: qwen3_5_text(the release was produced with transformers 5.12.x).
Recommended sampling
The repo ships a generation_config.json with the settings Noema was
evaluated under (non-thinking regime): temperature 0.7, top_p 0.8,
top_k 20. On engines that support a presence penalty (vLLM, SGLang,
llama.cpp), additionally set presence_penalty 1.5 — the Qwen3.5
family recommendation.
- Do not use greedy decoding (
do_sample=False/ temperature 0): this model family is documented to enter repetition loops under greedy sampling. - Thinking mode is not supported. Noema is trained and evaluated non-thinking; at 2B the thinking mode is prone to non-terminating reasoning loops (a known trait of the base model, see its card). If you experiment with it anyway, use temperature 1.0 / top_p 0.95 / top_k 20 / presence_penalty 1.5 and enforce a hard thinking-token budget.
- Stopping:
eos_token_idis[248046 (<|im_end|>), 248044 (<|endoftext|>)]so chat turns terminate correctly under plainmodel.generate().
How it was made
LoRA-only post-training on a frozen Qwen/Qwen3.5-2B base, in this order:
- R1-style SFT — ~20k verified competition-math reasoning traces.
- Math GRPO — verifiable-reward RL (Open-RS style).
- Gap-distillation — 714 traces from a 9B teacher on the student's own failures, importing the teacher's length discipline.
- Multi-domain GRPO — five verifiable reward families to broaden and hold the gains.
Total budget ~$120 on a single rented A100-class GPU. Base weights were never unfrozen; all deltas were merged back to full weights for release.
Training data & attribution. SFT reasoning traces from OpenR1-Math-220k (Apache-2.0), filtered to verified-correct with Math-Verify; gap-distillation traces generated by Qwen/Qwen3.5-9B (Apache-2.0); RL prompt pools and reward checkers drawn from GSM8K (MIT), MATH, MBPP (CC-BY-4.0), IFEval (Apache-2.0), and BIG-Bench Hard (MIT). Training data was 8-gram decontaminated against the evaluation subsets.
Limitations
- Non-thinking mode only. All numbers are non-thinking, the model's trained regime. Thinking mode is not a target and degrades badly at this scale (the 2B is prone to reasoning loops that fail to terminate).
- Factual/knowledge recall trade. A small, honest knowledge cost vs base: MMLU-Pro −1.8, and older 57-subject MMLU ~−4.5. This is genuine recall loss traded for the math/code/instruction gains, most visible on knowledge-heavy sets.
- Small-subset variance. Several panel numbers are n=100–120 (±4–5 pt s.e.); the full-set results (GSM8K, MATH-500) are where the claims are anchored.
- Open-ended chat / creative writing quality is unmeasured.
- One architecture family (2B GDN hybrid), one base model — generality of the results beyond this setting is untested.
License
Released under Apache-2.0, inherited from the Qwen/Qwen3.5-2B base
model.
Citation
@misc{noema2b_2026,
title = {Noema-2B: Budget-Scale Post-Training of a 2B Hybrid-Attention Reasoner},
author = {NoemaAI-labs},
year = {2026},
howpublished = {\url{https://huggingface.co/NoemaAI-labs/Noema-2B}}
}
- Downloads last month
- 1,289