Instructions to use iapp/OpenThai-SystemOne-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iapp/OpenThai-SystemOne-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="iapp/OpenThai-SystemOne-bnb-4bit", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("iapp/OpenThai-SystemOne-bnb-4bit", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
OpenThai-SystemOne — bnb-4bit
OpenThai-SystemOne is an open Thai + English System One decision model: one forward
pass answers typed questions (choice over up to 255 options, ordinal score, yes/no noul) about a text / JSON state with
calibrated probabilities, no text generation. It is a Qwen3.5-0.8B text tower (Thai continued pre-training) plus a 256-slot
decision head. This repo is a quantization of v0.3 (commit f3709948).
What is quantized: the Linear layers of the tower. The token embeddings, the 256-slot decision head and the per-type temperatures stay in bf16. Quantization therefore only perturbs the hidden state the head reads.
Format: bitsandbytes NF4 4-bit (double quant). bitsandbytes checkpoint, stays quantized in GPU memory (CUDA).
Size: 767 MB (bf16 original: 1,509 MB).
Usage
pip install torch transformers safetensors pydantic && pip install bitsandbytes
from transformers import AutoModel, AutoTokenizer # trust_remote_code files are in this repo
model = AutoModel.from_pretrained("iapp/OpenThai-SystemOne-bnb-4bit", trust_remote_code=True)
# or with the pip package (git+https://github.com/iapp-technology/openthai-systemone):
from openthai_systemone import SystemOneClient
c = SystemOneClient("iapp/OpenThai-SystemOne-bnb-4bit")
r = c.system_one("ร้านนี้อาหารอร่อยมาก แต่รอนานเกือบชั่วโมง", {"sentiment": {"type": "choice", "instructions": "ความรู้สึก",
"criteria": {"บวก": None, "ลบ": None, "กลาง": None}}})
Accuracy vs the bf16 original (same records, single option order, first 800 per set)
Macro: public 73.6 (original 74.3), Thai 79.7 (original 80.1).
| subset | bf16 original | this | Δ |
|---|---|---|---|
| public 13-subset bench | |||
| aegis2 (noul) | 83.2 | 82.8 | -0.4 |
| boolq (noul) | 79.7 | 78.7 | -1.0 |
| civil_comments (noul) | 79.0 | 81.0 | +2.0 |
| helpsteer2 (score) | 41.6 | 42.8 | +1.2 |
| massive-de-DE (choice) | 88.3 | 85.7 | -2.6 |
| massive-en-US (choice) | 88.3 | 86.3 | -2.0 |
| multinli (choice) | 89.0 | 87.0 | -2.0 |
| paws (noul) | 94.0 | 92.8 | -1.2 |
| pubmedqa (choice) | 64.0 | 62.8 | -1.2 |
| squad2 (noul) | 89.3 | 87.0 | -2.3 |
| summeval-consistency (score) | 75.0 | 73.6 | -1.4 |
| summeval-relevance (score) | 21.7 | 26.2 | +4.6 |
| vitaminc-dev (choice) | 72.5 | 69.8 | -2.7 |
| macro, public 13-subset bench | 74.3 | 73.6 | -0.7 |
| Thai held-out / eval sets | |||
| banking77 (choice) | 59.1 | 58.2 | -0.9 |
| contrastive_th (choice) | 80.7 | 79.7 | -1.0 |
| contrastive_th (noul) | 83.5 | 81.9 | -1.6 |
| contrastive_th (score) | 78.6 | 82.1 | +3.6 |
| massive_th (choice) | 90.6 | 90.5 | -0.1 |
| prachathai (choice) | 98.3 | 98.8 | +0.5 |
| prachathai (noul) | 93.4 | 93.4 | +0.0 |
| sib200_th (choice) | 77.9 | 75.0 | -2.9 |
| wisesight (choice) | 48.9 | 49.5 | +0.6 |
| wongnai (score) | 64.5 | 63.9 | -0.6 |
| xlam_tools (choice) | 99.4 | 99.4 | +0.0 |
| xnli_th (choice) | 79.8 | 77.9 | -1.9 |
| xnli_th (noul) | 86.8 | 86.2 | -0.5 |
| macro, Thai held-out / eval sets | 80.1 | 79.7 | -0.4 |
Notes
- Scores are single-option-order accuracy on the first 800 records of each set (
scripts/06_eval.py --limit 800), the same records for the original and the quantization.scoresubsets report exact level accuracy. - Base model, data, training and the full benchmark tables: iapp/OpenThai-SystemOne.
- License Apache-2.0 (same as the base). Built by iApp Technology / OpenThaiGPT.
- Downloads last month
- -