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)

  1. Always verify โ€” every output must be checked against authoritative sources or a licensed professional before acting on it or passing it on.
  2. Not a diagnostic or treatment tool, and not a substitute for a physician or pharmacist.
  3. In an emergency do not wait for a model reply โ€” call 1669 (Thai EMS); mental-health crisis โ†’ 1323.
  4. Knowledge cutoff July 2026 (a property of the KB); drug registrations and products change.
  5. 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.
  6. 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
-
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for icdevelop/tma1-medgemma-4b

Finetuned
(620)
this model

Collection including icdevelop/tma1-medgemma-4b