Instructions to use AliFadel/DeepSeek-R1-Medical-O1-QA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AliFadel/DeepSeek-R1-Medical-O1-QA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AliFadel/DeepSeek-R1-Medical-O1-QA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AliFadel/DeepSeek-R1-Medical-O1-QA") model = AutoModelForCausalLM.from_pretrained("AliFadel/DeepSeek-R1-Medical-O1-QA") 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 AliFadel/DeepSeek-R1-Medical-O1-QA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AliFadel/DeepSeek-R1-Medical-O1-QA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AliFadel/DeepSeek-R1-Medical-O1-QA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AliFadel/DeepSeek-R1-Medical-O1-QA
- SGLang
How to use AliFadel/DeepSeek-R1-Medical-O1-QA 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 "AliFadel/DeepSeek-R1-Medical-O1-QA" \ --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": "AliFadel/DeepSeek-R1-Medical-O1-QA", "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 "AliFadel/DeepSeek-R1-Medical-O1-QA" \ --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": "AliFadel/DeepSeek-R1-Medical-O1-QA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AliFadel/DeepSeek-R1-Medical-O1-QA with Docker Model Runner:
docker model run hf.co/AliFadel/DeepSeek-R1-Medical-O1-QA
DeepSeek-R1-Medical-O1-QA
This is a fine-tuned version of the deepseek-ai/DeepSeek-R1-Distill-Llama-8B base model.
Model Job
This model is specialized in text-based medical Question Answering (QA). It uses step-by-step reasoning to break down clinical scenarios, patient symptoms, and medical captions to provide clear answers.
Dataset
Trained on the FreedomIntelligence/medical-o1-reasoning-SFT dataset to learn clinical chain-of-thought reasoning.
Limitations
⚠️ This model is for research and educational purposes only. It cannot be used as a medical or diagnostic tool without a medical expert or doctor's supervision.
- Downloads last month
- 152
Model tree for AliFadel/DeepSeek-R1-Medical-O1-QA
Base model
deepseek-ai/DeepSeek-R1-Distill-Llama-8B