Instructions to use ronan7878/qwen3-4b-medical-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ronan7878/qwen3-4b-medical-finetune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ronan7878/qwen3-4b-medical-finetune") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("ronan7878/qwen3-4b-medical-finetune") model = AutoModelForMultimodalLM.from_pretrained("ronan7878/qwen3-4b-medical-finetune") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ronan7878/qwen3-4b-medical-finetune with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ronan7878/qwen3-4b-medical-finetune" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ronan7878/qwen3-4b-medical-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ronan7878/qwen3-4b-medical-finetune
- SGLang
How to use ronan7878/qwen3-4b-medical-finetune with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ronan7878/qwen3-4b-medical-finetune" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ronan7878/qwen3-4b-medical-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ronan7878/qwen3-4b-medical-finetune" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ronan7878/qwen3-4b-medical-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ronan7878/qwen3-4b-medical-finetune with Docker Model Runner:
docker model run hf.co/ronan7878/qwen3-4b-medical-finetune
Qwen3-4B Medical Fine-tune
This is a merged fine-tuned model based on Qwen/Qwen3-4B-Instruct-2507.
Intended Use
The model is designed for medical question-answering experiments with a focus on Traditional Chinese Medicine.
The intended training mix is:
- 80% Traditional Chinese Medicine data
- 20% western/general medical reasoning data
Training Data
The training pipeline uses public datasets:
DigitalIntelligenceCenter-of-ICMM/Baize-TCM-Corpus-for-Large-Language-Models-V3FreedomIntelligence/medical-o1-reasoning-SFT
Please review the original dataset licenses and terms before commercial use.
Limitations
This model is a portfolio and research fine-tune. It is not a medical device and must not be used as a substitute for professional diagnosis or treatment.
It may:
- produce incorrect medical advice
- confuse Traditional Chinese Medicine and western medical concepts
- hallucinate prescriptions, herbs, dosages, contraindications, or diagnoses
- miss emergency warning signs
For real-world use, connect it to verified clinical guidelines and require professional review.
Example
User: 最近睡眠不好,舌苔厚腻,容易疲劳,可能是什么情况?
Assistant: 从中医角度看,舌苔厚腻和疲劳可能与湿困脾胃等因素有关,但仅凭这些信息不能诊断。建议结合饮食、二便、脉象和既往病史综合判断,并咨询专业医生。
- Downloads last month
- 14
Model tree for ronan7878/qwen3-4b-medical-finetune
Base model
Qwen/Qwen3-4B-Instruct-2507