Text Generation
Transformers
Safetensors
deepseek_v3
DeepSeek-R1-0528
GPTQ
Int4-Int8Mix
量化修复
vLLM
conversational
custom_code
text-generation-inference
4-bit precision
gptq
Instructions to use QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", 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("QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", 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
- vLLM
How to use QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact
- SGLang
How to use QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact 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 "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact" \ --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": "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", "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 "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact" \ --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": "QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact with Docker Model Runner:
docker model run hf.co/QuantTrio/DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Compact
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,10 +26,11 @@ Preliminary trials show that converting the entire model to pure Int4 (AWQ/GPTQ)
|
|
| 26 |
|
| 27 |
Variant Overview
|
| 28 |
|
| 29 |
-
| Variant | Characteristics
|
| 30 |
-
|-------------|-------------------------------------------------------------------------|-----------|----------------------------------------------------------|
|
| 31 |
-
| **
|
| 32 |
-
| **
|
|
|
|
| 33 |
|
| 34 |
Choose the variant that best matches your hardware and quality requirements.
|
| 35 |
|
|
|
|
| 26 |
|
| 27 |
Variant Overview
|
| 28 |
|
| 29 |
+
| Variant | Characteristics | File Size | Recommended Scenario |
|
| 30 |
+
|-------------|---------------------------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------|
|
| 31 |
+
| **Lite** | Only the most critical layers upgraded to Int8; size close to pure Int4 | 355 GB | Resource-constrained, lightweight server deployments |
|
| 32 |
+
| **Compact** | More Int8 layers, relatively higher output quality | 414 GB | VRAM-sufficient deployments focused on answer quality (e.g., 8 × A100) |
|
| 33 |
+
| **Medium** | Compact plus fully-Int8 attention layers; high quality with reduced long-context loss | 445 GB | VRAM-rich deployments needing both top answer quality and high concurrency (e.g., 8 × H20) |
|
| 34 |
|
| 35 |
Choose the variant that best matches your hardware and quality requirements.
|
| 36 |
|