Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
text-generation-inference
fp8
Instructions to use osllmai-community/DeepSeek-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use osllmai-community/DeepSeek-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="osllmai-community/DeepSeek-R1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("osllmai-community/DeepSeek-R1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("osllmai-community/DeepSeek-R1", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use osllmai-community/DeepSeek-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "osllmai-community/DeepSeek-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "osllmai-community/DeepSeek-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/osllmai-community/DeepSeek-R1
- SGLang
How to use osllmai-community/DeepSeek-R1 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 "osllmai-community/DeepSeek-R1" \ --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": "osllmai-community/DeepSeek-R1", "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 "osllmai-community/DeepSeek-R1" \ --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": "osllmai-community/DeepSeek-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use osllmai-community/DeepSeek-R1 with Docker Model Runner:
docker model run hf.co/osllmai-community/DeepSeek-R1
Commit History
-
Upload model-00159-of-000163.safetensors with huggingface_hub
Verified signature928fac3 -
Upload model-00094-of-000163.safetensors with huggingface_hub
Verified signature1a29595 -
Upload model-00015-of-000163.safetensors with huggingface_hub
Verified signature317b5bb -
Upload model-00017-of-000163.safetensors with huggingface_hub
Verified signatureba82958 -
Upload model-00137-of-000163.safetensors with huggingface_hub
Verified signature48ffebc -
Upload model-00032-of-000163.safetensors with huggingface_hub
Verified signature0173b4a -
Upload model-00059-of-000163.safetensors with huggingface_hub
Verified signatureb1879f4 -
Upload model-00148-of-000163.safetensors with huggingface_hub
Verified signature8a7a8ae -
Upload model-00005-of-000163.safetensors with huggingface_hub
Verified signature44a7e16 -
Upload model-00024-of-000163.safetensors with huggingface_hub
Verified signature63b981d -
Upload model-00013-of-000163.safetensors with huggingface_hub
Verified signature750192d -
Upload model-00130-of-000163.safetensors with huggingface_hub
Verified signaturec378084 -
Upload model-00145-of-000163.safetensors with huggingface_hub
Verified signaturecb7049c -
Upload model-00058-of-000163.safetensors with huggingface_hub
Verified signaturef32e26d -
Upload model-00091-of-000163.safetensors with huggingface_hub
Verified signaturea4f48c0 -
Upload model-00075-of-000163.safetensors with huggingface_hub
Verified signatureab0c280 -
Upload generation_config.json with huggingface_hub
Verified signaturee0cc88a -
Upload model.safetensors.index.json with huggingface_hub
Verified signature9aa1ec0 -
Upload model-00149-of-000163.safetensors with huggingface_hub
Verified signature1a76631 -
Upload model-00119-of-000163.safetensors with huggingface_hub
Verified signature81ea8d7 -
Upload model-00136-of-000163.safetensors with huggingface_hub
Verified signature434f36b -
Upload model-00046-of-000163.safetensors with huggingface_hub
Verified signature8010b76 -
Upload modeling_deepseek.py with huggingface_hub
Verified signature7332b97 -
Upload model-00022-of-000163.safetensors with huggingface_hub
Verified signaturebefb31e -
Upload model-00038-of-000163.safetensors with huggingface_hub
Verified signaturec319694 -
Upload model-00008-of-000163.safetensors with huggingface_hub
Verified signaturef772e01 -
Upload model-00067-of-000163.safetensors with huggingface_hub
Verified signature0cc7afe -
Upload model-00114-of-000163.safetensors with huggingface_hub
Verified signature6356f2c -
Upload model-00069-of-000163.safetensors with huggingface_hub
Verified signatureda81747 -
Upload model-00099-of-000163.safetensors with huggingface_hub
Verified signature06967ea -
Upload model-00077-of-000163.safetensors with huggingface_hub
Verified signaturee029d17 -
Upload model-00150-of-000163.safetensors with huggingface_hub
Verified signature2ee1685 -
Upload model-00111-of-000163.safetensors with huggingface_hub
Verified signature2c3afbb -
Upload model-00147-of-000163.safetensors with huggingface_hub
Verified signature890f629 -
Upload model-00104-of-000163.safetensors with huggingface_hub
Verified signaturea9c96b0 -
Upload model-00068-of-000163.safetensors with huggingface_hub
Verified signaturef4b79c7 -
Upload model-00007-of-000163.safetensors with huggingface_hub
Verified signature1cf3513 -
Upload model-00004-of-000163.safetensors with huggingface_hub
Verified signaturef709633 -
Upload model-00079-of-000163.safetensors with huggingface_hub
Verified signaturec478a46 -
Upload model-00100-of-000163.safetensors with huggingface_hub
Verified signatureada8829 -
Upload model-00035-of-000163.safetensors with huggingface_hub
Verified signature6e9b816 -
Upload model-00126-of-000163.safetensors with huggingface_hub
Verified signaturea63a7ee -
Upload model-00098-of-000163.safetensors with huggingface_hub
Verified signaturef317187 -
Upload model-00051-of-000163.safetensors with huggingface_hub
Verified signaturec0415b7 -
Upload model-00053-of-000163.safetensors with huggingface_hub
Verified signature1b7a3af -
Upload model-00055-of-000163.safetensors with huggingface_hub
Verified signature348be80 -
Upload model-00034-of-000163.safetensors with huggingface_hub
Verified signature8219298 -
Upload model-00072-of-000163.safetensors with huggingface_hub
Verified signaturebd7ccc6 -
Upload model-00057-of-000163.safetensors with huggingface_hub
Verified signatured9faedb -
Upload model-00028-of-000163.safetensors with huggingface_hub
Verified signature9cc5268