Instructions to use deepseek-ai/DeepSeek-R1-Distill-Qwen-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-R1-Distill-Qwen-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Distill-Qwen-14B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-14B") model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-14B") 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]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deepseek-ai/DeepSeek-R1-Distill-Qwen-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
- SGLang
How to use deepseek-ai/DeepSeek-R1-Distill-Qwen-14B 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 "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" \ --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": "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", "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 "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" \ --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": "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-R1-Distill-Qwen-14B with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
Fix chat_template crash when assistant message omits the `content` key
#29 opened 17 days ago
by
qgallouedec
Update README.md
#28 opened 4 months ago
by
cherry0328
add AIBOM
#27 opened 12 months ago
by
RiccardoDav
asdDeepSeek-R1-Distill-Qwen-14B
#26 opened about 1 year ago
by
Axdar
asd-qen-deepskee
#25 opened about 1 year ago
by
Axdar
sdfsdf
#24 opened about 1 year ago
by
ShubhamSantoki
Test using M1 Max (64G) and Word
#23 opened about 1 year ago
by
gptlocalhost
DeepSeek-R1-Distill-Qwen-14B的训练/推理模板改变
#22 opened about 1 year ago
by
fxb
Delete tokenizer.json
#21 opened about 1 year ago
by
mrdayl
Is this model support function calling?
#20 opened about 1 year ago
by
gaoxt1983
🚩 Report: Ethical issue(s)
#19 opened about 1 year ago
by
lq1111
Is there any method to limit the thinking process of this model?
1
#18 opened over 1 year ago
by
SAPIENS2333
How to load the model on Kaggle or Colab
1
#17 opened over 1 year ago
by
Vijayendra
能否开一下基于transfomers的inference代码
1
#16 opened over 1 year ago
by
zhixingsun
I use Q4_K_M with lmstudio 0.3.9 and it keeps saying 'failed to regenerate message'. Why?
1
#15 opened over 1 year ago
by
colabiu
是否可以推出量化版本
👍 2
1
#14 opened over 1 year ago
by
luoyezadi
如何强制它不偷懒的进行推理呢
2
#13 opened over 1 year ago
by
zheFox
🚩 Report
1
#12 opened over 1 year ago
by
hrishisarma
Disable Think text
5
#11 opened over 1 year ago
by
rjsng0904
[Bug] Critical Context Loss in DeepSeek-R1: Model Hallucinates <think> Tag into Arbitrary Replacements, Fails to Maintain Coherent Reasoning
➕ 1
3
#9 opened over 1 year ago
by
MultEase
Add pipeline tag, link to paper
#8 opened over 1 year ago
by
nielsr
800K Samples dataset release?
👀 9
#7 opened over 1 year ago
by
robinsmits
How to load the model?
1
#6 opened over 1 year ago
by
oubahe
Why change the configuration of the tokenizer?
👀 2
2
#4 opened over 1 year ago
by
Lingrui
System Prompt
8
#2 opened over 1 year ago
by
Wanfq