Instructions to use nigelleong0703/Taiji-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use nigelleong0703/Taiji-2B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string
Taiji-2B ε€ͺζ
Fast intuition and slow reasoning, fused into one agent system. An open System One model that decides and writes in a single 2B model, and hands the hard cases to any System Two LLM, the way yin and yang form one circle.
Qwen3.5-2B with a LoRA (rank 16) and a decision head. Give it a state (text, JSON, a screenshot) and questions with the options you allow; it returns calibrated probabilities over exactly those options in one forward pass, without generating answer tokens. The same weights also write short text, such as a form-field value or a tool argument. When it is unsure, route the question to any larger LLM.
Code, server and examples: github.com/nigelleong0703/Taiji.
The request format is compatible with the /v1/systemone choice / noul / score questions of
TypeSafe's Jev (independent project, not affiliated).
What it does
- Decide:
choice(1-255 options),noul(true/false),score(2-10 ordered levels), all options scored in the same pass; the answer is always one of the offered options. - Write: the text for one field or argument, or
nullwhen the context lacks the value, from the same weights. - Escalate: temperature-calibrated probabilities (held-out ECE 0.02) tell when to ask System Two.
- See: an optional screenshot goes through Qwen3.5's vision encoder next to the text state.
Results
General decisions vs hosted Jev, same 490 held-out questions, same script and grading:
| Questions | n | Jev (hosted) | Taiji-2B |
|---|---|---|---|
| All | 490 | 0.859 | 0.882 |
| General choice | 248 | 0.891 | 0.899 |
| General yes/no | 33 | 0.970 | 0.970 |
| General score | 19 | 0.632 | 0.684 |
| Tool choice | 116 | 0.871 | 0.914 |
| Tool yes/no | 74 | 0.743 | 0.784 |
On par (the models disagree on 57 questions: 34 vs 23, McNemar p β 0.19). The questions come from the same public datasets as part of the training data (held out), which favors this model.
Held-out decisions (2,945 rows): accuracy 0.86, ECE 0.02. Field text exact match 0.76.
Operation recall: BLOCKED 1.00, WAIT 1.00, SELECT 0.96, CLICK 0.93, TYPE_TEXT 0.89, DONE 0.57, SCROLL_DOWN 0.42,
SCROLL_UP 0.18 (calibration_report.json).
Speed: 219 ms median server time per decision on a real Google Flights page (~6,500 tokens with a screenshot and three questions) on one H100 (171 ms model, 59 ms input preparation); network time comes on top. About 6 GB of VRAM.
Browser agent (one example integration): simple sites 6/6 with a correct completion; Google Flights reaches the right results page with a screenshot but does not yet declare completion. Browsing in this page format is under-represented in the training data.
Use
git clone https://github.com/nigelleong0703/Taiji && cd Taiji && pip install -r requirements.txt
hf download nigelleong0703/Taiji-2B --local-dir Taiji-2B
pip install --no-deps Taiji-2B/wheels/causal_conv1d-*.whl # optional kernel: torch 2.14 + CUDA 12.6
python infer.py --adapter Taiji-2B --data examples/requests.jsonl --output answers.jsonl
S1_API_KEY=<secret> python serve.py --base Qwen/Qwen3.5-2B --adapter Taiji-2B --shared-prefix
This is the project's adapter + head.pt format, loaded by s1.load(); not an AutoModel.from_pretrained repository.
Files
| File | What |
|---|---|
adapter_model.safetensors, adapter_config.json |
LoRA rank 16 on the Qwen3.5-2B language model |
head.pt |
decision head (yesno: Yes-minus-No readout at each option marker + gated candidate head) |
temperature.json |
calibrated temperatures, global and per question kind |
calibration_report.json |
held-out report per source and kind, operation recall, DONE analysis, text exact match |
train_args.json |
training arguments |
wheels/ |
causal-conv1d 1.7.0 built for torch 2.14 + CUDA 12.6, sm 80/86/89/90, Python 3.10 |
Training
One epoch over 60,395 rows on one H100 (~5.4 h): LoRA rank 16, vision encoder frozen, cross-entropy + 0.1 Brier, label smoothing 0.05, text rows weighted 3x, then temperature calibration. Data: WebLINX 12,000 and Multimodal-Mind2Web 9,000 web steps, Open-Jev browser 13,814 and general 10,000 decisions, tool selection 3,000, general public decision sets 3,000, synthetic WAIT/BLOCKED 1,500 and SELECT 2,952, completion rows from WebLINX 1,420.
License
CC BY-NC-SA 4.0, research and non-commercial use only: the training data includes WebLINX (CC BY-NC-SA 4.0). Built on Qwen3.5-2B (Apache-2.0); other upstream datasets keep their own licenses. The code on GitHub is Apache-2.0. A DONE or any other choice is not proof of success: verify outcomes independently.
- Downloads last month
- 14