Text Generation
Transformers
Safetensors
GGUF
English
granite
granite-4.2
formal-logic
reasoning
lora
model-merging
wise-ft
reinforcement-learning
grpo
conversational
Run this model with HF Jobs
Run webAI-Official/TwIL-LM3-Pro on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/webAI-Official/TwIL-LM3-Pro. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/webAI-Official/TwIL-LM3-Pro on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/webAI-Official/TwIL-LM3-Pro. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/webAI-Official/TwIL-LM3-Pro. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use webAI-Official/TwIL-LM3-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webAI-Official/TwIL-LM3-Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webAI-Official/TwIL-LM3-Pro") 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-LM3-Pro") model = AutoModelForCausalLM.from_pretrained("webAI-Official/TwIL-LM3-Pro", 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-LM3-Pro 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-LM3-Pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM3-Pro: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-LM3-Pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM3-Pro: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-LM3-Pro:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf webAI-Official/TwIL-LM3-Pro:Q4_K_M
Use Docker
docker model run hf.co/webAI-Official/TwIL-LM3-Pro:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use webAI-Official/TwIL-LM3-Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webAI-Official/TwIL-LM3-Pro" # 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-LM3-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webAI-Official/TwIL-LM3-Pro:Q4_K_M
- SGLang
How to use webAI-Official/TwIL-LM3-Pro 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-LM3-Pro" \ --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-LM3-Pro", "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-LM3-Pro" \ --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-LM3-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use webAI-Official/TwIL-LM3-Pro with Ollama:
ollama run hf.co/webAI-Official/TwIL-LM3-Pro:Q4_K_M
- Unsloth Desktop
- Pi
How to use webAI-Official/TwIL-LM3-Pro 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-LM3-Pro: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "webAI-Official/TwIL-LM3-Pro:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use webAI-Official/TwIL-LM3-Pro with Docker Model Runner:
docker model run hf.co/webAI-Official/TwIL-LM3-Pro:Q4_K_M
- Lemonade
How to use webAI-Official/TwIL-LM3-Pro with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull webAI-Official/TwIL-LM3-Pro:Q4_K_M
Run and chat with the model
lemonade run user.TwIL-LM3-Pro-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use webAI-Official/TwIL-LM3-Pro 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-LM3-Pro: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:9931/v1 hermes config set model.default webAI-Official/TwIL-LM3-Pro:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webAI-Official/TwIL-LM3-Pro 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-LM3-Pro: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:9931/v1 \ --custom-model-id "webAI-Official/TwIL-LM3-Pro: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"
Update README.md
Browse files190 unmodified lines19119219319419519619763 unmodified lines261262263264265266267268269270271272273274275276277122 unmodified lines4004014024034044054064074084094104111 unmodified line4134144154164174184194204214224234244254264274284295 unmodified lines43543643743843944044144244344428 unmodified lines473474475476477478479190 unmodified linesIts corpus perplexities (16.93 and 27.03) are not comparable with the Granite-tokenizer models',because perplexity is per token and its vocabulary is 151,936 against 100,352.Qwen3.5-4B — a 4B reasoning model with 48.2% of its Track A generations truncated — sits betweenthe small models and Meridian-smaller: macro gate 0.4466 against 0.5539, strict-7 0.1121 against0.2879. It is ahead of Meridian-smaller on two rows only, `rule_induction` (0.5078 against 0.4195,second in the table after gpt-oss-120b) and `math_corpus` perplexity (3.5926 against 3.6983), and63 unmodified linesVibeThinker-3B's 0.7350. VibeThinker-3B also writes much longer answers on Track B (about 1,789tokens against 792).Qwen3.5-4B (10-dataset macro 0.7683, 14-dataset macro 0.6611) is the most truncation-limited arm inthe table. Its Track B prompts open a `<think>` block (thinking enabled) under the same4,096-token cap, so 67.3% of IFEval, 59.0% of MATH-500 and up to 99.3% of `rudas_ood` generationshit the cap, and every Track B stage except log-likelihood is flagged unrankable. Its IFEval(0.2400), MATH-500 (0.3600) and `rudas_ood` cells are truncation artefacts, and they account formost of the gap between its two macros. Even so, it is above Meridian-smaller on ARC (0.9267),StrategyQA (0.6967), CSQA (0.7767), MMLU-Redux (0.8433) and BBH-logic (0.9647), although several ofthose are also truncated (StrategyQA 60.7%, MMLU-Redux 33.0%, CSQA 28.7%, ARC 12.0% cap hits), soits scores are lower bounds on what a longer budget would give. No longer-budget run of the 4Bmodel exists, so no fairer number is available.Track B here was run with the chat template's thinking mode **disabled** for Meridian-smaller andits base (the prompt ends in an empty `<think></think>`), as it was for TwIL-LM3, whereas Track Auses the default thinking mode. The Track B numbers therefore describe non-reasoning behaviour;122 unmodified lines1. **LoRA supervised fine-tuning** on a synthetic formal-logic corpus covering the Track Aobjectives (first-order-logic translation, entailment labelling, semantic parsing, Leanformalisation and critique, procedural reasoning, rule induction).2. **Checkpoint fusion** — parameter-space averaging of intermediate SFT checkpoints, ratherthan taking the final checkpoint.3. **WiSE-FT interpolation** toward the pretrained base, `W = (1 − α)·W_base + α·W_finetuned`with **α = 0.15** — i.e. only 15% of the fine-tuned delta is retained. This conservativeinterpolation is the direct reason held-out capability survives.4. **MGPO** — entropy-weighted GRPO reinforcement learning against a programmatic verifier, withpartial credit for loose matches and token-F1 so that all-fail prompt groups still producegradient. Group size 16, learning rate 5e-6, sampling temperature 1.0, top-p 0.95,γ = 3.0. The run was resumed at step 800 with β = 0.02 and trained through step 2580, and the1 unmodified line## Limitations and caveats**Truncation.** At a 2048-token budget (one retry at 4096), **24.2%** of Track A generationshit the cap. That is far above the 2% threshold our protocol requires to mark a comparison`rankable`, so the Track A numbers are **not rankable** and should be read as indicative ratherthan exact. The base is worse (49.2%), and both are pessimistic because a truncated responsescores zero regardless of reasoning quality — so the true Track A gap over the base is probablynarrower than +0.123, and part of the improvement is shorter generations rather than betteranswers. For context, Qwen3-8B truncates 23.9% of rows, Qwen3.5-4B 48.2%, VibeThinker-3B 37.1%, LFM2.5-8B-A1B 17.9%,LFM2-2.6B 41.3% and Llama-3.2-3B 10.0% under the same budget, TwIL-LM3 4.4%. Some Track B stages are also flaggedunrankable for the same reason (`rudas_ood` 93.7% cap-hit, `math500` 14.0%, plus marginal excesson SVAMP, GSM-Symbolic and MuSR-team); the held-out core, retention, IFEval and log-likelihoodstages are rankable.**Verbose by construction.** Track A generations average 1,902 tokens and Track B generationsabout 792, so cost per answer is substantially higher than the TwIL-LM family (564 and 482 tokens)5 unmodified lines(exact match 0.0100), `procedural` (strict 0.1200) and semantic parsing exact match (0.0000);`rule_induction` parses only 56.5% of outputs.**Not a chat model.** It was optimised against automatic verifiers on logic tasks. It has had nosafety tuning beyond whatever the base model carries, and no instruction-following alignmentwork — IFEval is 0.7500 against the base's 0.7633.**Comparability.** For Track A, Meridian-smaller, its base, VibeThinker-3B, Qwen3.5-4B, Qwen3-8B, LFM2-2.6B,LFM2.5-8B-A1B and Llama-3.2-3B were checked to share the same sampled-row manifest and datasethash, seed and decoding; the TwIL-LM3 and gpt-oss-120b values are carried over from the TwIL-LM328 unmodified linesMeridian-smaller applies the same post-training pipeline as the[TwIL-LM3](https://huggingface.co/webAI-Official/TwIL-LM3) and TwIL-LM family — LoRA SFT,checkpoint fusion, WiSE-FT and MGPO — to a different base, IBM's Granite 4.2 3B, instead ofSmolLM3 or SmolLM2. Compared with TwIL-LM3 it is a stronger in-domain model (macro gate 0.5539against 0.4218) and a stronger held-out one (10-dataset macro 0.7901 against 0.7339), at theprice of much longer generations and a much higher truncation rate. Like the TwIL-LM models, itships as a full merged model on `main`, loaded directly with `AutoModelForCausalLM`.190 unmodified lines19119219319419519619763 unmodified lines261262263264265266122 unmodified lines3893903913923933943953963973983994001 unmodified line4024034044054064075 unmodified lines41341441541641741828 unmodified lines447448449450451452453190 unmodified linesIts corpus perplexities (16.93 and 27.03) are not comparable with the Granite-tokenizer models',because perplexity is per token and its vocabulary is 151,936 against 100,352.Qwen3.5-4B — a 4B reasoning model - sits betweenthe small models and Meridian-smaller: macro gate 0.4466 against 0.5539, strict-7 0.1121 against0.2879. It is ahead of Meridian-smaller on two rows only, `rule_induction` (0.5078 against 0.4195,second in the table after gpt-oss-120b) and `math_corpus` perplexity (3.5926 against 3.6983), and63 unmodified linesVibeThinker-3B's 0.7350. VibeThinker-3B also writes much longer answers on Track B (about 1,789tokens against 792).Track B here was run with the chat template's thinking mode **disabled** for Meridian-smaller andits base (the prompt ends in an empty `<think></think>`), as it was for TwIL-LM3, whereas Track Auses the default thinking mode. The Track B numbers therefore describe non-reasoning behaviour;122 unmodified lines1. **LoRA supervised fine-tuning** on a synthetic formal-logic corpus covering the Track Aobjectives (first-order-logic translation, entailment labelling, semantic parsing, Leanformalisation and critique, procedural reasoning, rule induction).2. **Multipath Distillation** to generate different reasoning traces from a given input prompt.3. **Checkpoint fusion** — parameter-space averaging of intermediate SFT checkpoints, ratherthan taking the final checkpoint.4. **WiSE-FT interpolation** along with **TIES** and **DARE-SLERP** merging toward the pretrained base, This conservativeinterpolation is the direct reason held-out capability survives.5. **MGPO** — entropy-weighted GRPO reinforcement learning against a programmatic verifier, withpartial credit for loose matches and token-F1 so that all-fail prompt groups still producegradient. Group size 16, learning rate 5e-6, sampling temperature 1.0, top-p 0.95,γ = 3.0. The run was resumed at step 800 with β = 0.02 and trained through step 2580, and the1 unmodified line## Limitations and caveats**Verbose by construction.** Track A generations average 1,902 tokens and Track B generationsabout 792, so cost per answer is substantially higher than the TwIL-LM family (564 and 482 tokens)5 unmodified lines(exact match 0.0100), `procedural` (strict 0.1200) and semantic parsing exact match (0.0000);`rule_induction` parses only 56.5% of outputs.**Comparability.** For Track A, Meridian-smaller, its base, VibeThinker-3B, Qwen3.5-4B, Qwen3-8B, LFM2-2.6B,LFM2.5-8B-A1B and Llama-3.2-3B were checked to share the same sampled-row manifest and datasethash, seed and decoding; the TwIL-LM3 and gpt-oss-120b values are carried over from the TwIL-LM328 unmodified linesMeridian-smaller applies the same post-training pipeline as the[TwIL-LM3](https://huggingface.co/webAI-Official/TwIL-LM3) and TwIL-LM family — LoRA SFT,checkpoint fusion, WiSE-FT and MGPO — to a different base, IBM's Granite 4.2 3B, instead ofSmolLM3 or SmolLM2 with some additional mechanisms. Compared with TwIL-LM3 it is a stronger in-domain model (macro gate 0.5539against 0.4218) and a stronger held-out one (10-dataset macro 0.7901 against 0.7339), at theprice of much longer generations and a much higher truncation rate. Like the TwIL-LM models, itships as a full merged model on `main`, loaded directly with `AutoModelForCausalLM`.
README.md+6-32