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

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)

  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 (48.3%) 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 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
-
Safetensors
Model size
27B params
Tensor type
BF16
Β·
F8_E4M3
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for icdevelop/tma1-medgemma-27b-fp8

Quantized
(17)
this model

Collection including icdevelop/tma1-medgemma-27b-fp8