EyePACS MedGemma language-only LoRA v2

Research demo only. Not clinically validated. Trained with assistant-only loss and a frozen vision tower. Run mode: full. This model card does not claim clinical accuracy or independent validation of generated lesion descriptions. Review training_metadata.json for package versions, base revision, validation loss, and before/after generation samples. A low loss is not proof of correctness.

Loading

Use the same pinned Transformers 4.57.6 and PEFT 0.21.2 environment used in training. Accept the base model's access terms and authenticate with Hugging Face first. This is a LoRA adapter, not a standalone model. For a CUDA GPU:

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor, BitsAndBytesConfig
from peft import PeftConfig, PeftModel

adapter_id = "harsaas/medgemma_retraining_v2"
config = PeftConfig.from_pretrained(adapter_id)
processor = AutoProcessor.from_pretrained(adapter_id)
base = AutoModelForImageTextToText.from_pretrained(
    config.base_model_name_or_path,
    revision=config.revision,
    torch_dtype=torch.float16,
    device_map={"": 0},
    quantization_config=BitsAndBytesConfig(
        load_in_4bit=True,
        bnb_4bit_quant_type="nf4",
        bnb_4bit_compute_dtype=torch.float16,
        bnb_4bit_use_double_quant=True,
    ),
)
model = PeftModel.from_pretrained(base, adapter_id, device_map={"": 0})
model.eval()

Do not treat generated findings as established facts or use them for patient care. The base-model license/access restrictions and dataset terms still apply.

Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for harsaas/medgemma_retraining_v2

Adapter
(70)
this model