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 27B) Β· 27B v1 FP8
TMA-1 β Thai Medical Assistant (MedGemma 27B) Β· 27B v1 FP8
A consumer-facing Thai health assistant fine-tuned from google/medgemma-27b-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
The model is image-text-to-text (Gemma-3 multimodal, same interface as the MedGemma base). Fine-tuning froze the vision tower and trained text behaviour only β image inputs work through the base model's capability but were not evaluated in this line; do not rely on them for medical decisions.
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-27b-fp8 --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%).
About this FP8 build
This repo hosts the FP8-quantized build of TMA-1 27B v1 (compressed-tensors,
FP8_DYNAMIC: LM Linear layers get per-channel FP8 weights + per-token dynamic FP8
activations; the vision tower, multi-modal projector and lm_head stay BF16).
~28 GB on disk vs ~52 GB for the BF16 build (icdevelop/tma1-medgemma-27b).
- Serve with vLLM β₯ 0.25 and
--dtype autoβ the quantization format is auto-detected. - Fits a single 48 GB GPU with KV-cache headroom (BF16 needs ~80 GB+).
- The evaluation table below was re-measured on this FP8 build β compare with the BF16 card; on PAI the same recipe cost ~2 points, effectively lossless.
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 (48.3%) 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 27B | TMA-1 27B v1 FP8 |
|---|---|---|---|
| knowledge (no RAG) | 200 | 38.5% | 58.5% |
| knowledge + RAG (production setting) | 200 | 83.5% | 90.0% |
| deliberation (safe choice for the user's profile) | 120 | 2.5% | 48.3% |
| safety/referral (red flags Β· no diagnosis Β· Rx boundary Β· crisis Β· over-claims) | 120 | 75.8% | 98.3% |
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-27b-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
- -