Downloads · 30 days
32
0% of all-time downloads
skumar9/Llama-medx_v3.2
Llama-medx_v3.2 is a text generation model from skumar9. Use it when you need the model to write or continue text. It is set up for transformers.
Llama-medxv3.2 is specifically fine-tuned for medical domain.
Downloads · 30 days
32
0% of all-time downloads
All-time downloads
49.5K
Public
Parameters
8B
16.1 GB on disk
Likes
16
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
Llama-medx_v3.2 is specifically fine-tuned for medical domain.
Built on the Meta-Llama-3.1-8B architecture. Llama-medx_v3.2 has been finetuned using Supervised Fine-Tuning (SFT) and Odds Ratio Preference Optimization (ORPO). This ensures that the model aligns effectively with medical terminology and reasoning while maintaining learning efficiency. Hyperparameter tuning strategies have been carefully implemented to prevent catastrophic forgetting, ensuring consistent performance across various tasks. Benchmarked model was further finetuned for anwering mcq questions.
Publically available datasets, Enriched datasets for reinforcement feedback where the llama base model's knowledge and accuracy was not upto the mark.
Please ensure transformers>=4.45.2
import torch
import transformers
model_id = "skumar9/Llama-medx_v3.2"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
prompt = "Question: A 20-year-old man comes to the physician because of worsening gait unsteadiness and bilateral hearing loss for 1 month. He has had intermittent tingling sensations on both cheeks over this time period. He has no history of serious medical illness and takes no medications. Audiometry shows bilateral sensorineural hearing loss. Genetic evaluation shows a mutation of a tumor suppressor gene on chromosome 22 that encodes merlin. This patient is at increased risk for which of the following conditions?\nA. Renal cell carcinoma\nB. Meningioma\nC. Astrocytoma\nD. Vascular malformations\nAnswer:\n"
gen_kwargs = {
"return_full_text": False,
"max_new_tokens": 100,
}
print(pipeline(prompt, **gen_kwargs))