TwIL-8B is a small reasoning model from webAI that punches well above its size on maths and code.
It scores 98.2 on MATH-500 and 88.3 on AIME 2025, and its verbose version hits 81.6 on LiveCodeBench, ahead of Gemma 4 31B on that test. Its Q4 file is just under 5 GB, so it runs on an ordinary gaming GPU.
There are a few catches: it is non-commercial, it is weak on general knowledge, and it thinks for a long time.
This guide covers what TwIL-8B is, which file to download, the exact Ollama, LM Studio and llama.cpp commands, the settings that matter, how it compares with Qwen3.5-9B and Gemma 4, and fixes for the usual problems.
- What: webAI-Official/TwIL-8B, an 8.8B model post-trained from IBM Granite 4.2 8B for maths, code and instruction following.
- Two versions: balanced (default, shorter thinking) and verbose (longer thinking for hard problems).
- Files: Q4_K_M is 4.98 GiB (balanced or verbose), Q8_0 8.70 GiB and F16 16.38 GiB (verbose only).
- Run it:
ollama run hf.co/webAI-Official/TwIL-8B:Q4_K_M, or the LM Studio button on the model page. - Settings: temperature 1.0, top_p 0.95, and a big output budget (the card uses 32,768 tokens and 40,960 context).
- Catches: webAI Non-Commercial License, weak on facts, no tool-use tuning, and “not a general assistant” in webAI’s own words.
What TwIL-8B Is
TwIL-8B comes from webAI. It starts from IBM’s open Granite 4.2 8B base and adds two rounds of training:
- Full-parameter supervised fine-tuning on maths, code and instruction data.
- Reinforcement learning with GRPO and DAPO, the same family of methods used to train many recent reasoning models.
| Spec | TwIL-8B |
|---|---|
| Parameters | 8.79B (dense) |
| Architecture | Granite decoder-only transformer, 40 layers |
| Context window | 131,072 tokens |
| Language | English |
| Thinking | Opens a <think> block before every answer by default |
| bf16 size | about 16.38 GiB |
| Licence | webAI Non-Commercial License 1.0 (base model Apache 2.0) |
webAI does not give a release date on the card. The comparison figures on it were collected on 3 November 2026, so it is a very new model.
Balanced vs Verbose
The repo holds two trained versions of the same model.
| Balanced | Verbose | |
|---|---|---|
| Where | Repo root, model-balanced.safetensors |
verbose/ subfolder |
| Thinking length | Shorter | Longer |
| Best for | Everyday maths and code help | Hard, contest-style problems |
| GGUF | Q4_K_M only | Q4_K_M, Q8_0, F16 |
Start with balanced. Switch to verbose only when balanced gets a hard problem wrong and you do not mind waiting longer. Some of the headline benchmark scores (LiveCodeBench, IFBench, MMLU-Pro, HumanEval) come from the verbose version.
Files and VRAM
The GGUF files sit in the same repo as the main weights.
| File | Version | Size | Suggested GPU |
|---|---|---|---|
TwIL-8B-Q4_K_M-balanced.gguf |
Balanced | 4.98 GiB | 8 GB and up |
TwIL-8B-Q4_K_M-verbose.gguf |
Verbose | 4.98 GiB | 8 GB and up |
TwIL-8B-Q8_0-verbose.gguf |
Verbose | 8.70 GiB | 12 GB and up |
TwIL-8B-F16-verbose.gguf |
Verbose | 16.38 GiB | 24 GB |
The “suggested GPU” column is my own sizing rule, not webAI’s: the file plus a few GB for the context. Because TwIL thinks for tens of thousands of tokens, the context cache matters more than usual.
On an 8 GB card, Q4_K_M with a moderate context is the realistic setup, and a 12 GB or 16 GB card gives room for the full 40K context the card uses.
Our VRAM guide and GGUF quantization guide explain how to size a model for your card.
Run It in Ollama
Ollama can pull GGUFs straight from Hugging Face. If you do not have Ollama yet, see our Ollama install guide.
ollama run hf.co/webAI-Official/TwIL-8B:Q4_K_M
That pulls a Q4_K_M build and opens a chat. Because the repo has two Q4_K_M files, check which one Ollama picked with ollama show hf.co/webAI-Official/TwIL-8B:Q4_K_M. If you want to be sure you get balanced, use llama.cpp or LM Studio and choose the file by name.
Raise Ollama’s context, or long answers will be cut off. Inside the chat, type:
/set parameter num_ctx 40960
Our Ollama commands cheat sheet lists the other parameters you can set.
Run It in LM Studio
- Open the TwIL-8B model page and press the LM Studio button under “Use this model”, or search for
webAI-Official/TwIL-8Bin LM Studio’s model search. - Pick
TwIL-8B-Q4_K_M-balanced.gguf(or a verbose file). - When you load it, set the context length to at least 40,960.
- In the model settings, set temperature 1.0 and top_p 0.95.
LM Studio hides the <think> block in a collapsible section, which keeps long reasoning readable.
Run It in llama.cpp
For a chat in the terminal, with the balanced file and the card’s context and output budget:
llama-cli -hf webAI-Official/TwIL-8B --hf-file TwIL-8B-Q4_K_M-balanced.gguf -cnv -c 40960 -n 32768
Add -ngl 99 to put every layer on the GPU if your build does not do that already. To serve an OpenAI-compatible API that tools like Open WebUI can use:
llama-server -hf webAI-Official/TwIL-8B --hf-file TwIL-8B-Q4_K_M-balanced.gguf -c 40960 -ngl 99 --port 8080
The card also gives llama serve -hf webAI-Official/TwIL-8B:Q4_K_M for newer llama.cpp builds. Our Open WebUI setup guide shows how to add a local server as a model.
Run It in Python (Transformers)
For the full bf16 weights (about 16.4 GiB) on a 24 GB GPU:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo = "webAI-Official/TwIL-8B"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="auto"
# add subfolder="verbose" for the verbose version
)
messages = [{"role": "user", "content": "Find all real x with x^2 - 5x + 6 = 0. Reason step by step."}]
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, temperature=1.0, top_p=0.95, do_sample=True)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
On Transformers 5.x, keep return_dict=True. Without it, apply_chat_template returns a BatchEncoding and the generate call fails. For serving, vLLM and SGLang both work and give an OpenAI-compatible endpoint.
Settings That Matter
| Setting | Value | Note |
|---|---|---|
| Temperature | 1.0 | From the shipped generation_config.json |
| top_p | 0.95 | Same source |
| Max new tokens | 32,768 | Short budgets cut off reasoning and score much worse |
| Context | 40,960 | Prompt plus the long answer |
| Thinking off | enable_thinking=False |
Faster, but scores drop a lot |
| Low effort | reasoning_effort="low" |
Same trade-off |
The output budget is the setting people get wrong most. TwIL-8B averaged about 19.5k output tokens per AIME 2026 problem and about 33k per HMMT February 2026 problem in webAI’s tests. Ollama’s and LM Studio’s default context lengths are far smaller than that.
The two speed switches (thinking off and low effort) go through chat_template_kwargs. None of the card’s scores use them, so expect much weaker answers with them on.
Benchmarks vs Qwen3.5-9B and Gemma 4
These are webAI’s own numbers. Competitor scores were taken from published sources, not re-run, so small gaps are within the noise of different test setups. A dagger (†) marks a verbose-version score.
| Benchmark | TwIL-8B | Qwen3.5-9B | Gemma 4 12B | Gemma 4 31B |
|---|---|---|---|---|
| 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 2026 | 68.2 | 71.2 | – | 77.2 |
| LiveCodeBench † | 81.6 | 65.6 | 72.0 | 80.0 |
| HumanEval+ † | 88.3 | 87.2 | – | 91.5 |
| IFEval | 91.8 | 91.5 | 97.2 | 98.9 |
| IFBench † | 74.4 | 64.5 | 74.0 | 76.0 |
| 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 |
The pattern is clear. On maths and competitive code, TwIL-8B is level with or ahead of models up to four times its size. On knowledge tests (GPQA Diamond, MMLU-Pro, HLE), it trails Qwen3.5-9B and both Gemma 4 models.
It also writes fewer tokens than Qwen3.5-9B for similar maths scores: 19.5k vs 31.2k per AIME 2026 problem. That matters on a slow local GPU.
Frontier models are still far ahead on the hardest tests. GPT-5.5 and Claude Opus 4.8 both score 100 on AIME 2026 and over 93 on GPQA Diamond in the same table. For general local picks, see our Gemma 4 local guide and best Ollama models by VRAM.
What It Is Good and Bad At
Good at:
- Maths homework, olympiad-style problems and step-by-step proofs.
- Algorithm and contest coding questions.
- Following precise formatting instructions.
- Running offline on an 8 GB to 12 GB GPU.
Not good at, according to webAI:
- General knowledge and facts. It is weaker than larger models here.
- Agent and tool-use work. There is no tool-use, preference or safety tuning beyond what Granite 4.2 already has, and SWE-bench and agent tasks were not tested.
- Being a chat assistant. The card says plainly it is “not a general assistant”.
- Languages other than English.
If you want a local coding agent rather than a maths solver, look at the models in our Qwen3.8-Flash-Next guide instead.
Licence
TwIL-8B uses the webAI Non-Commercial License ver. 1.0. As the name says, it is for non-commercial use. The full terms are in LICENSE.md in the repo, so read it before you use the model in anything you sell or run for clients.
The Granite 4.2 8B base model it starts from is Apache 2.0, and IBM’s licence and attribution are kept in the repo.
Troubleshooting
Answers stop half way through the thinking
The output budget or context is too small. Set max tokens to 32,768 and context to 40,960 (in Ollama, /set parameter num_ctx 40960). This is the number one problem with TwIL-8B.
It takes minutes to answer a simple question
That is the long thinking. Use balanced instead of verbose, keep all layers on the GPU, and for easy questions consider a general model. You can turn thinking off with enable_thinking=False, but quality drops a lot.
It gets facts or dates wrong
Expected. It was trained for maths and code, and its knowledge scores are low. Do not use it for factual lookups.
It never stops or prints <|im_end|>
The chat template is not being applied. The GGUFs use a ChatML-style template with <|im_end|> as the end token. Update your app, and in llama.cpp use chat mode (-cnv) or llama-server, which read the template from the file.
Transformers error about BatchEncoding
Pass return_dict=True to apply_chat_template, as in the example above.
Out of memory on an 8 GB card
Lower the context to 16K to 24K, or offload a few layers to the CPU. Our VRAM usage guide shows how to see what is filling the card.
FAQ
Is TwIL-8B free?
It is free to download and use for non-commercial work under the webAI Non-Commercial License. Commercial use is not covered.
Can I run TwIL-8B on an 8 GB GPU?
Yes. The Q4_K_M file is 4.98 GiB, which leaves room for a moderate context on an 8 GB card.
Should I pick balanced or verbose?
Balanced for most use. Verbose only for hard problems where you will wait for a better answer.
Is TwIL-8B better than Qwen3.5-9B?
On code (LiveCodeBench) and MATH-500, yes, by webAI’s numbers. On AIME 2026, HMMT and knowledge tests, Qwen3.5-9B is ahead. TwIL also uses fewer tokens per problem.
Does it support tool calling?
Not in a tuned way. It has only what Granite 4.2 includes, and webAI did not test tool use.
What does TwIL stand for?
webAI does not explain the name on the model card.
Can I use it in Cline or Continue for coding?
You can point them at a local llama-server or Ollama endpoint, but it is not tuned for agent work. For editor agents, see our Cline and Continue setup guide.
Sources
- webAI-Official/TwIL-8B model card (specs, files, commands, benchmarks, licence)
- IBM Granite 4.2 8B (base model)




