Skip to main content

OpenThai-SystemOne

OpenThai-SystemOne launch: Jev ภาษาไทยมาแล้ว — open Thai + English System One decision model

Open-source Thai + English System One decision model: a Qwen3.5-0.8B text tower whose LM head is replaced by a 256-way slot softmax, continued-pretrained on Thai, and trained to answer typed questions (choice / score / noul) about an arbitrary state in a single forward pass with calibrated probabilities. The request/response contract mirrors TypeSafe AI's POST /v1/systemone (Jev), so SDK code written for TypeSafe can point at this model.

Quickstart

pip install "git+https://github.com/iapp-technology/openthai-systemone"      # or: pip install openthai-systemone
from openthai_systemone import SystemOneClient, Choice, Score, Noul

client = SystemOneClient("iapp/OpenThai-SystemOne")          # CUDA, MPS or CPU
resp = client.system_one(
    state={"ticket": "โดนหักเงินซ้ำสองครั้ง ขอเงินคืนด่วน โทรไปสามรอบแล้วไม่มีใครรับ"},
    questions={
        "department": Choice(instructions="ทีมใดควรรับผิดชอบ", criteria={"billing": "การเงิน/คืนเงิน", "technical": "ระบบใช้งานไม่ได้", "sales": None}),
        "frustration": Score(instructions="ลูกค้าหงุดหงิดแค่ไหน", criteria=["ใจเย็น", "หงุดหงิดแต่สุภาพ", "โกรธมาก"]),
        "refund": Noul(instructions="ลูกค้าขอเงินคืนอย่างชัดเจนหรือไม่"),
    },
)
print(resp.answers["department"].choice, resp.answers["department"].probabilities)
print(resp.answers["frustration"].score, resp.answers["refund"].noul)

HTTP server with the same JSON contract as TypeSafe's POST /v1/systemone:

OPENTHAI_SYSTEMONE_MODEL=iapp/OpenThai-SystemOne uvicorn openthai_systemone.server:app --port 8000

Model card with benchmark tables: https://huggingface.co/iapp/OpenThai-SystemOne. Design rationale: docs/PLAN.md.

Layout

openthai_systemone/     pip package: types (Choice/Score/Noul), formatting (prompt + slots), modeling (SlotHead), client, server
scripts/00..07_*.py    one script per pipeline stage (see below)
configs/*.yaml         CPT / SFT / calibration hyper-parameters (1x H100)
tests/                 CPU unit tests

Pipeline

stage script where output
0 surgery scripts/00_prepare_base.py CPU base/qwen3.5-0.8b-text (vision encoder dropped)
1 CPT data scripts/01_cpt_data.py CPU, needs internet data/cpt/shard-*.bin (5B Thai-heavy tokens)
1 CPT scripts/02_cpt_train.py --config configs/cpt.yaml 1x H100, ~1 day runs/cpt/latest
2 decision data scripts/03_decision_data.py, scripts/03b_synth_generate.py CPU + LLM endpoint data/decision/*.jsonl, data/synth/*.jsonl
2 SFT scripts/04_decision_train.py --config configs/sft.yaml 1x H100, ~0.5 day runs/sft/latest
3 calibration scripts/04_decision_train.py --config configs/calib.yaml --init runs/sft/latest 1x H100, hours runs/calib/latest
4 eval scripts/06_eval.py --model runs/calib/latest GPU runs/eval.json
5 release scripts/07_export_release.py --ckpt runs/calib/latest --out release/... --push iapp/OpenThai-SystemOne – HF Hub

Dev

uv venv -p 3.12 .venv && source .venv/bin/activate
uv pip install -e ".[server,train,dev]"
pytest -q

Synthetic data needs an OpenAI-compatible endpoint:

export SYNTH_BASE_URL=http://localhost:11436/v1 SYNTH_MODEL=openthai2.0-qwen3.8-27b SYNTH_API_KEY=...
python scripts/03b_synth_generate.py --out data/synth --n 600000 --concurrency 32

Metadata

Release files for openthai-systemone 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openthai-systemone 0.1.0
File Size Uploaded Provenance
openthai_systemone-0.1.0.tar.gz 26.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openthai-systemone 0.1.0
File Interpreter ABI Platform
openthai_systemone-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.2 kB

Release files / openthai_systemone-0.1.0.tar.gz

Download URL openthai_systemone-0.1.0.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ca2c4bbc26bd7b63390ba46f9b05150af65cfd9f6d08b2300dbc703018bd712c
BLAKE2b-256 checksum
How to use checksums
707985b61e2307dc08e2538d0b0fbab0bb0209bd7d2189beac99926a50c0723c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Release files / openthai_systemone-0.1.0-py3-none-any.whl

Download URL openthai_systemone-0.1.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb16d02febd3307cd06fb0d9b36ef6b2ccbe65551b75ad01e06ef1abe0d74f53
BLAKE2b-256 checksum
How to use checksums
db8aa30aa37896063bfd86a7abe3a9d882cb269d1501f34e14623caa01d6a95f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Security for openthai-systemone 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page