/ Модель

Характеристики

Лицензия
Своя лицензия
Базовая модель
medgemma-27b-it
Библиотека
transformers
Опубликована
19 июл 2026

pai1-medgemma-27b

Изображение и текст → текст3 профессии

Дообученный мультимодальный MedGemma 27B IT для помощи фармацевтам Таиланда с подбором безрецептурных препаратов и проверкой рисков.

0скачиваний за 30 дней0лайковвеса обновлены28 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

pai1-medgemma-27b — мультимодальный ассистент для общественных аптек Таиланда, разработанный I C Develop Co., Ltd. на основе Google MedGemma 27B IT и дообученный для консультаций по безрецептурным препаратам. Модель принимает текстовые запросы и изображения упаковок, этикеток и рецептов; для снимков и лабораторных изображений она не предназначена. В карточке указаны языки тайский и английский, однако модель рассчитана прежде всего на общение на тайском языке.

Ассистент собирает краткий анамнез, проверяет противопоказания и возможные взаимодействия, подбирает подходящий безрецептурный препарат с дозировкой и предостережениями, а при тревожных симптомах рекомендует обратиться к врачу. Модель обучена на базе MedGemma 27B IT с помощью LoRA SFT и DPO; заявленный размер базовой модели — 27 млрд параметров. Для ответов по лекарственным фактам рекомендуется использовать RAG с базой знаний thai-pharma-kb. В README приведены результаты внутренних бенчмарков: 50,5% для поиска без RAG, 64,5% с RAG и 38,3% для клинического рассуждения.

Это черновой выпуск: часть базы знаний создана с помощью ИИ и ещё не прошла полную проверку фармацевтом. Каждый ответ должен быть проверен лицензированным фармацевтом; модель не предназначена для диагностики или лечения и не должна выдавать себя за врача. Указана лицензия other; дополнительные условия использования в предоставленных данных не раскрыты.

Сценарии применения

  • Подбор безрецептурного препарата по симптомам и краткому анамнезу на тайском языке
  • Проверка противопоказаний с учётом беременности, принимаемых препаратов и других факторов риска
  • Подсказки по дозировке и предостережениям для аптечной консультации
  • Первичная оценка тревожных симптомов и рекомендация обратиться к врачу
  • Чтение информации на упаковке, этикетке или рецепте лекарства

Ограничения

README предупреждает, что 534 записи базы знаний отмечены для проверки, а сама база ещё не прошла полную проверку лицензированным фармацевтом. Ответы могут ошибаться, особенно для редких препаратов, сложной полипрагмазии и необычных взаимодействий; каждый ответ требуется проверять фармацевту, модель не предназначена для диагностики или лечения.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

pai1-medgemma-27b — Thai Pharmacy Assistant (v26-DPO, premium tier)

⚠️ DRAFT — pharmacist & legal review pending. The drug knowledge base behind this model is partly AI-generated and not yet fully reviewed by a licensed pharmacist (534 entries flagged). Released under an acknowledge-before-download gate. Every output must be verified by a licensed pharmacist before real-world use.

What this model is

pai1-medgemma-27b is a Thai community-pharmacy assistant fine-tuned from google/medgemma-27b-it by I C Develop Co., Ltd.

Its job: help a pharmacy counter handle over-the-counter (OTC) requests in Thai — take a short history, rule out drugs that are unsafe for that customer, recommend a suitable OTC option with dose and cautions, and refer to a doctor when red-flag symptoms appear.

Design principle — reason like a clinician internally, present as a pharmacy assistant externally. The model is trained to do the clinical reasoning a good pharmacist does (contraindication checks, interaction awareness, red-flag triage) while never claiming to be a physician and never issuing a diagnosis — presenting as a doctor is legally prohibited in Thailand.

Tier: this is the premium tier (higher accuracy). The smaller, faster, cheaper tier is icdevelop/pai1-medgemma-4b. A smaller FP8 build (~28 GB, near-identical quality) is at icdevelop/pai1-medgemma-27b-fp8.

Multimodal: inherits MedGemma's image input — intended for medicine boxes, labels and prescriptions, not X-rays or lab films.

Benchmarks

Version lineage (higher is better; every score below was produced by running all cases):

Taskv20v24v26-DPO (this release)
lookup (no RAG)46.5 %43.0 %50.5 %
lookup + RAG64.5 %65.3 %64.5 %
deliberation29.2 %37.7 %38.3 %

Reading the numbers: v26-DPO is the strongest on drug-fact recall (lookup 50.5 %, +7.5 over v24) while holding RAG performance and slightly improving clinical deliberation. Deliberation has risen across the whole line (29.2 → 38.3) thanks to the deliberation training described below.

How the benchmark was run (methodology)

All benchmarks are deterministic — the model is served on vLLM with --seed 0 --enforce-eager, and answers are graded by an LLM judge (0–10). A case counts as pass only when the judge passes it and no safety violation (must_not) is triggered. All benchmark cases are held out and decontaminated from the training corpus, so scores are not inflated by memorisation.

