Skip to main content

Inside the Lab: How We Built TwIL-LM

October 16, 2026

Since its release in August, TwIL-LM has been downloaded more than 400k times on Hugging Face.

TwIL-LM, short for Thinking webAI Intelligence Lab Language Model, is a family of small models trained to reason in formal logic. That's the strict, rule-bound reasoning of mathematical proofs, where a conclusion either follows from its premises or it doesn't. The models are built to give short, precise answers, and they're small enough to run locally instead of in a data center.

In this video, PJ Maykish, webAI's Chief Intelligence Officer, sits down with webAI research scientists Anurag Daram and Cutter Dalton from the webAI Intelligence Lab to talk through how TwIL-LM came together. It's a technical conversation, made for developers and anyone curious about what goes into building a small reasoning model.

How do you build a 3-billion parameter reasoning model that competes with 8-billion parameter frontier models? webAI's Intelligence Lab sat down to walk through exactly that.

What to watch for

Starting from open source, not from scratch. Pretraining a model from the ground up takes enormous compute. The team built TwIL-LM on open-source base models from Hugging Face's SmolLM family instead, then trained them into formal logic specialists.

A data engine built for breadth, then checked for accuracy. The team started by collecting formal logic data from many open-source datasets. Along the way, they found errors in some of the source material, so they added a verification step to clean the data before training. Summer intern Wynn Williams was central to that work.

Specialization without forgetting. Training a model on a new task often erodes what it already knew. The team used model merging techniques to protect general reasoning, and the 3B model came out of training with its general reasoning intact, even slightly improved.

Short answers by design. Many models are trained to produce long, detailed responses. On a phone, every extra word costs time. TwIL-LM keeps its answers short, which is where much of its speed comes from.

Where the lab goes next

Formal logic is one kind of reasoning. The human mind uses many others, from abstract to creative to mathematical. At the end of the video, PJ describes the question the lab is exploring next: what happens when small models, each built for a different kind of reasoning, work together on local devices?

That idea sits at the center of how webAI thinks about AI. Instead of one giant model doing everything, specialized models collaborate, each contributing what it does best. TwIL-LM is one of those specialists.

Want to try it yourself? TwIL-LM is available in 1.7B and 3B versions, with full details and results on each model card.

Explore TwIL-LM on Hugging Face