Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
text-generation-inference
8-bit precision
blockwise_int8
Instructions to use yuanzu/DeepSeek-R1-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuanzu/DeepSeek-R1-INT8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuanzu/DeepSeek-R1-INT8", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yuanzu/DeepSeek-R1-INT8", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("yuanzu/DeepSeek-R1-INT8", trust_remote_code=True) 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 yuanzu/DeepSeek-R1-INT8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuanzu/DeepSeek-R1-INT8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuanzu/DeepSeek-R1-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yuanzu/DeepSeek-R1-INT8
- SGLang
How to use yuanzu/DeepSeek-R1-INT8 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 "yuanzu/DeepSeek-R1-INT8" \ --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": "yuanzu/DeepSeek-R1-INT8", "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 "yuanzu/DeepSeek-R1-INT8" \ --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": "yuanzu/DeepSeek-R1-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yuanzu/DeepSeek-R1-INT8 with Docker Model Runner:
docker model run hf.co/yuanzu/DeepSeek-R1-INT8
Add files using upload-large-folder tool
Browse files- model-00024-of-000163.safetensors +3 -0
- model-00025-of-000163.safetensors +3 -0
- model-00028-of-000163.safetensors +3 -0
- model-00069-of-000163.safetensors +3 -0
- model-00080-of-000163.safetensors +3 -0
- model-00122-of-000163.safetensors +3 -0
- model-00143-of-000163.safetensors +3 -0
- model-00158-of-000163.safetensors +3 -0
- model-00160-of-000163.safetensors +3 -0
model-00024-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e8883adbea2854784a796d3ade28dc97380cf9b4dbbe286dc32c6aa59475c25
|
| 3 |
+
size 4302380800
|
model-00025-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0cda63dd4ec452f137d7a509e6ca7596fce20b3ce5d5342b27c9c031608bb44
|
| 3 |
+
size 4302381256
|
model-00028-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4d80040bd05b3d617e4323c9d51f91a7f3641d2168c1bbd2b53de871d666e5f
|
| 3 |
+
size 4302381256
|
model-00069-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65e69e5b07949084483353bd07e5ec91f9175fe7f206068ca1f176005bc76ab9
|
| 3 |
+
size 4302381256
|
model-00080-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23655f1fea92a32b695ac2e06e1387b070fe1f3940a494c2e6c1322ba8e639de
|
| 3 |
+
size 4302381208
|
model-00122-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c09fc4afb3f226675271b82d193b89c6fa5f7455117eaa26ef3788777729d10
|
| 3 |
+
size 1747412272
|
model-00143-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6bc7fb2811b4dc37c1d8277ebf379610adcafc77c248a713abb972ac4e8a538
|
| 3 |
+
size 4302381208
|
model-00158-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f442a9410f6ea548ac51431e1eb1547abe6a3f05418a77e3869b1b3eb7f10e78
|
| 3 |
+
size 4302346776
|
model-00160-of-000163.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:742babf1f416ff05ea53ac7ac1feb42117e4c5f30d314a801e5a6b33323c94e5
|
| 3 |
+
size 5230634696
|