Text Generation
Transformers
Safetensors
GGUF
English
granite
formal-logic
reasoning
lora
model-merging
wise-ft
reinforcement-learning
grpo
twil-lm
conversational
Instructions to use webAI-Official/TwIL-LM2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webAI-Official/TwIL-LM2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webAI-Official/TwIL-LM2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webAI-Official/TwIL-LM2") model = AutoModelForCausalLM.from_pretrained("webAI-Official/TwIL-LM2", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use webAI-Official/TwIL-LM2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf webAI-Official/TwIL-LM2:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf webAI-Official/TwIL-LM2:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM2:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf webAI-Official/TwIL-LM2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf webAI-Official/TwIL-LM2:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf webAI-Official/TwIL-LM2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf webAI-Official/TwIL-LM2:Q4_K_M
Use Docker
docker model run hf.co/webAI-Official/TwIL-LM2:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use webAI-Official/TwIL-LM2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webAI-Official/TwIL-LM2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webAI-Official/TwIL-LM2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webAI-Official/TwIL-LM2:Q4_K_M
- SGLang
How to use webAI-Official/TwIL-LM2 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 "webAI-Official/TwIL-LM2" \ --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": "webAI-Official/TwIL-LM2", "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 "webAI-Official/TwIL-LM2" \ --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": "webAI-Official/TwIL-LM2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use webAI-Official/TwIL-LM2 with Ollama:
ollama run hf.co/webAI-Official/TwIL-LM2:Q4_K_M
- Unsloth Desktop
- Pi
How to use webAI-Official/TwIL-LM2 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webAI-Official/TwIL-LM2:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "webAI-Official/TwIL-LM2:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use webAI-Official/TwIL-LM2 with Docker Model Runner:
docker model run hf.co/webAI-Official/TwIL-LM2:Q4_K_M
- Lemonade
How to use webAI-Official/TwIL-LM2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull webAI-Official/TwIL-LM2:Q4_K_M
Run and chat with the model
lemonade run user.TwIL-LM2-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use webAI-Official/TwIL-LM2 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webAI-Official/TwIL-LM2:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default webAI-Official/TwIL-LM2:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webAI-Official/TwIL-LM2 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf webAI-Official/TwIL-LM2:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "webAI-Official/TwIL-LM2:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Model card: compare against TwIL-LM3/LM2 and external models; drop internal lambda-checkpoint comparisons
Browse files
README.md
CHANGED
|
@@ -27,36 +27,41 @@ A 2.5B reasoning model for **formal logic** tasks, built from
|
|
| 27 |
through LoRA supervised fine-tuning, WiSE-FT weight interpolation (λ = 0.25) and entropy-weighted
|
| 28 |
GRPO reinforcement learning (MGPO, step 1400).
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
It also decodes **1.57x faster than TwIL-LM3** under
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## Highlights
|
| 41 |
|
| 42 |
-
* **
|
| 43 |
-
|
| 44 |
-
truncation (4.4% of its Track A rows hit the token cap), so
|
| 45 |
-
* **
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 51 |
* **Fast.** 21,369 decode tokens/s on one H100 in a controlled bench — 1.57x TwIL-LM3 and 1.22x the
|
| 52 |
SmolLM2-1.7B-based model — because Granite's architecture decodes quickly, not because it answers
|
| 53 |
short.
|
| 54 |
-
* **
|
| 55 |
-
|
| 56 |
* **Runs anywhere.** 2.53B parameters in bf16 (4.72 GiB), with a Q4\_K\_M GGUF at 1.44 GiB for CPU.
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
## Model Details
|
| 62 |
|
|
@@ -85,90 +90,118 @@ inherited from the base and was not evaluated for this card.
|
|
| 85 |
|
| 86 |
## Results
|
| 87 |
|
| 88 |
-
Every
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
* **λ = 0.5, step 800** — the arm's highest Track A gate, with weaker held-out results (not released);
|
| 94 |
-
* **TwIL-LM3** — [`webAI-Official/TwIL-LM3`](https://huggingface.co/webAI-Official/TwIL-LM3),
|
| 95 |
-
SmolLM3-3B, WiSE-FT λ = 0.25, MGPO step 2071;
|
| 96 |
-
* **TwIL-LM2 (SmolLM2-1.7B)** — the earlier, SmolLM2-1.7B-Instruct-based TwIL-LM2 (WiSE-FT
|
| 97 |
-
λ = 0.75, MGPO step 1680), using its published figures.
|
| 98 |
|
| 99 |
### Track A — in-domain formal logic
|
| 100 |
|
| 101 |
-
| lane / metric
|
| 102 |
-
|
|
| 103 |
-
| parameters
|
| 104 |
-
| `lean_formalize` token-F1
|
| 105 |
-
| `rule_induction` derivation | 0.3292
|
| 106 |
-
| `entailment_label` accuracy | 0.5300
|
| 107 |
-
| `mcq_answer` accuracy
|
| 108 |
-
| `semantic_parse` token-F1
|
| 109 |
-
| `lean_critic` accuracy
|
| 110 |
-
| `
|
| 111 |
-
| `
|
| 112 |
-
|
|
| 113 |
-
|
|
| 114 |
-
|
|
| 115 |
-
|
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
### Track B — held-out benchmarks
|
| 143 |
|
| 144 |
-
Nothing in this suite was trained on.
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
| dataset
|
| 148 |
-
|
|
| 149 |
-
| `gsm8k`
|
| 150 |
-
| `svamp`
|
| 151 |
-
| `gsm_symbolic`
|
| 152 |
-
| `arc_cot`
|
| 153 |
-
| `logicbench`
|
| 154 |
-
| `strategyqa`
|
| 155 |
-
| `drop`
|
| 156 |
-
| `csqa`
|
| 157 |
-
| `musr`
|
| 158 |
-
| `mmlu_redux`
|
| 159 |
-
|
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
|
| 173 |
### Speed
|
| 174 |
|
|
@@ -177,40 +210,18 @@ an actual speed comparison, each model ran alone on one idle H100 (vLLM 0.19.1,
|
|
| 177 |
transformers 5.15.0) over the same 128 prompts with `ignore_eos` and a hard 512-token cap, so every
|
| 178 |
model emitted exactly 65,536 output tokens.
|
| 179 |
|
| 180 |
-
| controlled decode bench
|
| 181 |
-
| ------------------------------- | -------------- | -------- | ----------------------- |
|
| 182 |
-
| decode tokens/s
|
| 183 |
-
| 512-token completions/s
|
| 184 |
-
| decode wall seconds (65,536 tok) | **3.07**
|
| 185 |
-
| relative to this model
|
| 186 |
|
| 187 |
-
|
| 188 |
-
the speed advantage comes from the architecture, not from a particular checkpoint. The shared
|
| 189 |
prompt file is Granite-templated, so prefill differs slightly by tokenizer (30.7K tokens for
|
| 190 |
Granite and SmolLM3, 38.2K for SmolLM2); it is a small share of the forced output and, if anything,
|
| 191 |
-
slightly handicaps the SmolLM2-based model.
|
| 192 |
-
|
| 193 |
-
### Choosing a checkpoint within the arm
|
| 194 |
-
|
| 195 |
-
All four evaluated λ = 0.25 checkpoints sit within 0.0006 of one another on Track B, so held-out
|
| 196 |
-
performance cannot separate them; the ordering comes from Track A and the probe.
|
| 197 |
-
|
| 198 |
-
| MGPO step | Track B R10 | Track A macro gate |
|
| 199 |
-
| --------- | ----------- | ------------------ |
|
| 200 |
-
| 300 | 0.6758 | 0.4114 |
|
| 201 |
-
| 1100 | 0.6764 | 0.4019 |
|
| 202 |
-
| **1400** | 0.6759 | **0.4178** |
|
| 203 |
-
| 1700 | 0.6761 | 0.4059 |
|
| 204 |
-
|
| 205 |
-
Step 1400 is the checkpoint chosen by probe Pass@1 and has the highest gate of the four.
|
| 206 |
-
|
| 207 |
-
### Where it sits in the wider Granite family
|
| 208 |
-
|
| 209 |
-
For context, an internal, **unreleased** Granite 4.1 3B MGPO checkpoint (fusion + WiSE-FT λ = 0.5,
|
| 210 |
-
step 600), scored on the same Track A and Track B protocol, reaches a macro gate of 0.5105,
|
| 211 |
-
strict-7 of 0.2886 and Track B R10 of 0.7761 — 9.3, 16.7 and 10.0 percentage points above this
|
| 212 |
-
model respectively. This model is the smaller, faster option; it is not the strongest Granite
|
| 213 |
-
checkpoint we have trained.
|
| 214 |
|
| 215 |
## Usage
|
| 216 |
|
|
@@ -286,28 +297,29 @@ Three stages on top of the base model:
|
|
| 286 |
SFT recipe.
|
| 287 |
2. **WiSE-FT interpolation** toward the pretrained base,
|
| 288 |
`W = (1 − λ)·W_base + λ·W_finetuned` with **λ = 0.25** — only a quarter of the fine-tuned delta
|
| 289 |
-
is retained.
|
| 290 |
-
|
| 291 |
-
held-out math.
|
| 292 |
3. **MGPO** — entropy-weighted GRPO reinforcement learning against a programmatic verifier, with
|
| 293 |
partial credit for loose matches and token-F1 so that all-fail prompt groups still produce
|
| 294 |
-
gradient. Published checkpoint is **step 1400**.
|
| 295 |
|
| 296 |
-
Unlike TwIL-LM3, there is no checkpoint-fusion stage between SFT and WiSE-FT in this
|
| 297 |
|
| 298 |
## Limitations and caveats
|
| 299 |
|
| 300 |
-
**
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
|
| 305 |
-
**
|
| 306 |
-
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
-
**
|
| 309 |
-
|
| 310 |
-
improved or regressed the base model on either track.
|
| 311 |
|
| 312 |
**Perplexity across tokenizers.** `lm_corpus` and `math_corpus` perplexity is a per-token quantity,
|
| 313 |
and the columns use different tokenizers (Granite and SmolLM2 have about 49K entries each but
|
|
@@ -315,15 +327,15 @@ distinct vocabularies; SmolLM3 has 128K). The perplexity rows are informative wi
|
|
| 315 |
only indicative across families.
|
| 316 |
|
| 317 |
**Result trees.** For Track B, TwIL-LM3 and the SmolLM2-1.7B-based model are scored from the
|
| 318 |
-
results tree that matches their published cards (rope-fixed), and
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
lane and a 2048-token cap.
|
| 322 |
|
| 323 |
-
**Truncation
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
|
|
|
| 327 |
|
| 328 |
**Scope.** Tuned for formal logic. The Track B suite reported here does not cover code generation
|
| 329 |
or tool use, and no claim is made about either. Granite's base tool-calling and document-grounded
|
|
@@ -343,7 +355,8 @@ evaluated.
|
|
| 343 |
backend. `musr` is the mean of the murder, object and team splits.
|
| 344 |
* Controlled decode bench: one idle H100 per model, 128 shared prompts, `ignore_eos`, hard 512-token
|
| 345 |
cap, engine initialisation excluded from the rate.
|
| 346 |
-
* All
|
|
|
|
| 347 |
|
| 348 |
Track B is sampled at 300 examples per dataset for compute reasons. Absolute scores can shift on
|
| 349 |
the full sets, but the comparative ordering across models is expected to be stable.
|
|
@@ -351,11 +364,11 @@ the full sets, but the comparative ordering across models is expected to be stab
|
|
| 351 |
## Relationship to TwIL-LM
|
| 352 |
|
| 353 |
**TwIL-LM3** ([`webAI-Official/TwIL-LM3`](https://huggingface.co/webAI-Official/TwIL-LM3)) is the
|
| 354 |
-
SmolLM3-3B-based member of the family. It is stronger on held-out benchmarks and on
|
| 355 |
-
this model
|
| 356 |
|
| 357 |
The name **TwIL-LM2** was previously used for a SmolLM2-1.7B-Instruct-based model. It is the
|
| 358 |
-
semantic-parsing specialist in the tables above, and the weakest of
|
| 359 |
benchmarks. This repository is a different model — Granite-based, 2.5B — that carries the TwIL-LM2
|
| 360 |
name; the SmolLM2-1.7B-based figures above are that model's published numbers, included as a
|
| 361 |
reference point and not as this model's results.
|
|
|
|
| 27 |
through LoRA supervised fine-tuning, WiSE-FT weight interpolation (λ = 0.25) and entropy-weighted
|
| 28 |
GRPO reinforcement learning (MGPO, step 1400).
|
| 29 |
|
| 30 |
+
On the in-domain macro gate it scores **0.4178** — fourth of the twelve models with a reported
|
| 31 |
+
gate, behind only TwIL-LM3 (0.4218), Qwen3-8B (0.5336) and Gemma-4-26B-A4B-it (0.6344). It is ahead
|
| 32 |
+
of the other eight, including LFM2.5-8B-A1B (0.3757), which has about three times its total
|
| 33 |
+
parameters, and Granite-4.1-3B (0.3435). It also decodes **1.57x faster than TwIL-LM3** under
|
| 34 |
+
identical forced work.
|
| 35 |
+
|
| 36 |
+
It is not a strong strict-output or general-benchmark model. Its strict-7 score (0.1214) ranks
|
| 37 |
+
eleventh of twelve, its `lean_critic` accuracy (0.3100) is the lowest of all thirteen models
|
| 38 |
+
compared, and its 10-dataset held-out macro (0.6759) is below every model of comparable size in the
|
| 39 |
+
comparison. No paired evaluation against its own base is included, so this card makes no claim
|
| 40 |
+
about what the fine-tune did to held-out capability. See [Results](#results) and
|
| 41 |
+
[Limitations](#limitations-and-caveats).
|
| 42 |
|
| 43 |
## Highlights
|
| 44 |
|
| 45 |
+
* **Fourth on the in-domain gate.** 0.4178 against 0.4218 for TwIL-LM3, 0.3927 for the
|
| 46 |
+
SmolLM2-1.7B-based TwIL-LM2 and 0.3757 for LFM2.5-8B-A1B. TwIL-LM3's figure is understated by
|
| 47 |
+
truncation (4.4% of its Track A rows hit the token cap), so read the gap to it as approximate.
|
| 48 |
+
* **Close to TwIL-LM3 at a smaller size.** 0.004 behind on the gate at 2.53B against 3.08B
|
| 49 |
+
parameters — about 18% fewer.
|
| 50 |
+
* **Formal-logic lanes where it is competitive.** `lean_formalize` token-F1 0.5159 is fourth of
|
| 51 |
+
thirteen, ahead of Qwen3-8B (0.4022), Gemma-4-26B-A4B-it (0.4107) and LFM2.5-8B-A1B (0.4655).
|
| 52 |
+
`rule_induction` 0.3292 is ahead of TwIL-LM3 (0.3192) and of Granite-4.1-3B (0.2476).
|
| 53 |
+
* **Lowest `lm_corpus` perplexity in the comparison** (1.9808), and third on `math_corpus`
|
| 54 |
+
(3.3073). Read these with the tokenizer caveat under [Limitations](#limitations-and-caveats).
|
| 55 |
* **Fast.** 21,369 decode tokens/s on one H100 in a controlled bench — 1.57x TwIL-LM3 and 1.22x the
|
| 56 |
SmolLM2-1.7B-based model — because Granite's architecture decodes quickly, not because it answers
|
| 57 |
short.
|
| 58 |
+
* **A cleaner measurement.** Only 0.9% of Track A generations hit the 2048-token cap, under the 2%
|
| 59 |
+
threshold our protocol requires to mark a comparison `rankable`.
|
| 60 |
* **Runs anywhere.** 2.53B parameters in bf16 (4.72 GiB), with a Q4\_K\_M GGUF at 1.44 GiB for CPU.
|
| 61 |
|
| 62 |
+
Where it is weak: strict-7 (0.1214, eleventh of twelve), strict MCQ accuracy (0.0000), `lean_critic`
|
| 63 |
+
(0.3100, last of thirteen), and held-out benchmarks (10-dataset macro 0.6759, eleventh of thirteen).
|
| 64 |
+
It is not a general assistant.
|
| 65 |
|
| 66 |
## Model Details
|
| 67 |
|
|
|
|
| 90 |
|
| 91 |
## Results
|
| 92 |
|
| 93 |
+
Every model below was scored through the same harness, prompts and decoding settings described
|
| 94 |
+
under [Evaluation protocol](#evaluation-protocol). The columns are this model; the two other TwIL
|
| 95 |
+
models — [TwIL-LM3](https://huggingface.co/webAI-Official/TwIL-LM3) (SmolLM3-3B) and the earlier,
|
| 96 |
+
SmolLM2-1.7B-Instruct-based TwIL-LM2 — with their published figures; the two SmolLM bases; and the
|
| 97 |
+
external models reported alongside them on those cards.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
### Track A — in-domain formal logic
|
| 100 |
|
| 101 |
+
| lane / metric | TwIL-LM2 (this model) | TwIL-LM3 | TwIL-LM2 (SmolLM2-1.7B) | SmolLM3-3B base | SmolLM2-1.7B base | LFM2.5-1.2B-Thinking | LFM2-2.6B | Llama-3.2-3B | Granite-4.1-3B | LFM2.5-8B-A1B | Qwen3-8B | Gemma-4-26B-A4B-it | gpt-oss-120b ‡ |
|
| 102 |
+
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 103 |
+
| parameters | 2.53B | 3.08B | 1.7B | 3.08B | 1.7B | 1.2B | 2.6B | 3B | 3B | 8B (1B active) | 8B | 26B (4B active) | 120B |
|
| 104 |
+
| `lean_formalize` token-F1 | 0.5159 | 0.5869 | 0.6199 | 0.4347 | 0.1087 | 0.1890 | 0.1321 | 0.3690 | 0.2652 | 0.4655 | 0.4022 | 0.4107 | **0.6306** |
|
| 105 |
+
| `rule_induction` derivation | 0.3292 | 0.3192 | 0.5136 | 0.1029 | 0.1350 | 0.0837 | 0.0615 | 0.0825 | 0.2476 | 0.1936 | 0.3680 | **0.7319** | 0.6518 |
|
| 106 |
+
| `entailment_label` accuracy | 0.5300 | 0.5750 | 0.5850 | 0.3750 | 0.2450 | 0.4700 | 0.4700 | 0.3300 | 0.4900 | 0.5400 | 0.5800 | 0.6200 | **0.7750** |
|
| 107 |
+
| `mcq_answer` accuracy | 0.0000 | 0.1100 | **0.1600** | 0.0000 | 0.0000 | 0.0000 | 0.0150 | 0.0000 | 0.0100 | 0.0750 | 0.0000 | 0.0200 | 0.0700 |
|
| 108 |
+
| `semantic_parse` token-F1 | 0.4013 | 0.4416 | **0.8428** | 0.4149 | 0.2155 | 0.4439 | 0.3665 | 0.3102 | 0.1953 | 0.3778 | 0.4257 | 0.4567 | 0.4331 |
|
| 109 |
+
| `lean_critic` accuracy | 0.3100 | 0.6600 | 0.5250 | 0.6500 | 0.4950 | 0.5450 | 0.5900 | 0.5300 | 0.5150 | 0.5500 | **0.7950** | 0.7500 | 0.5550 |
|
| 110 |
+
| `lm_corpus` perplexity ↓ | **1.9808** | 2.8972 | 2.2981 | 3.1818 | 2.5845 | 5.0065 | 4.3815 | 2.8478 | 2.4736 | 4.9472 | 2.5440 | 16.1145 | 912.23 § |
|
| 111 |
+
| `math_corpus` perplexity ↓ | 3.3073 | 3.8229 | **3.0390** | 4.0685 | 3.2670 | 7.7402 | 6.7472 | 4.7531 | 4.1162 | 8.3323 | 4.0083 | 59.7838 | 1045.63 § |
|
| 112 |
+
| average, 6 lanes | 0.3477 | 0.4488 | **0.5410** | 0.3296 | 0.1999 | 0.2886 | 0.2725 | 0.2703 | 0.2872 | 0.3670 | 0.4285 | 0.4982 | 0.5192 |
|
| 113 |
+
| **macro gate** | 0.4178 | 0.4218 | 0.3927 | 0.3466 † | 0.2590 † | 0.3067 | 0.3473 | 0.2925 | 0.3435 | 0.3757 | 0.5336 | **0.6344** | — |
|
| 114 |
+
| **strict-7** | 0.1214 | 0.1971 | **0.2386** | 0.1493 | 0.1071 | 0.1450 | 0.1579 | 0.1229 | 0.1507 | 0.1714 | 0.2093 | 0.2050 | — |
|
| 115 |
+
| macro\_primary | 0.4400 | 0.4475 | 0.3625 | 0.4075 | 0.2900 | 0.3625 | 0.4188 | 0.3450 | 0.3675 | 0.4213 | 0.5750 | **0.6100** | — |
|
| 116 |
+
|
| 117 |
+
† The base columns come from the external-comparison run rather than the paired base-versus-TwIL
|
| 118 |
+
run, hence SmolLM3-3B 0.3466 here against 0.3356 in its paired run and SmolLM2-1.7B 0.2590 against
|
| 119 |
+
0.2630. The paired run is the correct basis for an improvement claim.
|
| 120 |
+
|
| 121 |
+
‡ **gpt-oss-120b** runs MXFP4 weights at tensor-parallel 2 — quantized and multi-GPU, so it is not
|
| 122 |
+
directly comparable to the single-GPU bf16 columns. Its `procedural` lane and the loose-match
|
| 123 |
+
scorings were not collected, so its gate, strict-7 and macro\_primary cannot be computed; the —
|
| 124 |
+
cells mean that, not zero.
|
| 125 |
+
|
| 126 |
+
§ The 120B's perplexities are three orders of magnitude off every other model because its harmony
|
| 127 |
+
response format and tokenizer make the corpus lanes score a different quantity. They are reported
|
| 128 |
+
for completeness and excluded from the perplexity ranking.
|
| 129 |
+
|
| 130 |
+
Throughput and generation-length rows are left out of this table: the source cards report them
|
| 131 |
+
from different runs, so they cannot be put in one column. The controlled decode bench under
|
| 132 |
+
[Speed](#speed) is the like-for-like speed comparison. `average, 6 lanes`, `macro gate`,
|
| 133 |
+
`macro_primary` and `strict-7` are the harness aggregates defined on the
|
| 134 |
+
[TwIL-LM3 model card](https://huggingface.co/webAI-Official/TwIL-LM3); this card does not redefine
|
| 135 |
+
them. They are not interchangeable, and the ordering changes between them.
|
| 136 |
+
|
| 137 |
+
**Reading it.** Among the three TwIL models this is second on the gate — 0.4178, between 0.4218 for
|
| 138 |
+
TwIL-LM3 and 0.3927 for the SmolLM2-1.7B-based model — but it is well behind both on strict-7
|
| 139 |
+
(0.1214 against 0.1971 and 0.2386). The gate credits loose matches on some lanes and
|
| 140 |
+
strict-7 credits none, so the near-parity is on the gate, not on strict scoring.
|
| 141 |
+
|
| 142 |
+
Against the wider set it is fourth on the gate and on `macro_primary`, behind TwIL-LM3, Qwen3-8B
|
| 143 |
+
and Gemma-4-26B-A4B-it, and ahead of everything else with a reported gate. It is fourth of thirteen
|
| 144 |
+
on `lean_formalize`, fifth on `rule_induction` and seventh on `entailment_label`. It is eighth on
|
| 145 |
+
`semantic_parse` (0.4013, against 0.8428 for the SmolLM2-1.7B-based model) and last on
|
| 146 |
+
`lean_critic` (0.3100, against 0.6600 for TwIL-LM3 and 0.7950 for Qwen3-8B).
|
| 147 |
+
|
| 148 |
+
Strict MCQ accuracy is 0.0000. That is not unique to this model — Qwen3-8B, Llama-3.2-3B,
|
| 149 |
+
LFM2.5-1.2B-Thinking and both SmolLM bases also score 0.0000, because they answer the lane without
|
| 150 |
+
emitting the requested form — but it contributes to a strict-7 that is eleventh of twelve; only
|
| 151 |
+
SmolLM2-1.7B base (0.1071) is lower. On its Track A `procedural` lane it scores 0.0100 and on
|
| 152 |
+
`fol_translation` 0.0000.
|
| 153 |
+
|
| 154 |
+
It does not beat the two largest models with reported gates: Qwen3-8B leads it 0.5336 to 0.4178 and
|
| 155 |
+
Gemma-4-26B-A4B-it 0.6344 to 0.4178. Much of the Qwen gap is loose-match credit rather than
|
| 156 |
+
capability (Qwen3-8B answers MCQ correctly but almost never in the requested format), though Gemma
|
| 157 |
+
also genuinely leads on rule induction (0.7319), which no scoring convention explains away.
|
| 158 |
|
| 159 |
### Track B — held-out benchmarks
|
| 160 |
|
| 161 |
+
Nothing in this suite was trained on. All models are scored by the same aggregation over 300
|
| 162 |
+
randomly sampled, model-identical examples per dataset.
|
| 163 |
+
|
| 164 |
+
| dataset | TwIL-LM2 (this model) | TwIL-LM3 | TwIL-LM2 (SmolLM2-1.7B) | SmolLM3-3B base | SmolLM2-1.7B base | LFM2.5-1.2B-Thinking | LFM2-2.6B | Llama-3.2-3B | Granite-4.1-3B | LFM2.5-8B-A1B | Qwen3-8B | Gemma-4-26B-A4B-it | gpt-oss-120b ‡ |
|
| 165 |
+
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 166 |
+
| `gsm8k` | 0.7867 | 0.8733 | 0.4633 | 0.8833 | 0.4800 | 0.8400 | 0.8767 | 0.8300 | 0.9100 | 0.9133 | 0.9567 | 0.9733 | **0.9767** |
|
| 167 |
+
| `svamp` | 0.8200 | 0.8500 | 0.3833 | 0.8567 | 0.4867 | 0.9167 | 0.9000 | 0.8200 | 0.9000 | 0.9133 | 0.9367 | **0.9500** | 0.9400 |
|
| 168 |
+
| `gsm_symbolic` | 0.7233 | 0.7567 | 0.2600 | 0.7633 | 0.2200 | 0.6867 | 0.9767 | 0.8067 | 0.9533 | 0.9267 | 0.8133 | **0.9967** | 0.8467 |
|
| 169 |
+
| `arc_cot` | 0.7367 | 0.8467 | 0.5200 | 0.8400 | 0.5100 | 0.8300 | 0.8667 | 0.7967 | 0.8633 | 0.9033 | 0.9633 | **0.9767** | 0.9667 |
|
| 170 |
+
| `logicbench` | 0.6900 | 0.7167 | 0.5400 | 0.6467 | 0.5067 | 0.6700 | 0.6267 | 0.5733 | 0.7367 | 0.7200 | 0.8567 | **0.8667** | 0.8533 |
|
| 171 |
+
| `strategyqa` | 0.6933 | 0.6500 | 0.5900 | 0.6333 | 0.6000 | 0.5933 | 0.6433 | 0.6533 | 0.6333 | 0.6667 | 0.7400 | 0.7700 | **0.7867** |
|
| 172 |
+
| `drop` | 0.5833 | 0.7467 | 0.4367 | 0.7000 | 0.4233 | 0.6667 | 0.6900 | 0.6733 | 0.7600 | 0.6633 | **0.8833** | 0.7933 | 0.8500 |
|
| 173 |
+
| `csqa` | 0.6900 | 0.7367 | 0.4333 | 0.7067 | 0.3967 | 0.6100 | 0.7433 | 0.7500 | 0.7633 | 0.7700 | **0.8633** | **0.8633** | 0.8367 |
|
| 174 |
+
| `musr` | 0.4957 | 0.4957 | 0.3131 | 0.4997 | 0.4223 | 0.5227 | 0.4867 | 0.4932 | 0.5669 | 0.5703 | 0.6301 | 0.6369 | **0.6852** |
|
| 175 |
+
| `mmlu_redux` | 0.5400 | 0.6667 | 0.3933 | 0.6633 | 0.4100 | 0.6400 | 0.7133 | 0.6000 | 0.6800 | 0.8367 | 0.8500 | **0.9633** | 0.9467 |
|
| 176 |
+
| `ifeval` | — | 0.6433 | 0.4300 | 0.6767 | 0.4700 | 0.8233 | 0.7300 | 0.7167 | 0.7967 | **0.8900** | 0.8400 | 0.8733 | 0.7900 |
|
| 177 |
+
| `rudas_ood` | — | 0.0365 | 0.0289 | 0.0209 | 0.0128 | 0.0089 | 0.0017 | 0.0733 | 0.0355 | 0.0061 | 0.0468 | **0.1547** | 0.0000 ¶ |
|
| 178 |
+
| `bbh_logic` | — | 0.6633 | 0.2373 | 0.6667 | 0.2447 | 0.5327 | 0.5713 | 0.5333 | 0.7727 | 0.7700 | 0.6367 | 0.9940 | **0.9980** |
|
| 179 |
+
| `math500` | — | 0.6900 | 0.2100 | 0.7000 | 0.1900 | 0.6867 | 0.7133 | 0.4233 | 0.6067 | 0.7800 | 0.6100 | **0.9000** | 0.8433 |
|
| 180 |
+
| **macro (10 CoT datasets)** | 0.6759 | 0.7339 | 0.4333 | 0.7193 | 0.4456 | 0.6976 | 0.7523 | 0.6997 | 0.7767 | 0.7884 | 0.8493 | **0.8790** | 0.8689 |
|
| 181 |
+
| **macro (all 14)** | — | 0.6694 | 0.3742 | 0.6612 | 0.3838 | 0.6448 | 0.6814 | 0.6245 | 0.7127 | 0.7378 | 0.7591 | **0.8366** | 0.8086 |
|
| 182 |
+
|
| 183 |
+
‡ **gpt-oss-120b**: MXFP4 weights, tensor-parallel 2 — quantized and multi-GPU, so not directly
|
| 184 |
+
comparable to the single-GPU bf16 columns. ¶ 74% of its `rudas_ood` generations hit the length cap,
|
| 185 |
+
so that cell is a truncation artefact rather than a measured score and is excluded from the bolding.
|
| 186 |
+
|
| 187 |
+
The — cells for this model are lanes that were **not run** for this checkpoint (`ifeval`,
|
| 188 |
+
`rudas_ood`, `bbh_logic`, `math500`, and therefore the 14-dataset macro); no instruction-following
|
| 189 |
+
or 14-dataset result is claimed. Qwen3-8B `svamp` is 0.9367 as on the earlier TwIL-LM2 card; the
|
| 190 |
+
TwIL-LM3 card lists 0.9400, which does not reproduce that card's own Qwen3-8B macros.
|
| 191 |
+
|
| 192 |
+
**Reading it.** On the 10-dataset macro this model scores 0.6759, eleventh of thirteen. It is ahead
|
| 193 |
+
of only the two SmolLM2-1.7B entries (0.4333 and 0.4456) and behind every model of comparable
|
| 194 |
+
size: LFM2-2.6B (0.7523), SmolLM3-3B base (0.7193), Llama-3.2-3B (0.6997), LFM2.5-1.2B-Thinking
|
| 195 |
+
(0.6976) and Granite-4.1-3B (0.7767). TwIL-LM3, the strongest TwIL model here, scores 0.7339.
|
| 196 |
+
|
| 197 |
+
It is strongest on `strategyqa` (0.6933, fourth of thirteen, ahead of TwIL-LM3 at 0.6500, Llama-3.2-3B
|
| 198 |
+
and Granite-4.1-3B) and holds a mid-table position on `logicbench` (0.6900, seventh of thirteen). It
|
| 199 |
+
ranks eleventh of thirteen on `gsm8k` (0.7867), `arc_cot` (0.7367), `drop` (0.5833) and
|
| 200 |
+
`mmlu_redux` (0.5400).
|
| 201 |
+
|
| 202 |
+
The comparison that would say whether the fine-tune moved held-out performance is the one against
|
| 203 |
+
`granite-3.3-2b-instruct` itself, and it is not in this card. Granite-4.1-3B, in the tables above, is
|
| 204 |
+
a different and larger model, not this model's base.
|
| 205 |
|
| 206 |
### Speed
|
| 207 |
|
|
|
|
| 210 |
transformers 5.15.0) over the same 128 prompts with `ignore_eos` and a hard 512-token cap, so every
|
| 211 |
model emitted exactly 65,536 output tokens.
|
| 212 |
|
| 213 |
+
| controlled decode bench | **This model** | TwIL-LM3 | TwIL-LM2 (SmolLM2-1.7B) |
|
| 214 |
+
| -------------------------------- | -------------- | -------- | ----------------------- |
|
| 215 |
+
| decode tokens/s | **21,369** | 13,623 | 17,542 |
|
| 216 |
+
| 512-token completions/s | **41.7** | 26.6 | 34.2 |
|
| 217 |
+
| decode wall seconds (65,536 tok) | **3.07** | 4.81 | 3.74 |
|
| 218 |
+
| relative to this model | 1.00x | 0.64x | 0.82x |
|
| 219 |
|
| 220 |
+
Decode speed here is set by the architecture, not by anything the fine-tune changed. The shared
|
|
|
|
| 221 |
prompt file is Granite-templated, so prefill differs slightly by tokenizer (30.7K tokens for
|
| 222 |
Granite and SmolLM3, 38.2K for SmolLM2); it is a small share of the forced output and, if anything,
|
| 223 |
+
slightly handicaps the SmolLM2-based model. The other models in the tables above were not run in
|
| 224 |
+
this bench.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
|
| 226 |
## Usage
|
| 227 |
|
|
|
|
| 297 |
SFT recipe.
|
| 298 |
2. **WiSE-FT interpolation** toward the pretrained base,
|
| 299 |
`W = (1 − λ)·W_base + λ·W_finetuned` with **λ = 0.25** — only a quarter of the fine-tuned delta
|
| 300 |
+
is retained. λ was chosen to keep as much held-out capability as possible while still gaining
|
| 301 |
+
in-domain.
|
|
|
|
| 302 |
3. **MGPO** — entropy-weighted GRPO reinforcement learning against a programmatic verifier, with
|
| 303 |
partial credit for loose matches and token-F1 so that all-fail prompt groups still produce
|
| 304 |
+
gradient. Published checkpoint is **step 1400**, chosen by probe Pass@1.
|
| 305 |
|
| 306 |
+
Unlike TwIL-LM3, there is no checkpoint-fusion stage between SFT and WiSE-FT in this model.
|
| 307 |
|
| 308 |
## Limitations and caveats
|
| 309 |
|
| 310 |
+
**Held-out benchmarks.** The 10-dataset Track B macro is 0.6759, eleventh of thirteen and below
|
| 311 |
+
every model of comparable size in the table. No paired base-versus-tuned run is included, so this
|
| 312 |
+
card cannot say whether that is a regression from `granite-3.3-2b-instruct` or the base's level.
|
| 313 |
+
Four Track B lanes (`ifeval`, `rudas_ood`, `bbh_logic`, `math500`) were not run.
|
| 314 |
|
| 315 |
+
**Strict output form.** Strict MCQ accuracy is 0.0000, `procedural` accuracy 0.0100,
|
| 316 |
+
`fol_translation` primary score 0.0000 and strict-7 0.1214 (eleventh of twelve). The model reasons
|
| 317 |
+
near the required form without reliably emitting it. If you need exactly-formatted formal objects,
|
| 318 |
+
the SmolLM2-1.7B-based TwIL-LM2 (strict-7 0.2386, semantic parsing 0.8428) is the stronger option
|
| 319 |
+
in this comparison.
|
| 320 |
|
| 321 |
+
**Lean critique.** `lean_critic` accuracy is 0.3100, the lowest of the thirteen models compared and
|
| 322 |
+
well below TwIL-LM3 (0.6600).
|
|
|
|
| 323 |
|
| 324 |
**Perplexity across tokenizers.** `lm_corpus` and `math_corpus` perplexity is a per-token quantity,
|
| 325 |
and the columns use different tokenizers (Granite and SmolLM2 have about 49K entries each but
|
|
|
|
| 327 |
only indicative across families.
|
| 328 |
|
| 329 |
**Result trees.** For Track B, TwIL-LM3 and the SmolLM2-1.7B-based model are scored from the
|
| 330 |
+
results tree that matches their published cards (rope-fixed), and this model from the default tree,
|
| 331 |
+
with vLLM 0.19.1; the two TwIL macros reproduce their published values exactly (0.7339 and 0.4333).
|
| 332 |
+
Track A figures for this model come from GATE 2 reports at n = 200 per lane and a 2048-token cap.
|
|
|
|
| 333 |
|
| 334 |
+
**Truncation in the comparison.** At the 2048-token cap, TwIL-LM3 (4.4%), the SmolLM2-1.7B-based
|
| 335 |
+
TwIL-LM2 (6.9%), SmolLM3-3B base (17.4%) and SmolLM2-1.7B base (11.7%) are all above the 2%
|
| 336 |
+
threshold and formally `rankable: false`. A truncated response scores zero regardless of reasoning
|
| 337 |
+
quality, so their Track A figures are understated: wherever this model is ahead of them the true
|
| 338 |
+
margin is smaller, and wherever it is behind, the true deficit is larger.
|
| 339 |
|
| 340 |
**Scope.** Tuned for formal logic. The Track B suite reported here does not cover code generation
|
| 341 |
or tool use, and no claim is made about either. Granite's base tool-calling and document-grounded
|
|
|
|
| 355 |
backend. `musr` is the mean of the murder, object and team splits.
|
| 356 |
* Controlled decode bench: one idle H100 per model, 128 shared prompts, `ignore_eos`, hard 512-token
|
| 357 |
cap, engine initialisation excluded from the rate.
|
| 358 |
+
* All models are scored on the same sampled rows within each track. The TwIL and external-model
|
| 359 |
+
figures are those published on the TwIL-LM3 and earlier TwIL-LM2 cards.
|
| 360 |
|
| 361 |
Track B is sampled at 300 examples per dataset for compute reasons. Absolute scores can shift on
|
| 362 |
the full sets, but the comparative ordering across models is expected to be stable.
|
|
|
|
| 364 |
## Relationship to TwIL-LM
|
| 365 |
|
| 366 |
**TwIL-LM3** ([`webAI-Official/TwIL-LM3`](https://huggingface.co/webAI-Official/TwIL-LM3)) is the
|
| 367 |
+
SmolLM3-3B-based member of the family. It is stronger on held-out benchmarks, on strict-7 and on
|
| 368 |
+
`lean_critic`; this model is 0.004 behind it on the gate at a smaller size and decodes 1.57x faster.
|
| 369 |
|
| 370 |
The name **TwIL-LM2** was previously used for a SmolLM2-1.7B-Instruct-based model. It is the
|
| 371 |
+
semantic-parsing specialist in the tables above, and the weakest of the TwIL models on held-out
|
| 372 |
benchmarks. This repository is a different model — Granite-based, 2.5B — that carries the TwIL-LM2
|
| 373 |
name; the SmolLM2-1.7B-based figures above are that model's published numbers, included as a
|
| 374 |
reference point and not as this model's results.
|