Downloads · 30 days
0
JosefAlbers/phi-3-medmcqa-openbiollm
phi-3-medmcqa-openbiollm is a text generation model from JosefAlbers. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as cc-by-4.0.
LoRA finetune of Phi-3 on aaditya/Llama3-OpenBioLLM-8B generated answers to a subset of openlifescienceai/medmcqa questions using LoRA4context library.
Downloads · 30 days
0
Access
Public
Updated May 20, 2024
Repo size
6.3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors6.3 MB · 100%
From the Hugging Face model README
LoRA finetune of Phi-3 on aaditya/Llama3-OpenBioLLM-8B generated answers to a subset of openlifescienceai/medmcqa questions using LoRA4context library.
Usage:
prompt = """A 55- year old diabetic patient presents with transient obscuration in vision for 2-3 days followed by sudden loss of vision. Which of the following would be the best test to evaluate the symptoms?
A. Serum ACE levels
B. Quantiferon-Gold TB test
C. Elevated homocysteine levels
D. Serum creatinine levels"""
from huggingface_hub import HfApi, login, hf_hub_download, snapshot_download
snapshot_download(repo_id='JosefAlbers/phi-3-usmle', repo_type="model", local_dir=".")
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Phi-3-mini-4k-instruct-4bit-no-q-embed", tokenizer_config={'eos_token':'<|end|>'}, adapter_path='adapters')
generate(model, tokenizer, f"<|user|>\n{prompt}\n<|end|>\n<|assistant|>", max_tokens=500)