Downloads · 30 days
0
arka7/medical-ai-qwen3-4b_v1
medical-ai-qwen3-4b_v1 is a machine learning model from arka7. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This is a fine-tuned medical AI model based on Qwen3-4B, trained using Unsloth for efficient 4-bit training.
Downloads · 30 days
0
Access
Public
Updated Oct 25, 2025
Repo size
276 MB
Likes
0
Public
Click a slice to open those files.
.safetensors264 MB · 94%
From the Hugging Face model README
This is a fine-tuned medical AI model based on Qwen3-4B, trained using Unsloth for efficient 4-bit training.
This model is designed for medical conversation and diagnosis assistance. It:
⚠️ IMPORTANT DISCLAIMER: This model is for research and educational purposes only. It should NOT be used as a substitute for professional medical advice, diagnosis, or treatment.
from unsloth import FastLanguageModel
# Load model with LoRA adapter
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "arka7/medical-ai-qwen3-4b_v1",
max_seq_length = 4096,
dtype = None,
load_in_4bit = True,
)
# Prepare for inference
FastLanguageModel.for_inference(model)
messages = [
{
"role": "system",
"content": "You are an expert medical AI assistant. You must reason internally before each response, ask clarifying questions, and provide a final structured diagnosis."
},
{
"role": "user",
"content": "I've been having a sharp headache on the right side of my head."
}
]
# Apply chat template
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
# Generate response
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model generates responses with structured tags:
<reasoning>: Internal reasoning process<diagnosis>: Final diagnosis conclusion<specialist>: Recommended specialist for consultationIf you use this model, please cite:
@misc{medical_ai_qwen3_4b_v1,
author = {arka7},
title = {medical-ai-qwen3-4b_v1},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/arka7/medical-ai-qwen3-4b_v1}
}