Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
text-generation-inference
compressed-tensors
Instructions to use ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", 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("ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", 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 ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g
- SGLang
How to use ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g 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 "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g" \ --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": "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", "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 "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g" \ --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": "ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g with Docker Model Runner:
docker model run hf.co/ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,19 +29,23 @@ Model outputs were generated with the vLLM engine.
|
|
| 29 |
|
| 30 |
For reasoning tasks we estimate pass@1 based on 10 runs with different seeds and `temperature=0.6`, `top_p=0.95` and `max_new_tokens=32768`.
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
| 35 |
-
|
|
| 36 |
-
|
|
| 37 |
-
|
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
## Reproduction
|
| 47 |
|
|
|
|
| 29 |
|
| 30 |
For reasoning tasks we estimate pass@1 based on 10 runs with different seeds and `temperature=0.6`, `top_p=0.95` and `max_new_tokens=32768`.
|
| 31 |
|
| 32 |
+
#### OpenLLM Leaderboard V1 tasks
|
| 33 |
+
|
| 34 |
+
| | Recovery (%) | Average Score | ARC-Challenge<br>acc_norm, 25-shot | GSM8k<br>exact_match, 5-shot | HellaSwag<br>acc_norm, 10-shot | MMLU<br>acc, 5-shot | TruthfulQA<br>mc2, 0-shot | WinoGrande<br>acc, 5-shot |
|
| 35 |
+
| :------------------------------------------: | :----------: | :-----------: | :--------------------------------: | :--------------------------: | :----------------------------: | :-----------------: | :-----------------------: | :-----------------------: |
|
| 36 |
+
| deepseek/DeepSeek-R1 | 100.00 | 81.04 | 72.53 | 95.91 | 89.30 | 87.22 | 59.28 | 82.00 |
|
| 37 |
+
| cognitivecomputations/DeepSeek-R1-AWQ | 100.07 | 81.10 | 73.12 | 95.15 | 89.07 | 86.86 | 60.09 | 82.32 |
|
| 38 |
+
| ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g <br> **(this model)** | 99.86 | 80.93 | 72.70 | 95.68 | 89.25 | 86.83 | 58.77 | 82.32 |
|
| 39 |
+
| ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g-experts | 100.30 | 81.28 | 72.53 | 95.68 | 89.36 | 86.99 | 59.77 | 83.35 |
|
| 40 |
+
|
| 41 |
+
#### Reasoning tasks (AIME-24, GPQA-Diamond, MATH-500)
|
| 42 |
+
|
| 43 |
+
| | Recovery (%) | Average Score | AIME 2024<br>pass@1 | MATH-500<br>pass@1 | GPQA Diamond<br>pass@1 |
|
| 44 |
+
| -------------------------------------------- | :----------: | :-----------: | :-----------------: | :----------------: | :--------------------: |
|
| 45 |
+
| deepseek/DeepSeek-R1 | 100.00 | 82.99 | 78.33 | 97.24 | 73.38 |
|
| 46 |
+
| cognitivecomputations/DeepSeek-R1-AWQ | 94.29 | 78.25 | 70.67 | 93.64 | 70.46 |
|
| 47 |
+
| ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g <br> **(this model)** | 96.52 | 80.10 | 72.96 | 97.09 | 70.26 |
|
| 48 |
+
| ISTA-DASLab/DeepSeek-R1-GPTQ-4b-128g-experts | 98.81 | 82.00 | 77.00 | 97.08 | 71.92 |
|
| 49 |
|
| 50 |
## Reproduction
|
| 51 |
|