Downloads · 30 days
15
3% of all-time downloads
nuriyev/Qwen2.5-0.5B-Instruct-medical-dpo
Qwen2.5-0.5B-Instruct-medical-dpo is a text generation model from nuriyev. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a result of applying DPO on petkopetkov/Qwen2.5-0.5B-Instruct-med-diagnosis using the relatively small dataset available as nuriyev/medical-question-answering-rl-labeled-qwen-0.5B-binarizedv2 at HuggingF…
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
466
Public
Parameters
494M
4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 99%
From the Hugging Face model README
This model is a result of applying DPO on petkopetkov/Qwen2.5-0.5B-Instruct-med-diagnosis
using the relatively small dataset available as nuriyev/medical-question-answering-rl-labeled-qwen-0.5B-binarized_v2 at HuggingFace.
It was evaluated using qualitative ranking and in some cases slightly outperforms the original petkopetkov/Qwen2.5-0.5B-Instruct-med-diagnosis.
The following web interface https://github.com/MahammadNuriyev62/doctor-llm was developed to test the model, make it publicly available and further collect the user feedback for further RLHF.
pip install -U transformers
from transformers import pipeline
import torch
system_prompt = (
"You are a medical assistant trained to provide general health information. "
"Follow these rules:\n"
"1. Only answer the question asked.\n"
"2. Do not deviate from medical facts.\n"
"3. Be concise and accurate."
)
prompt = "What is contact dermatitis, and what are some of the typical symptoms associated with this condition, including the type of hypersensitivity reaction that causes it?"
chat = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": prompt},
]
pipe = pipeline(
task="text-generation",
model="nuriyev/Qwen2.5-0.5B-Instruct-medical-dpo",
torch_dtype=torch.bfloat16,
device_map="auto",
max_new_tokens=1024,
)
response = pipe(chat)
print(response[0]["generated_text"][0])