BenchmarkCasesWhat it measures
thai_pharma_bench_v2 (lookup)200Brand / route / interaction facts with no retrieval. Ground truth from the Thai TMT registry + KB. Pure drug-fact recall.
thai_pharma_bench_v2_rag (lookup + RAG)200Same questions, but real KB facts are retrieved and injected into the prompt — the intended production setting.
deliberation_bench_v1120The obvious/top retrieved drug is contraindicated for the customer's disclosed profile. The judge checks whether the model rules it out, explains why, and recommends a safe alternative — reasoning, not recitation.

Before release, the merged model also passes a 6-prompt generation check (headache+fever, greeting, diarrhoea, allergic rhinitis, drug comparison, abdominal pain) verifying coherent Thai output with no repetition or degeneration.

How it was trained

  • Base model: google/medgemma-27b-it (Google MedGemma, Gemma-3 multimodal).
  • Stage 1 — LoRA SFT (rank 32, 2 epochs, bf16, LR 3e-6) on thai_pharma_v24 (~33 k dialogues). The vision tower and multi-modal projector are frozen — this is a text-domain adaptation, so image understanding stays exactly as MedGemma trained it.
  • Stage 2 — combined DPO (β 0.1, ld_alpha 0.5 length-desensitisation, LR 1e-6, 100 steps) on 6,648 preference pairs = 2,872 OTC-accuracy pairs + 3,776 deliberation pairs.
  • Training corpus (thai_pharma_v24): curated Thai pharmacy dialogues — brand / route / interaction lookup, supplement & vitamin guidance, professional-register Q&A, TMT product grounding, drug-interaction cases, plus the deliberation set below. Exact-dedup + MinHash-LSH near-dedup, then decontaminated against every evaluation set.
  • Deliberation data (deliberate_v2) — the key ingredient: multi-turn dialogues in which at least one retrieved candidate is contraindicated for the customer's disclosed profile (pregnancy, warfarin, gastric ulcer, driving, …). The target answer must take history → rule out the unsafe option with a reason → recommend a safe alternative → give dose/cautions from the retrieved facts → refer on red flags, and ask for more history when information is insufficient instead of guessing. A verifier rejects any turn that hard-diagnoses, impersonates a physician, or merely recites the record.
  • Deliberation preference pairs (DPO): chosen = the clinician-style deliberation, rejected = a fluent but unsafe answer that recommends the contraindicated drug. The pairs are length-balanced (chosen/rejected token ratio ≈ 1.0) so the preference signal is behaviour, not verbosity.

How to use

Recommended: serve with vLLM and ground every answer with RAG

vllm serve icdevelop/pai1-medgemma-27b \
  --dtype bfloat16 --max-model-len 8192 \
  --served-model-name pai --seed 0 --enforce-eager

# the knowledge base used for grounding
huggingface-cli download icdevelop/thai-pharma-kb --repo-type dataset

Getting the best results

  1. Always ground with RAG. Retrieve the real drug facts (from the TMT registry / KB) for the drugs in question and inject them into the prompt. Lookup+RAG (64.5 %) is far above no-RAG behaviour, and grounded answers are what the model was trained to produce.
  2. Write the reference block and the question in Thai. The model is purpose-built for Thai community pharmacy; Thai prompts get noticeably better answers.
  3. Let it take history. If the customer's message lacks key details, the model is trained to ask follow-up questions — allow a multi-turn conversation rather than forcing a single-shot answer.
  4. Give it more than one candidate drug. The deliberation training shows its value when the model must choose between options and exclude the unsafe one.
  5. Keep a pharmacist in the loop. Treat every answer as a draft recommendation for a licensed pharmacist to confirm.

Not recommended

  • Using it without retrieval for factual drug questions (recall is much weaker).
  • Asking for a diagnosis, or presenting it to end users as a doctor — it is trained to refuse and refer, and doing so is legally prohibited in Thailand.
  • Radiology or laboratory image interpretation — out of scope.

Data provenance & review status

SourceCountStatus
TMT drug registry (Thai MoPH)~31,000 productsOfficial government data
Ingredient knowledge base1,918 ingredientsAI-generated — not yet pharmacist-reviewed (534 flagged for review)

Knowledge cutoff (data freshness)

The knowledge available to this model is bounded by the RAG knowledge base, not by the weights.

  • Knowledge base: icdevelop/thai-pharma-kb · cutoff: July 2026
  • Drugs, brands, supplements or regulatory changes registered after that date are not reflected. To advance the cutoff, re-pull the TMT registry, rebuild the KB, and update the dataset.

Model format

BF16 — full-precision merged weights, ~52 GB on disk.

Limitations & safety

  • Not a medical device. Not for diagnosis or treatment. Every output must be reviewed by a licensed pharmacist before it reaches a patient.
  • The knowledge base is not yet pharmacist-reviewed and may contain inaccuracies (534 entries flagged). This is why the repository is gated behind an explicit acknowledgement.
  • Thai community-pharmacy domain only. Image input is limited to medicine boxes, labels and prescriptions.
  • The model can still make mistakes on rare drugs, complex poly-pharmacy and unusual interactions — RAG grounding reduces but does not eliminate this.

License

A Model Derivative of google/medgemma-27b-it under the Health AI Developer Foundations (HAI-DEF) Terms. Redistribution requires attaching the Terms, the §3.2 use restrictions, the NOTICE, and a modification notice.

Not a medical device; not for clinical use without a licensed pharmacist. Contact: I C Develop Co., Ltd.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
a69019d

0 моделей