Text Generation
Transformers
Safetensors
GGUF
English
granite
granite-4.2
twil
reasoning
math
code
instruction-following
reinforcement-learning
grpo
conversational
Instructions to use webAI-Official/TwIL-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webAI-Official/TwIL-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webAI-Official/TwIL-8B") 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-8B") model = AutoModelForCausalLM.from_pretrained("webAI-Official/TwIL-8B", 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-8B 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-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-8B: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-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-8B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf webAI-Official/TwIL-8B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf webAI-Official/TwIL-8B:Q4_K_M
Use Docker
docker model run hf.co/webAI-Official/TwIL-8B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use webAI-Official/TwIL-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webAI-Official/TwIL-8B" # 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-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webAI-Official/TwIL-8B:Q4_K_M
- SGLang
How to use webAI-Official/TwIL-8B 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-8B" \ --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-8B", "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-8B" \ --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-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use webAI-Official/TwIL-8B with Ollama:
ollama run hf.co/webAI-Official/TwIL-8B:Q4_K_M
- Unsloth Desktop
- Pi
How to use webAI-Official/TwIL-8B 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-8B: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-8B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use webAI-Official/TwIL-8B with Docker Model Runner:
docker model run hf.co/webAI-Official/TwIL-8B:Q4_K_M
- Lemonade
How to use webAI-Official/TwIL-8B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull webAI-Official/TwIL-8B:Q4_K_M
Run and chat with the model
lemonade run user.TwIL-8B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use webAI-Official/TwIL-8B 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-8B: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-8B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webAI-Official/TwIL-8B 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-8B: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-8B: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"
|
Download README.md from webAI-Official/TwIL-8B: direct link, hf CLI and curl.
- Browser
- Download file 21.4 kB
-
https://huggingface.co/webAI-Official/TwIL-8B/resolve/main/README.md
- Command line
-
hf download hf://webAI-Official/TwIL-8B/README.md
-
curl -L -o README.md https://huggingface.co/webAI-Official/TwIL-8B/resolve/main/README.md
21.4 kB
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| base_model: ibm-granite/granite-4.2-8b | |
| license: other | |
| license_name: webai-non-commercial-license-ver.-1.0 | |
| license_link: https://huggingface.co/webAI-Official/TwIL-8B/blob/main/LICENSE.md | |
| tags: | |
| - granite | |
| - granite-4.2 | |
| - twil | |
| - reasoning | |
| - math | |
| - code | |
| - instruction-following | |
| - reinforcement-learning | |
| - grpo | |
| - gguf | |
| # TwIL-8B | |
| An 8.8B reasoning model for **math, code and instruction following**, post-trained from | |
| [`ibm-granite/granite-4.2-8b`](https://huggingface.co/ibm-granite/granite-4.2-8b) with | |
| full-parameter supervised fine-tuning and GRPO/DAPO reinforcement learning. It ships in two | |
| variants that share one architecture and tokenizer: **balanced** (the default) and **verbose**. | |
| See [Variants](#variants). | |
| Against open models of similar size and up to 3.5x larger, TwIL-8B posts the highest MATH-500 | |
| (98.2) and LiveCodeBench (81.6 β ) scores in the comparison and leads Qwen3.5-9B on IFBench | |
| (+9.9 β ). It is level with Qwen3.5-9B on contest math while using fewer tokens per problem. It | |
| trails on knowledge-heavy benchmarks: GPQA Diamond, MMLU-Pro β and HLE β . | |
|  | |
| *TwIL-8B scores are for the balanced variant. β marks benchmarks measured on the verbose variant, | |
| which have not yet been run on balanced. Competitor scores are published figures and were not | |
| re-run; see [Evaluation protocol](#evaluation-protocol).* | |
| ## Highlights | |
| * **Highest MATH-500 and AIME 2025 in the comparison.** MATH-500 98.2 against 96.6 for | |
| Qwen3.5-9B and 87.9 for Gemma 4 31B; AIME 2025 88.3 against 87.1 for Gemma 4 31B. | |
| * **Best LiveCodeBench in the group.** 81.6 β against 80.0 for Gemma 4 31B, 72.0 for Gemma 4 12B | |
| and 65.6 for Qwen3.5-9B (+16.0). It is within 2.9β6.2 points of GPT-5.5, Claude Opus 4.8 and | |
| Grok 4.3. | |
| * **Strong instruction following.** IFBench 74.4 β is 9.9 points above Qwen3.5-9B, level with | |
| Gemma 4 12B (74.0) and 1.6 behind Gemma 4 31B. It is also 12.2 points above Claude Opus 4.8 | |
| and 1.5 behind GPT-5.5. IFEval 91.8 is level with Qwen3.5-9B (91.5). | |
| * **Level with Qwen3.5-9B on contest math, ahead of Gemma 4 12B.** Across the four contests both | |
| publish, the averages are within 0.4 points. TwIL-8B leads on HMMT Nov 2025 (+3.8) and HMMT | |
| Feb 2025 (+1.8) and trails on AIME 2026 (β4.2) and HMMT Feb 2026 (β3.0). On AIME 2026 it is | |
| 10.8 points above Gemma 4 12B and within 1 point of Gemma 4 31B. | |
| * **Fewer tokens per problem.** About 19.5k output tokens per AIME 2026 problem against 31.2k | |
| for Qwen3.5-9B (38% fewer), and 32.9k against 40.6k on HMMT Feb 2026 (19% fewer). It also | |
| uses fewer tokens than Claude Opus 4.8 on AIME 2026 (21.0k), though at lower accuracy. | |
| * **88β93% of the frontier on reasoning.** It reaches 93% of the best frontier score on | |
| LiveCodeBench β , 92% on IFBench β , 90% on HMMT Nov 2025 and 88% on AIME 2026 and HMMT Feb 2025. | |
| HMMT Feb 2026 is the exception, at 69%. | |
| * **Runs locally.** 8.79B parameters in bf16 (16.38 GiB), with a 4.98 GiB Q4_K_M GGUF for CPU or | |
| modest-VRAM GPUs. | |
| It is **not** a knowledge model. GPQA Diamond (70.2) trails Qwen3.5-9B by 11.5 and Gemma 4 31B | |
| by 14.1, and MMLU-Pro β and HLE β follow the same pattern. It also remains verbose next to the | |
| frontier: GPT-5.5 solves AIME 2026 with about 5k tokens per problem. There is no safety or | |
| preference tuning beyond what Granite 4.2 carries. See [Limitations](#limitations-and-caveats). | |
| ## Model Details | |
| | Property | Value | | |
| | --- | --- | | |
| | Model ID | `webAI-Official/TwIL-8B` | | |
| | Base model | [`ibm-granite/granite-4.2-8b`](https://huggingface.co/ibm-granite/granite-4.2-8b) | | |
| | Total parameters | 8.79B (8,791,592,960) | | |
| | Architecture | Granite decoder-only dense transformer (`GraniteForCausalLM`); 40 layers, hidden size 4096, 32 attention heads / 8 KV heads | | |
| | Input / output | Text / text | | |
| | Language | English | | |
| | Tokenizer vocabulary size | 100,352 | | |
| | Context window | 131,072 tokens (inherited from the base model) | | |
| | Variants | `balanced` (default, repository root) and `verbose` (`verbose/` folder) | | |
| | Checkpoint precision | bfloat16 (16.38 GiB per variant), plus GGUF builds | | |
| | Post-training | Full-parameter SFT β GRPO/DAPO RL (verbose) β length-aware RL (balanced) | | |
| | Reasoning format | Emits a `<think> β¦ </think>` block before the answer (default chat template) | | |
| | Evaluated decoding | High-effort pass@1, thinking enabled | | |
| | Specialisation | Contest math, code and instruction following | | |
| | License | webAI Non-Commercial License ver. 1.0 (base model: Apache License 2.0, IBM) | | |
| ### Variants | |
| Both variants use the same architecture, tokenizer, chat template and generation config. They | |
| differ only in how much they reason before answering. | |
| | Variant | Safetensors | GGUF | Use it for | | |
| | --- | --- | --- | --- | | |
| | **balanced** (default) | `model-balanced.safetensors` (repository root) | `TwIL-8B-Q4_K_M-balanced.gguf` | General use. Shorter reasoning traces and a lower cost per answer. | | |
| | **verbose** | `verbose/model-verbose.safetensors` | `TwIL-8B-F16-verbose.gguf`, `TwIL-8B-Q8_0-verbose.gguf`, `TwIL-8B-Q4_K_M-verbose.gguf` | Hard contest-style problems where accuracy matters more than token cost. Longer reasoning traces. | | |
| `from_pretrained("webAI-Official/TwIL-8B")` loads **balanced**. Pass `subfolder="verbose"` to | |
| load **verbose** (see [Usage](#usage)). | |
| ## Benchmarks | |
| ### Against open peers | |
| | Benchmark | **TwIL-8B** (8.8B) | Qwen3.5-9B (9.7B) | Gemma 4 12B (12B) | Gemma 4 31B (31B) | | |
| | --- | ---: | ---: | ---: | ---: | | |
| | ***Math*** | | | | | | |
| | MATH-500 | **98.2** | 96.6 | β | 87.9 | | |
| | AIME 2025 | **88.3** | β | β | 87.1 | | |
| | AIME 2026 | 88.3 | **92.5** | 77.5 | 89.2 | | |
| | HMMT Feb 2025 | 85.0 | 83.2 | β | **88.7** | | |
| | HMMT Feb 2026 | 68.2 | 71.2 | β | **77.2** | | |
| | HMMT Nov 2025 | 86.7 | 82.9 | β | **87.5** | | |
| | ***Science & knowledge*** | | | | | | |
| | GPQA Diamond | 70.2 | 81.7 | 78.8 | **84.3** | | |
| | MMLU-Pro β | 76.5 | 82.5 | 77.2 | **85.2** | | |
| | HLE β | 12.6 | 14.9 | 5.2 | **19.5** | | |
| | ***Instruction following*** | | | | | | |
| | IFEval | 91.8 | 91.5 | 97.2 | **98.9** | | |
| | IFBench β | 74.4 | 64.5 | 74.0 | **76.0** | | |
| | ***Code*** | | | | | | |
| | LiveCodeBench β | **81.6** | 65.6 | 72.0 | 80.0 | | |
| | HumanEval β | 93.2 | 93.9 | β | **94.5** | | |
| | HumanEval+ β | 88.3 | 87.2 | β | **91.5** | | |
| | MBPP β | 93.7 | β | β | β | | |
| | MBPP+ β | 79.1 | β | β | β | | |
| | CRUXEval β | 97.1 | β | β | β | | |
| β Measured on the verbose variant; not yet run on balanced. β means no published result could be | |
| found. Bold marks the best score in each row where at least two models report one. All scores are | |
| percentages. | |
| TwIL-8B leads three rows outright (MATH-500, AIME 2025 and LiveCodeBench β ). It is the strongest | |
| model here at its own size on code and instruction following: against Qwen3.5-9B it is ahead on | |
| LiveCodeBench β by 16.0 and IFBench β by 9.9, and the two are level on IFEval, HumanEval β and | |
| HumanEval+ β . Contest math is close to even with Qwen3.5-9B (two contests each way), and ahead of | |
| Gemma 4 12B by 10.8 on the one contest it publishes. | |
| Gemma 4 31B, at about 3.5x the parameters, leads most remaining rows. TwIL-8B is ahead of it on | |
| MATH-500, AIME 2025 and LiveCodeBench β , within one point on AIME 2026 and HMMT Nov 2025, and | |
| behind on knowledge, instruction following and the hardest contest set (HMMT Feb 2026, β9.0). | |
| MBPP β , MBPP+ β and CRUXEval β have no comparable published competitor numbers. | |
| Notes on the competitor figures: | |
| * Gemma 4 31B's HMMT scores were measured by the Qwen team (Qwen3.6-27B model card), not by Google. | |
| Its MATH-500 (87.9) and AIME 2025 come from Red Hat's lighteval runs of the unquantized model; | |
| the MATH-500 figure is unusually low and may reflect answer extraction. | |
| * Google's IFEval figures for Gemma 4 (97.2 and 98.9) do not state the metric variant. Red Hat | |
| measured 94.6 prompt-level strict for Gemma 4 31B. | |
| * HumanEval and HumanEval+ comparators are community runs. The Gemma 4 31B run used a 512-token | |
| cap, which leaves no room for thinking. The Qwen3.5-9B run had thinking enabled. | |
| * Competitor LiveCodeBench scores are v6. Qwen3.5-9B's AIME 2026 and HMMT Feb 2026 scores are from | |
| MathArena; its only public AIME 2025 results are non-thinking runs and are excluded. | |
| ### Against frontier models | |
| GPT-5.5, Claude Opus 4.8 and Grok 4.3 at their highest published reasoning effort. The last column | |
| is TwIL-8B's score as a share of the best frontier score on that row. | |
| | Benchmark | **TwIL-8B** | GPT-5.5 (xhigh) | Claude Opus 4.8 (max) | Grok 4.3 (high) | Share of best frontier | | |
| | --- | ---: | ---: | ---: | ---: | ---: | | |
| | AIME 2026 | 88.3 | 100.0 | 100.0 | β | 88% | | |
| | HMMT Feb 2025 | 85.0 | 96.5 | 96.5 | β | 88% | | |
| | HMMT Feb 2026 | 68.2 | 98.5 | 95.5 | β | 69% | | |
| | HMMT Nov 2025 | 86.7 | 96.5 | 96.5 | β | 90% | | |
| | GPQA Diamond | 70.2 | 93.6 | 93.6 | 90.1 | 75% | | |
| | MMLU-Pro β | 76.5 | 88.1 | 89.6 | 85.8 | 85% | | |
| | HLE β | 12.6 | 45.8 | 48.7 | 37.2 | 26% | | |
| | IFBench β | 74.4 | 75.9 | 62.2 | 81.3 | 92% | | |
| | LiveCodeBench β | 81.6 | 85.3 | 87.8 | 84.5 | 93% | | |
| TwIL-8B is closest to the frontier on **instruction following and code**. It beats Claude Opus 4.8 | |
| on IFBench β by 12.2 points and is within 2.9β6.2 points of all three models on LiveCodeBench β . | |
| Contest math lands at 88β90% of the frontier, with HMMT Feb 2026, the hardest set, as the outlier | |
| at 69%. **Knowledge is the largest gap**: GPQA Diamond trails by about 20β23 points and HLE β by 25β36. | |
| These benchmarks reward stored knowledge, which tends to scale with parameter count more than with | |
| reasoning-focused training. | |
| These three are the most recent frontier releases with measured results on this benchmark set. | |
| Newer releases (GPT-6.1 Sol, Claude Opus 5.5 and Grok 4.7) no longer report AIME, HMMT or GPQA. | |
| Their only measured overlap is Artificial Analysis HLE: 52.9, 61.4 and 43.1 respectively. | |
| ### Head-to-head | |
| Averages are taken only over benchmarks where both models have a score, so the benchmark count | |
| differs by row and the averages are not comparable across rows. | |
| | Opponent | Shared benchmarks | Winsβlosses | Shared average (TwIL-8B vs opponent) | TwIL-8B leads on | TwIL-8B trails on | | |
| | --- | ---: | :---: | :---: | --- | --- | | |
| | Qwen3.5-9B | 13 | 7β6 | 78.1 vs 77.6 | LiveCodeBench β +16.0, IFBench β +9.9, HMMT Nov 2025 +3.8, HMMT Feb 2025 +1.8, MATH-500 +1.6 | GPQA Diamond β11.5, MMLU-Pro β β6.0, AIME 2026 β4.2, HMMT Feb 2026 β3.0 | | |
| | Gemma 4 12B | 7 | 4β3 | 70.8 vs 68.8 | AIME 2026 +10.8, LiveCodeBench β +9.6, HLE β +7.4 | GPQA Diamond β8.6, IFEval β5.4 | | |
| | Gemma 4 31B | 14 | 3β11 | 78.8 vs 82.0 | MATH-500 +10.3, LiveCodeBench β +1.6, AIME 2025 +1.2 | GPQA Diamond β14.1, HMMT Feb 2026 β9.0, MMLU-Pro β β8.7, IFEval β7.1 | | |
| | GPT-5.5 | 9 | 0β9 | 71.5 vs 86.7 | β | HLE β β33.2, HMMT Feb 2026 β30.3, GPQA Diamond β23.4 | | |
| | Claude Opus 4.8 | 9 | 1β8 | 71.5 vs 85.6 | IFBench β +12.2 | HLE β β36.1, HMMT Feb 2026 β27.3, GPQA Diamond β23.4 | | |
| | Grok 4.3 | 5 | 0β5 | 63.1 vs 75.8 | β | HLE β β24.6, GPQA Diamond β19.9, MMLU-Pro β β9.3 | | |
| ### Tokens per problem | |
| Mean output tokens per problem, with accuracy. Competitor figures are from MathArena; frontier | |
| counts are rounded to the nearest 1k. | |
| | Contest | **TwIL-8B** | Qwen3.5-9B | Claude Opus 4.8 | GPT-5.5 | | |
| | --- | --- | --- | --- | --- | | |
| | AIME 2026 | **19.5k** Β· 88.3% | 31.2k Β· 92.5% | 21.0k Β· 100.0% | 5.0k Β· 100.0% | | |
| | HMMT Feb 2026 | **32.9k** Β· 68.2% | 40.6k Β· 71.2% | 30.0k Β· 95.5% | 8.0k Β· 98.5% | | |
| Against Qwen3.5-9B, the closest open peer by size, TwIL-8B uses 38% fewer tokens on AIME 2026 | |
| and 19% fewer on HMMT Feb 2026, for 4.2 and 3.0 fewer points respectively. GPT-5.5 remains far | |
| more token-efficient. Harnesses and tokenizers differ, so treat this comparison as directional. | |
| ## Usage | |
| ```python | |
| import torch | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_id = "webAI-Official/TwIL-8B" | |
| variant = None # balanced (default); use "verbose" for the verbose variant | |
| tok = AutoTokenizer.from_pretrained(model_id, subfolder=variant or "") | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, subfolder=variant or "", dtype=torch.bfloat16, device_map="auto" | |
| ) | |
| messages = [{"role": "user", "content": | |
| "How many positive integers n < 1000 are divisible by 3 but not by 5? " | |
| "Reason step by step, then give the final integer."}] | |
| inputs = tok.apply_chat_template( | |
| messages, add_generation_prompt=True, | |
| return_tensors="pt", return_dict=True, | |
| ).to(model.device) | |
| out = model.generate(**inputs, max_new_tokens=32768) | |
| print(tok.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)) | |
| ``` | |
| Use a Transformers release with Granite 4.2 support. `return_dict=True` matters on Transformers | |
| 5.x, where `apply_chat_template` returns a `BatchEncoding` rather than a bare tensor. | |
| The chat template opens a `<think>` block by default, so the model reasons before it answers. | |
| Give it a large generation budget: on contest math, balanced averages about 19.5k tokens per AIME | |
| 2026 problem and 33k per HMMT Feb 2026 problem, and verbose writes more. A short budget truncates | |
| the reasoning and scores far worse. The shipped `generation_config.json` samples with | |
| `temperature=1.0` and `top_p=0.95`. The template also accepts `enable_thinking=False` and | |
| `reasoning_effort="low"` through `chat_template_kwargs`. Both lower latency, but low-effort runs | |
| score substantially lower and none of the numbers on this card use them. | |
| To download a single variant: | |
| ```bash | |
| # balanced | |
| hf download webAI-Official/TwIL-8B --exclude "verbose/*" --exclude "*.gguf" --local-dir TwIL-8B-balanced | |
| # verbose | |
| hf download webAI-Official/TwIL-8B --include "verbose/*" --local-dir TwIL-8B | |
| ``` | |
| ### GGUF / llama.cpp | |
| | File | Variant | Quant | Size | | |
| | --- | --- | --- | --- | | |
| | `TwIL-8B-Q4_K_M-balanced.gguf` | balanced | Q4_K_M (importance matrix) | 4.98 GiB | | |
| | `TwIL-8B-Q4_K_M-verbose.gguf` | verbose | Q4_K_M | 4.98 GiB | | |
| | `TwIL-8B-Q8_0-verbose.gguf` | verbose | Q8_0 | 8.70 GiB | | |
| | `TwIL-8B-F16-verbose.gguf` | verbose | F16 | 16.38 GiB | | |
| ```bash | |
| llama-cli -hf webAI-Official/TwIL-8B --hf-file TwIL-8B-Q4_K_M-balanced.gguf -cnv -c 40960 -n 32768 | |
| ``` | |
| Name the file with `--hf-file`, because each quant exists for more than one variant. Keep the | |
| context and generation budget large for the same reason as above. The model uses a ChatML-style | |
| template with `<|im_end|>` as EOS. All scores on this card were measured on the bf16 weights, | |
| not on the GGUF builds, so expect small deviations, most likely at Q4_K_M. | |
| ## How it was built | |
| 1. **Supervised fine-tuning.** Full-parameter SFT of `ibm-granite/granite-4.2-8b` on reasoning | |
| traces covering math, STEM and instruction following. | |
| 2. **Reinforcement learning.** GRPO/DAPO RL on math, code, STEM and instruction-following | |
| prompts. This produces the **verbose** variant. | |
| 3. **Length-aware RL.** A further RL stage with a length-aware reward that favours shorter | |
| reasoning traces, measured against per-domain length references for math, code, STEM and | |
| instruction following. This produces the **balanced** variant. | |
| The math, STEM and instruction-following training pools were decontaminated with 13-gram matching | |
| against AIME (2025, 2026 and earlier years), HMMT Feb 2025 and Feb 2026, MATH-500, GPQA Diamond, | |
| MMLU-Pro, HLE, IFEval, IFBench and LiveCodeBench. Both variants ship as full merged models, not | |
| LoRA adapters. | |
| ## Limitations and caveats | |
| * **Knowledge.** GPQA Diamond, MMLU-Pro β and HLE β trail larger open models and the frontier by | |
| wide margins. | |
| * **Coverage.** Rows marked β were measured on the verbose variant and have not yet been run on | |
| balanced. SWE-bench, SuperGPQA, tool use and agentic tasks were not evaluated. | |
| * **Cross-harness comparisons.** Competitor numbers come from each vendor's model card or from | |
| third-party evaluations, with their own prompts, sampling and token budgets. The AIME and HMMT | |
| sets have 30β33 problems, so one problem is worth about 3 points and gaps of that size are | |
| within noise. | |
| * **HLE scoring.** TwIL-8B's HLE uses a multiple-choice scoring rule. Competitor HLE scores are | |
| text-only and judge-graded, so that comparison is approximate. | |
| * **LiveCodeBench version.** Competitor scores are v6. The version and date window of TwIL-8B's | |
| run are not recorded, so confirm them before quoting that gap. | |
| * **Contamination.** HMMT Nov 2025 and the HumanEval, MBPP and CRUXEval suites were not in the | |
| decontamination set, and decontamination of the code training data is not recorded. | |
| * **Token cost.** Even balanced spends about 19.5k tokens per AIME 2026 problem, roughly 4x | |
| GPT-5.5. | |
| * **Not a general assistant.** There is no additional safety, preference or tool-use training | |
| beyond what Granite 4.2 carries. | |
| ## Evaluation protocol | |
| * **TwIL-8B:** internal high-effort pass@1 with thinking enabled, on the same harness for every | |
| benchmark and both variants. Scores are shown as percentages (0.982 β 98.2). | |
| * **Competitors:** reproduced from the public sources below, accessed 3 November 2026. No | |
| competitor benchmark was re-run. Frontier models are at their highest published reasoning | |
| effort. Model-predicted estimates on aggregator sites are excluded. | |
| * **Naming:** "GPQA" means GPQA Diamond. AIME 2025 and AIME 2026 are the single-year sets. | |
| ## Relationship to TwIL-LM | |
| TwIL-8B belongs to the same webAI TwIL family as | |
| [TwIL-LM3](https://huggingface.co/webAI-Official/TwIL-LM3) and | |
| [TwIL-LM3-Pro](https://huggingface.co/webAI-Official/TwIL-LM3-Pro). Those are 3B formal-logic | |
| models; TwIL-8B targets contest math, code and instruction following at 8B, on IBM's Granite 4.2 | |
| 8B base. Like them, it ships as a full model on `main`, loaded directly with | |
| `AutoModelForCausalLM`. | |
| ## License and attribution | |
| Released under the **webAI Non-Commercial License ver. 1.0**; see `LICENSE.md` in this repository. | |
| The base model, [`ibm-granite/granite-4.2-8b`](https://huggingface.co/ibm-granite/granite-4.2-8b), | |
| is Copyright IBM Corporation and is distributed under the Apache License 2.0; its license text is | |
| retained as `apache-2.0-LICENSE.txt` and all credit for the base model goes to IBM. Apache 2.0 | |
| permits distributing derivative works under different terms provided attribution is preserved, | |
| which is what the pair of license files in this repository does. | |
| ## Sources | |
| Competitor figures on this card come from: | |
| * [Gemma 4 model card](https://ai.google.dev/gemma/docs/core/model_card_4) (Google, thinking mode): | |
| Gemma 4 12B and 31B AIME 2026, GPQA Diamond, MMLU-Pro, HLE and LiveCodeBench v6. | |
| * [Gemma 4 Technical Report, Table 5](https://arxiv.org/abs/2607.02770): Gemma 4 IFEval and IFBench. | |
| * [Qwen3.6-27B model card](https://huggingface.co/Qwen/Qwen3.6-27B), Gemma4-31B baseline column: | |
| Gemma 4 31B HMMT Feb 2025, Nov 2025 and Feb 2026. | |
| * [RedHatAI/gemma-4-31B-it-FP8-dynamic](https://huggingface.co/RedHatAI/gemma-4-31B-it-FP8-dynamic), | |
| BF16 baseline: Gemma 4 31B MATH-500 and AIME 2025. | |
| * [EvalPlus submission #300](https://github.com/evalplus/evalplus/issues/300): Gemma 4 31B HumanEval | |
| and HumanEval+. | |
| * [Qwen3.5-9B model card](https://huggingface.co/Qwen/Qwen3.5-9B) (thinking mode): GPQA Diamond, | |
| MMLU-Pro, IFEval, IFBench, HMMT Feb 2025, HMMT Nov 2025 and LiveCodeBench v6. | |
| * [MathArena, Qwen3.5-9B](https://matharena.ai/models/qwen_qwen3_5_9b): AIME 2026 and HMMT Feb 2026 | |
| accuracy and tokens per problem. | |
| * [SOTA2 MATH-500 leaderboard](https://www.sota2.com/research/sota/math-on-math-500-score): | |
| Qwen3.5-9B MATH-500. | |
| * [Artificial Analysis via OpenRouter, Qwen3.5 9B](https://openrouter.ai/qwen/qwen3.5-9b:batch): | |
| Qwen3.5-9B HLE. | |
| * [nivvis/Qwen3.5-9B-EQ-v5.1](https://huggingface.co/nivvis/Qwen3.5-9B-EQ-v5.1-GGUF), vanilla | |
| baseline row: Qwen3.5-9B HumanEval and HumanEval+. | |
| * [Introducing GPT-5.5](https://openai.com/index/introducing-gpt-5-5/) and the | |
| [Claude Opus 4.8 System Card](https://www.anthropic.com/claude-opus-4-8-system-card): GPQA Diamond. | |
| * MathArena via [BenchLeader AIME 2026](https://www.benchleader.com/benchmarks/matharena_aime_2026), | |
| [BenchLeader HMMT Feb 2026](https://www.benchleader.com/benchmarks/matharena_hmmt_feb_2026) and | |
| [The Aggregate HMMT Feb 2025](https://theaggregate.ai/benchmark?slug=matharena-hmmt-feb-2025): | |
| GPT-5.5 and Claude Opus 4.8 contest accuracy and tokens per problem. | |
| * [GLM-5.2 model card](https://huggingface.co/zai-org/GLM-5.2): GPT-5.5 and Claude Opus 4.8 HMMT | |
| Nov 2025. | |
| * benchgap.net for [GPT-5.5](https://benchgap.net/model/gpt-5-5), | |
| [Claude Opus 4.8](https://benchgap.net/model/claude-opus-4-8) and | |
| [Grok 4.3](https://benchgap.net/model/grok-4-3) (measured rows only): Artificial Analysis HLE and | |
| IFBench, and Vals AI MMLU-Pro and LiveCodeBench. | |
| * [Artificial Analysis via OpenRouter, Grok 4.3](https://openrouter.ai/x-ai/grok-4.3): Grok 4.3 | |
| GPQA Diamond, HLE and IFBench. | |
| * benchgap.net for the newest frontier releases, [GPT-6.1 Sol](https://benchgap.net/model/gpt-6-1-sol), | |
| [Claude Opus 5.5](https://benchgap.net/model/claude-opus-5-5) and | |
| [Grok 4.7](https://benchgap.net/model/grok-4-7): Artificial Analysis HLE. | |