This is a 4-bit GPTQ quantization of
google/medgemma-27b-text-it, the text-only variant of Google's MedGemma optimized for medical text reasoning.
This quantized model was generated by Ben Barnard Ph.D and Oladimeji Adaramewa for MPART — the Medical Policy Applied Research Team at Innovate Springfield and University of Illinois Springfield. MPART focuses on applied research in healthcare policy, Medicaid concerns, and health system funding analysis.
The text-only MedGemma 27B scores higher on medical text benchmarks than the multimodal version (89.8 vs 87.0 on MedQA, 74.2 vs 70.2 on MedMCQA) while being simpler to deploy. This quantized version reduces memory requirements from ~55GB to ~15GB, making it runnable on a single GPU with 24GB+ VRAM. We found that it is very good with understanding healthcare policy and finance.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "bbarn4/medgemma-27b-text-it-GPTQ",
6 device_map="auto",
7 dtype="auto"
8)
9tokenizer = AutoTokenizer.from_pretrained("bbarn4/medgemma-27b-text-it-GPTQ")
10
11prompt = "What are the key differences between Type 1 and Type 2 diabetes?"
12inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
13
14with torch.inference_mode():
15 output = model.generate(**inputs, max_new_tokens=500, do_sample=False)
16
17print(tokenizer.decode(output[0], skip_special_tokens=True))
This model is intended as a starting point for developers and researchers building healthcare applications involving medical text. It is NOT intended for direct clinical use. All outputs require independent verification by qualified professionals.