A-Kishore

phi_medical_qa_finetune_16bit

Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Model details

This checkpoint was trained to answer medical QA prompts in an instruction-following format. The training workflow uses the unsloth stack together with transformers, peft, trl, bitsandbytes, and datasets.

The dataset used in the notebook is medalpaca/medical_meadow_medqa, and the examples are formatted into a system/user/assistant prompt structure for supervised finetuning.

Intended use

This model is intended for educational and research purposes, and for prototyping medical QA assistants. It should not be used as a substitute for clinical judgment, diagnosis, or treatment recommendations.

Evaluation results

Evaluation was run on 1,018 examples with ROUGE metrics.

Table
MetricScore
ROUGE-10.6212
ROUGE-20.5815
ROUGE-L0.6195

Example usage

python

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
model_id = "A-Kishore/phi_medical_qa_finetune_16bit"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
pipe = pipeline("question-answering", model=model, tokenizer=tokenizer)
prompt = "You are a medical AI. Answer the question clearly and concisely.\n\nQuestion: What is the most likely diagnosis for a patient with fever, rash, and migratory arthritis?"
print(pipe(prompt, max_new_tokens=128, do_sample=False)[0]["generated_text"])

Limitations

The model can produce incorrect or overconfident answers, especially for ambiguous or poorly specified prompts. Review outputs carefully, and do not rely on this model for real-world medical decisions without qualified human oversight.

Model provider

A-Kishore

Model tree

Base

unsloth/Phi-3-mini-4k-instruct-bnb-4bit

Fine-tuned

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today