Downloads · 30 days
3
6% of all-time downloads
agnihotri-anxh/HealthMate-gemma-medical-lora
HealthMate-gemma-medical-lora is a text generation model from agnihotri-anxh. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
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, sticki…
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
48
Public
Repo size
11.6 MB
Likes
2
Public
Click a slice to open those files.
.safetensors7.4 MB · 63%
From the Hugging Face model README
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.
google/gemma-2b-itHealthMate 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.
The model was trained on a custom dataset derived from:
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]))