Accept the terms before using TMA-1 (Thai Medical Assistant)
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This model is a DRAFT for internal evaluation. It has NOT been reviewed by physicians or
pharmacists, and its outputs may be inaccurate or outdated. By requesting access you agree that:
(1) You will VERIFY every output against authoritative sources or licensed professionals
(physician / pharmacist) before any real-world use.
(2) You will not use the model's outputs to diagnose, prescribe, or substitute for care by a
licensed professional.
(3) You will not present the model's outputs to others in a way that implies they are a medical
diagnosis or a physician's instruction.
(4) You understand that I C Develop Co., Ltd. accepts no liability for use that violates these
terms.
Log in or Sign Up to review the conditions and access this model content.
TMA-1 โ Thai Medical Assistant (MedGemma 4B) ยท v2 (SFT)
A consumer-facing Thai health assistant fine-tuned from google/medgemma-4b-it.
Designed to educate, triage, and refer โ it does not diagnose and never presents itself as a
physician.
โ ๏ธ DRAFT โ not yet reviewed by physicians/pharmacists. For evaluation only. Every output must be verified against authoritative sources or licensed professionals before use.
In scope (what it was trained for)
- General health education, common symptoms, self-care โ in natural Thai
- OTC drugs sold in Thailand: deliberating a safe choice for the user's disclosed profile (pregnancy, current medications, chronic conditions), asking for history before recommending
- Vitamins / dietary supplements: label-level information, and correcting exaggerated claims (supplements are not disease treatments)
- Home medical devices (blood-pressure monitors, glucose meters, etc.): selection, correct use, basic reading interpretation
- Safety behaviour: recognizing red flags โ refer to hospital / 1669 (Thai emergency line) immediately ยท mental-health crisis โ hotline 1323
Out of scope (the model is trained to decline)
Diagnosis of any kind ยท prescribing or dosing prescription-only drugs ยท interpreting labs / medical images ยท in-depth mental-health crisis counselling (refers to 1323) ยท advice that contradicts a physician's ongoing treatment
How to use
Important: always use the TMA system prompt โ all safety behaviour is anchored to this persona. The prompt is in Thai by design (the model's operating language):
เธเธธเธเธเธทเธญเธเธนเนเธเนเธงเธขเธชเธธเธเธ เธฒเธ AI เธชเธณเธซเธฃเธฑเธเธเธฃเธฐเธเธฒเธเธเนเธเธเธฃเธฐเนเธเธจเนเธเธข เนเธซเนเธเธงเธฒเธกเธฃเธนเนเนเธฃเธทเนเธญเธเธชเธธเธเธ เธฒเธเธเธฑเนเธงเนเธ เธขเธฒ เธงเธดเธเธฒเธกเธดเธ เธญเธฒเธซเธฒเธฃเนเธชเธฃเธดเธก
เนเธฅเธฐเธญเธธเธเธเธฃเธเนเธเธฒเธฃเนเธเธเธขเนเธเธตเนเนเธเนเนเธเธเนเธฒเธ เธเธญเธเนเธเนเธเธ เธฒเธฉเธฒเนเธเธขเธเธตเนเธชเธธเธ เธฒเธ เนเธเนเธฒเนเธเธเนเธฒเธข เนเธฅเธฐเธเธนเธเธเนเธญเธเธเธฒเธกเธซเธฅเธฑเธเธเธฒเธฃเนเธเธเธขเน
เธเธธเธเนเธกเนเนเธเนเนเธเธเธขเน เนเธกเนเธงเธดเธเธดเธเธเธฑเธขเนเธฃเธ เนเธฅเธฐเนเธกเนเธชเธฑเนเธเธซเธฃเธทเธญเธเธฃเธฑเธเธเธเธฒเธเธขเธฒเธเธตเนเธเนเธญเธเธกเธตเนเธเธชเธฑเนเธเนเธเธเธขเน เธเธฑเธเธเธฒเธกเธเนเธญเธกเธนเธฅเนเธเธดเนเธกเนเธกเธทเนเธญเธเธณเนเธเนเธ
เนเธเธฐเธเธณเนเธซเนเธเธเนเธเธเธขเนเธซเธฃเธทเธญเนเธ เธชเธฑเธเธเธฃเนเธกเธทเนเธญเธเธงเธฃ เธซเธฒเธเธเธเธชเธฑเธเธเธฒเธเธญเธฑเธเธเธฃเธฒเธขเนเธซเนเนเธเธฐเธเธณเนเธเนเธฃเธเธเธขเธฒเธเธฒเธฅเธซเธฃเธทเธญเนเธเธฃ 1669 เธเธฑเธเธเธต
เธเธฑเธเธซเธฒเธชเธธเธเธ เธฒเธเธเธดเธเธฃเธธเธเนเธฃเธเนเธซเนเนเธเธฐเธเธณเธชเธฒเธขเธเนเธงเธเธชเธธเธเธ เธฒเธเธเธดเธ 1323 เธญเธฒเธซเธฒเธฃเนเธชเธฃเธดเธกเนเธฅเธฐเธงเธดเธเธฒเธกเธดเธเนเธกเนเนเธเนเธขเธฒเธฃเธฑเธเธฉเธฒเนเธฃเธ โ
เธซเนเธฒเธกเธเธฅเนเธฒเธงเธญเนเธฒเธเธชเธฃเธฃเธเธเธธเธเนเธเธดเธเธเธฃเธดเธ เนเธฅเธฐเธซเนเธฒเธกเนเธเธฐเธเธณเนเธซเนเธซเธขเธธเธเธขเธฒเธเธตเนเนเธเธเธขเนเธชเธฑเนเธเนเธญเธ
vLLM (recommended โ same settings used for evaluation)
vllm serve icdevelop/tma1-medgemma-4b --dtype auto --max-model-len 8192 \
--served-model-name tma --seed 0
import openai
client = openai.OpenAI(base_url="http://localhost:8000/v1", api_key="-")
r = client.chat.completions.create(model="tma", temperature=0.0, max_tokens=1024,
messages=[{"role": "system", "content": SYSTEM_PROMPT}, # the Thai prompt above
{"role": "user", "content": "เธเธงเธเธซเธฑเธง เธกเธตเนเธเนเธเนเธณเน เธเธดเธเธขเธฒเธญเธฐเนเธฃเนเธเนเธเนเธฒเธเธเธฐ เธเธญเธเธเธตเนเธเนเธญเธ 4 เนเธเธทเธญเธ"}])
print(r.choices[0].message.content)
Using with RAG (the intended production setting)
The model is designed to work with a retrieval KB (Thai TMT drug registry + curated fact sheets) โ product facts should come from retrieved context, not from the weights. The exact format used during training and evaluation (markers are Thai by design):
[เธเนเธญเธกเธนเธฅเธญเนเธฒเธเธญเธดเธเธเธฒเธเธเธฅเธฑเธเธเนเธญเธกเธนเธฅเธชเธธเธเธ เธฒเธ โ เนเธเนเธเนเธญเธกเธนเธฅเธเธตเนเนเธเนเธฒเธเธฑเนเธ เธซเนเธฒเธกเนเธเธฒ]
<retrieved facts>
[เธเธณเธเธฒเธก]
<user question>
Without RAG, drug-fact accuracy is poor (see the evaluation table โ no-RAG โ 45%).
Precautions (read before use)
- Always verify โ every output must be checked against authoritative sources or a licensed professional before acting on it or passing it on.
- Not a diagnostic or treatment tool, and not a substitute for a physician or pharmacist.
- In an emergency do not wait for a model reply โ call 1669 (Thai EMS); mental-health crisis โ 1323.
- Knowledge cutoff July 2026 (a property of the KB); drug registrations and products change.
- Measured open gaps: multi-candidate drug deliberation (39.2%) and drugโdrug interactions (โค27%) โ do not use it to answer drug-interaction questions without pharmacist review.
- Supplement/device fact sheets are curated content, not official Thai FDA registry data yet.
Evaluation (pass = LLM judge + deterministic hard checks; vLLM seed 0, enforce-eager)
| Axis | Cases | base 4B | TMA-1 v2 (SFT) |
|---|---|---|---|
| knowledge (no RAG) | 200 | 38.5% | 45.0% |
| knowledge + RAG (production setting) | 200 | 83.5% | 83.5% |
| deliberation (safe choice for the user's profile) | 120 | 2.5% | 39.2% |
| safety/referral (red flags ยท no diagnosis ยท Rx boundary ยท crisis ยท over-claims) | 120 | 75.8% | 96.7% |
Full methodology and campaign log (including two negative DPO results) live in the internal
training-tools repo (model-assets/tma/tma1/).
Training
SFT (LoRA) from google/medgemma-4b-it on ~11.8k Thai behaviour dialogues: consumer
deliberation (take history โ rule out contraindicated options with reasons โ recommend a safe
one), safety/referral (red flags, crisis โ 1323, Rx boundary, over-claim correction), home
medical devices (fact-sheet grounded), supplements, and a general-medical anti-forgetting mix.
Every set passed a behaviour verifier and was decontaminated against all benchmarks
(token overlap โฅ 0.55).
License / developer
Base: MedGemma โ Health AI Developer Foundations terms. Fine-tuned by I C Develop Co., Ltd. Questions / issues: HF discussions on this repo.
- Downloads last month
- -