🩺 HealthMate – Gemma 2B Medical LoRA Model

HealthMate is a fine-tuned LoRA adapter built on Google Gemma-2B-IT, trained on medically-oriented text extracted from the Gale Encyclopedia of Medicine.
The model specializes in encyclopedia-style medical Q&A, sticking strictly to source content and avoiding medical advice.


πŸ’‘ Model Summary

  • Base Model: google/gemma-2b-it
  • Type: LoRA Adapter (PEFT)
  • Parameters Trained: ~20M (LoRA layers only)
  • Task: Medical question answering, explanation, terminology, definitions
  • Language: English
  • Format: Instruction β†’ Input β†’ Output
  • Strength: Produces concise, reference-style medical answers
  • Avoids: Personal medical advice, diagnosis, or clinical recommendations

🧠 Model Description

HealthMate was fine-tuned to mimic the structured, factual tone of medical encyclopedias.
It is NOT a medical decision support tool.
It is designed purely for educational, informational, and academic use.

✨ Output Characteristics

  • Always begins with β€œAccording to the Gale Encyclopedia of Medicine:”
  • Uses a neutral, encyclopedic writing style
  • Does not hallucinate clinical advice
  • Structured and consistent formatting
  • Follows your training template exactly

πŸ“˜ Training Dataset

The model was trained on a custom dataset derived from:

  • Gale Encyclopedia of Medicine (text extracted using OCR + manual cleanup)
  • ~20,000 instruction-style samples
  • Each sample contains:
    • instruction (task description)
    • input (question)
    • output (encyclopedia-derived answer)

πŸš€ How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained(
    "google/gemma-2b-it",
    load_in_4bit=True,
    device_map="auto"
)

model = PeftModel.from_pretrained(base, "agnihotri-anxh/HealthMate-gemma-medical-lora")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it")

prompt = """Instruction: Answer the question based ONLY on the book content. Do NOT give medical advice.
Input: Explain ultrasound in simple terms.
Output:"""

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
Downloads last month
20
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for agnihotri-anxh/HealthMate-gemma-medical-lora

Base model

google/gemma-2b-it
Adapter
(641)
this model