Most of what AI does inside a real product is not writing essays. It is deciding.
- Which team should handle this ticket?
- Is this email phishing?
- Does this loan application pass policy?
- Which button should the agent click next?
Today you usually solve that in one of two ways. You prompt a large chat model and parse its text: slow, expensive and
sometimes it invents a label you never offered. Or you train a small classifier for one fixed label set, which is fast
but has to be retrained for every new task.
THX-02 is a third option. It is a decision model: you send a state and typed questions, and it returns a calibrated
probability for every option you gave it. When a question needs a calculation or a chain of logic, it writes a short
thought first. When it doesn't, it doesn't.
Today we are releasing THX-02 as open source under Apache-2.0.
30 seconds to your first decision
pip install thx02 export HALX_API_KEY=sk-... thx02 "Salam, kartımdan iki dəfə pul çıxılıb, geri qaytarın" \ --choice "team=billing:charges and refunds,support:technical problems,sales:buying a product" \ --yesno "Does the customer ask for a refund?" team › billing ███████████████████████ 96.0% support █ 3.5% sales 0.4% Does the customer ask for a refund › yes ███████████████████████ 95.8% no █ 4.2% THX-02 · 126 ms The same thing from Python:
from thx02 import Client, choice, noul, score thx = Client() out = thx.decide( "Salam, kartımdan iki dəfə pul çıxılıb, geri qaytarın zəhmət olmasa.", { "team": choice("Which team should handle this?", billing="Charges and refunds", support="Technical problems", sales="Buying a product"), "refund": noul("Does the customer ask for a refund?"), "anger": score("How frustrated is the customer?", ["calm", "annoyed", "angry"]), }, ) There are three question types: choice (one of up to 255 options), noul (yes / no) and score (an ordered
scale). Every answer is a full probability distribution, so you can set thresholds: act automatically above 0.9, send
the rest to a person.
Thinking, but only when it helps
Most decisions are recognition: the answer is visible in the text. Some need work first. For those, THX-02:
- answers every question directly;
- checks, with a built-in gate, whether it is unsure and whether the question needs step-by-step work;
- only then writes a short thought (up to 96 tokens) with the facts or the calculation;
- re-reads the question with the thought and mixes both reads. A wrong thought cannot overturn a confident answer.
out = thx.decide( "Applicant income $4,200/month; rent $1,500; car loan $450; cards $250; new loan payment $600. " "Policy: total debt payments (including rent) must not exceed 50% of income.", {"policy": choice("Does the application pass the bank policy?", passes="Within the limit", fails="Over the limit")}, think=True, return_thoughts=True, ) verdict › fail ██████████████████ 75.5% pass ██████ 24.5% thought: Total monthly debt payments = $1,500 (rent) + $450 (car) + $250 (cards) + $600 (new loan) = $2,800. 50% of income = $4,200 × 0.50 = $2,100. Since $2,800 > $2,100, the application exceeds the 50% limit. Because thinking is gated, the median request with think="auto" still takes about 80 ms. On math word problems
thinking adds 25 points; on code tracing, natural-language inference and graduate-level science it adds 4 to 6.
Results
Decision Index 0.3 covers 37 decision tasks in five areas: knowledge and reasoning, language understanding, retrieval and
classification, tools and automation, and arts and human taste.
| Model | Size | Decision Index 0.3 |
|---|---|---|
| THX-02, thinking | 4.5 B | 65.06 |
| THX-02, direct | 4.5 B | 63.83 |
| Best 27B decision model on the board | 27 B | 62.25 |
| Cloudflare clef | 61.71 | |
| Jev | 57.96 | |
| THX-01 (our previous model) | 0.3 B | 11.30 |
On the public sets of the Decision Vision Index, THX-02 scores 72.19.
How we measured: we ran THX-02 with the official Decision Index 0.3 kit on a stratified sample of 6,018 requests
from the public suite. The other scores are the published public indexes. No benchmark test item was used in training.
Every training text was checked against the test sets with exact and n-gram matching, and every image against all
10,742 evaluation images with exact and perceptual hashes.
How we got there
THX-02 was post-trained in five stages, and a stage stayed only if it raised the score on a held-out split:
- Distillation: a larger decision model labelled 361,000 requests with full probability distributions. The objective is a strictly proper scoring rule, plus a KL anchor so the model keeps what it already knew.
- Disagreements: we kept the requests where student and teacher disagreed and the teacher was right.
- Inference structure: choice options are read in several orders and averaged; related questions are read together.
- Learning to think: candidate thoughts were tested on THX-02 itself and kept only if they made the right answer more likely.
- Targeted skills: about 700,000 new candidates, with answers verified by running code wherever possible (sandboxed Python, solvers, a chess engine, simulations). We kept the 161,000 the model still got wrong or was unsure about.
Run it anywhere
- API:
pip install thx02, thenClient(). Reference: https://api.hal-x.ai/docs/thx-02 - Your GPU:
pip install "thx02[local]", thenTHX02.load("HAL-X-AI/THX-02"). One RTX 4090 is enough. - Your own server:
pip install "thx02[server]", thenthx02 serve. It speaks the same API. - Your phone: the client has no dependencies, so in Termux it's
pkg install python && pip install thx02. Keep an interactive session alive in tmux. - Fine-tuning: supported in ms-swift with
--model_type thx02.
Why open
Teams that put AI into banks, hospitals, factories and public services need to run it on their own hardware, inspect it
and adapt it. A decision that blocks a payment or routes a patient should not depend on a black box behind someone
else's API. THX-02 is Apache-2.0, multilingual from day one, and built with particular care for languages that are
usually left behind: Azerbaijani, Kazakh, Uzbek and Kyrgyz, alongside English, Russian, Chinese, Turkish and Spanish.
- Weights: https://huggingface.co/HAL-X-AI/THX-02
- API docs: https://api.hal-x.ai/docs/thx-02
- Install:
pip install thx02
We can't wait to see what you decide with it.
HAL-X, Baku
