Downloads · 30 days
12
19% of all-time downloads
Japhari/medgemma-stg-cds-lora
medgemma-stg-cds-lora is a machine learning model from Japhari. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
LoRA adapter for google/medgemma-4b-it, tuned for converting clinical narratives into structured payloads that support Tanzania STG-aligned clinical decision support (CDS) workflows.
Downloads · 30 days
12
19% of all-time downloads
All-time downloads
64
Public
Repo size
418 MB
Likes
0
Public
Click a slice to open those files.
.safetensors394 MB · 64%
From the Hugging Face model README
LoRA adapter for google/medgemma-4b-it, tuned for converting clinical narratives into structured payloads that support Tanzania STG-aligned clinical decision support (CDS) workflows.
google/medgemma-4b-itThis adapter is intended to be loaded on top of google/medgemma-4b-it and used in a controlled backend or Space application to:
Typical integration pattern:
/cds/evaluate)The deterministic CDS engine should remain the source of truth for recommendations.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model_id = "google/medgemma-4b-it"
adapter_id = "Japhari/medgemma-stg-cds-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
device_map="auto" if torch.cuda.is_available() else None
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
google/medgemma-4b-itis a gated model. Ensure your Hugging Face account has accepted access before loading.
This adapter was fine-tuned for CDS-focused structured extraction and explanation tasks.
Training artifacts in this repository are PEFT adapter weights and metadata.
No formal benchmark results are published in this card yet.
For production use, evaluate on local clinical scenarios, monitor error types, and implement safety gates.
This model is for decision support and workflow assistance only.
It must not replace clinical judgment, local protocols, or emergency escalation procedures.
Japhari