初始化项目,由ModelHub XC社区提供模型
Model: RedHatAI/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8 Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
782
README.md
Normal file
782
README.md
Normal file
@@ -0,0 +1,782 @@
|
||||
---
|
||||
license: mit
|
||||
tags:
|
||||
- deepseek
|
||||
- int8
|
||||
- vllm
|
||||
- llmcompressor
|
||||
base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
||||
library_name: transformers
|
||||
---
|
||||
|
||||
# DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8
|
||||
|
||||
## Model Overview
|
||||
- **Model Architecture:** Qwen2ForCausalLM
|
||||
- **Input:** Text
|
||||
- **Output:** Text
|
||||
- **Model Optimizations:**
|
||||
- **Weight quantization:** INT8
|
||||
- **Activation quantization:** INT8
|
||||
- **Release Date:** 2/4/2025
|
||||
- **Version:** 1.0
|
||||
- **Model Developers:** Neural Magic
|
||||
|
||||
Quantized version of [DeepSeek-R1-Distill-Qwen-14B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B).
|
||||
|
||||
|
||||
### Model Optimizations
|
||||
|
||||
This model was obtained by quantizing the weights and activations of [DeepSeek-R1-Distill-Qwen-14B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B) to INT8 data type.
|
||||
This optimization reduces the number of bits used to represent weights and activations from 16 to 8, reducing GPU memory requirements (by approximately 50%) and increasing matrix-multiply compute throughput (by approximately 2x).
|
||||
Weight quantization also reduces disk size requirements by approximately 50%.
|
||||
|
||||
Only the weights and activations of the linear operators within transformers blocks are quantized.
|
||||
Weights are quantized using a symmetric per-channel scheme, whereas quantizations are quantized using a symmetric per-token scheme.
|
||||
The [GPTQ](https://arxiv.org/abs/2210.17323) algorithm is applied for quantization, as implemented in the [llm-compressor](https://github.com/vllm-project/llm-compressor) library.
|
||||
|
||||
|
||||
## Use with vLLM
|
||||
|
||||
This model can be deployed efficiently using the [vLLM](https://docs.vllm.ai/en/latest/) backend, as shown in the example below.
|
||||
|
||||
```python
|
||||
from transformers import AutoTokenizer
|
||||
from vllm import LLM, SamplingParams
|
||||
|
||||
number_gpus = 1
|
||||
model_name = "neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8"
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||
sampling_params = SamplingParams(temperature=0.6, max_tokens=256, stop_token_ids=[tokenizer.eos_token_id])
|
||||
llm = LLM(model=model_name, tensor_parallel_size=number_gpus, trust_remote_code=True)
|
||||
|
||||
messages_list = [
|
||||
[{"role": "user", "content": "Who are you? Please respond in pirate speak!"}],
|
||||
]
|
||||
|
||||
prompt_token_ids = [tokenizer.apply_chat_template(messages, add_generation_prompt=True) for messages in messages_list]
|
||||
|
||||
outputs = llm.generate(prompt_token_ids=prompt_token_ids, sampling_params=sampling_params)
|
||||
|
||||
generated_text = [output.outputs[0].text for output in outputs]
|
||||
print(generated_text)
|
||||
```
|
||||
|
||||
vLLM also supports OpenAI-compatible serving. See the [documentation](https://docs.vllm.ai/en/latest/) for more details.
|
||||
|
||||
## Creation
|
||||
|
||||
This model was created with [llm-compressor](https://github.com/vllm-project/llm-compressor) by running the code snippet below.
|
||||
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
from llmcompressor.modifiers.quantization import QuantizationModifier
|
||||
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
||||
from llmcompressor.transformers import oneshot
|
||||
|
||||
# Load model
|
||||
model_stub = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
|
||||
model_name = model_stub.split("/")[-1]
|
||||
|
||||
num_samples = 1024
|
||||
max_seq_len = 8192
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_stub)
|
||||
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
model_stub,
|
||||
device_map="auto",
|
||||
torch_dtype="auto",
|
||||
)
|
||||
|
||||
def preprocess_fn(example):
|
||||
return {"text": tokenizer.apply_chat_template(example["messages"], add_generation_prompt=False, tokenize=False)}
|
||||
|
||||
ds = load_dataset("neuralmagic/LLM_compression_calibration", split="train")
|
||||
ds = ds.map(preprocess_fn)
|
||||
|
||||
# Configure the quantization algorithm and scheme
|
||||
recipe = [
|
||||
SmoothQuantModifier(smoothing_strength=0.8),
|
||||
QuantizationModifier(
|
||||
targets="Linear",
|
||||
scheme="W8A8",
|
||||
ignore=["lm_head"],
|
||||
dampening_frac=0.1,
|
||||
),
|
||||
]
|
||||
|
||||
# Apply quantization
|
||||
oneshot(
|
||||
model=model,
|
||||
dataset=ds,
|
||||
recipe=recipe,
|
||||
max_seq_length=max_seq_len,
|
||||
num_calibration_samples=num_samples,
|
||||
)
|
||||
|
||||
# Save to disk in compressed-tensors format
|
||||
save_path = model_name + "-quantized.w8a8
|
||||
model.save_pretrained(save_path)
|
||||
tokenizer.save_pretrained(save_path)
|
||||
print(f"Model and tokenizer saved to: {save_path}")
|
||||
```
|
||||
|
||||
## Evaluation
|
||||
|
||||
The model was evaluated on OpenLLM Leaderboard [V1](https://huggingface.co/spaces/open-llm-leaderboard-old/open_llm_leaderboard) and [V2](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/), using the following commands:
|
||||
|
||||
OpenLLM Leaderboard V1:
|
||||
```
|
||||
lm_eval \
|
||||
--model vllm \
|
||||
--model_args pretrained="neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8",dtype=auto,max_model_len=4096,tensor_parallel_size=1,enable_chunked_prefill=True \
|
||||
--tasks openllm \
|
||||
--write_out \
|
||||
--batch_size auto \
|
||||
--output_path output_dir \
|
||||
--show_config
|
||||
```
|
||||
|
||||
OpenLLM Leaderboard V2:
|
||||
```
|
||||
lm_eval \
|
||||
--model vllm \
|
||||
--model_args pretrained="neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8",dtype=auto,max_model_len=4096,tensor_parallel_size=1,enable_chunked_prefill=True \
|
||||
--apply_chat_template \
|
||||
--fewshot_as_multiturn \
|
||||
--tasks leaderboard \
|
||||
--write_out \
|
||||
--batch_size auto \
|
||||
--output_path output_dir \
|
||||
--show_config
|
||||
```
|
||||
|
||||
### Accuracy
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Metric</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8</th>
|
||||
<th>Recovery</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="4"><b>Reasoning</b></td>
|
||||
<td>AIME 2024 (pass@1)</td>
|
||||
<td>66.67</td>
|
||||
<td>66.31</td>
|
||||
<td>99.46%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MATH-500 (pass@1)</td>
|
||||
<td>94.66</td>
|
||||
<td>94.68</td>
|
||||
<td>100.02%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPQA Diamond (pass@1)</td>
|
||||
<td>59.35</td>
|
||||
<td>58.32</td>
|
||||
<td>98.26%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Average Score</b></td>
|
||||
<td><b>73.56</b></td>
|
||||
<td><b>73.1</b></td>
|
||||
<td><b>99.37%</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="7"><b>OpenLLM V1</b></td>
|
||||
<td>ARC-Challenge (Acc-Norm, 25-shot)</td>
|
||||
<td>58.79</td>
|
||||
<td>57.85</td>
|
||||
<td>98.4%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GSM8K (Strict-Match, 5-shot)</td>
|
||||
<td>87.04</td>
|
||||
<td>87.79</td>
|
||||
<td>100.9%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HellaSwag (Acc-Norm, 10-shot)</td>
|
||||
<td>81.51</td>
|
||||
<td>81.04</td>
|
||||
<td>99.4%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MMLU (Acc, 5-shot)</td>
|
||||
<td>74.46</td>
|
||||
<td>74.26</td>
|
||||
<td>99.7%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TruthfulQA (MC2, 0-shot)</td>
|
||||
<td>54.77</td>
|
||||
<td>54.94</td>
|
||||
<td>100.3%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Winogrande (Acc, 5-shot)</td>
|
||||
<td>69.38</td>
|
||||
<td>70.48</td>
|
||||
<td>101.6%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Average Score</b></td>
|
||||
<td><b>70.99</b></td>
|
||||
<td><b>71.06</b></td>
|
||||
<td><b>100.1%</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="7"><b>OpenLLM V2</b></td>
|
||||
<td>IFEval (Inst Level Strict Acc, 0-shot)</td>
|
||||
<td>42.11</td>
|
||||
<td>41.62</td>
|
||||
<td>98.6%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>BBH (Acc-Norm, 3-shot)</td>
|
||||
<td>13.73</td>
|
||||
<td>14.29</td>
|
||||
<td>---</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Math-Hard (Exact-Match, 4-shot)</td>
|
||||
<td>0.00</td>
|
||||
<td>0.00</td>
|
||||
<td>---</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPQA (Acc-Norm, 0-shot)</td>
|
||||
<td>35.07</td>
|
||||
<td>37.22</td>
|
||||
<td>106.2%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MUSR (Acc-Norm, 0-shot)</td>
|
||||
<td>45.14</td>
|
||||
<td>43.56</td>
|
||||
<td>96.5%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MMLU-Pro (Acc, 5-shot)</td>
|
||||
<td>34.86</td>
|
||||
<td>33.63</td>
|
||||
<td>96.5%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Average Score</b></td>
|
||||
<td><b>34.21</b></td>
|
||||
<td><b>34.12</b></td>
|
||||
<td><b>99.7%</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4"><b>Coding</b></td>
|
||||
<td>HumanEval (pass@1)</td>
|
||||
<td>78.90</td>
|
||||
<td>78.40</td>
|
||||
<td><b>99.4%</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HumanEval (pass@10)</td>
|
||||
<td>89.80</td>
|
||||
<td>90.10</td>
|
||||
<td>100.3%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HumanEval+ (pass@10)</td>
|
||||
<td>72.60</td>
|
||||
<td>72.40</td>
|
||||
<td>99.7%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HumanEval+ (pass@10)</td>
|
||||
<td>84.90</td>
|
||||
<td>84.90</td>
|
||||
<td>100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Inference Performance
|
||||
|
||||
|
||||
This model achieves up to 1.6x speedup in both single-stream and multi-stream asynchronous deployment, depending on hardware and use-case scenario.
|
||||
The following performance benchmarks were conducted with [vLLM](https://docs.vllm.ai/en/latest/) version 0.7.2, and [GuideLLM](https://github.com/neuralmagic/guidellm).
|
||||
|
||||
<details>
|
||||
<summary>Benchmarking Command</summary>
|
||||
|
||||
```
|
||||
guidellm --model neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8 --target "http://localhost:8000/v1" --data-type emulated --data "prompt_tokens=<prompt_tokens>,generated_tokens=<generated_tokens>" --max seconds 360 --backend aiohttp_server
|
||||
```
|
||||
</details>
|
||||
|
||||
### Single-stream performance (measured with vLLM version 0.7.2)
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th style="text-align: center;" colspan="2" >Instruction Following<br>256 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >Multi-turn Chat<br>512 / 256</th>
|
||||
<th style="text-align: center;" colspan="2" >Docstring Generation<br>768 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >RAG<br>1024 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >Code Completion<br>256 / 1024</th>
|
||||
<th style="text-align: center;" colspan="2" >Code Fixing<br>1024 / 1024</th>
|
||||
<th style="text-align: center;" colspan="2" >Large Summarization<br>4096 / 512</th>
|
||||
<th style="text-align: center;" colspan="2" >Large RAG<br>10240 / 1536</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hardware</th>
|
||||
<th>Model</th>
|
||||
<th>Average cost reduction</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
<th>Latency (s)</th>
|
||||
<th>QPD</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="text-align: center" >
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">A6000x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>5.4</td>
|
||||
<td>837</td>
|
||||
<td>10.7</td>
|
||||
<td>419</td>
|
||||
<td>5.5</td>
|
||||
<td>813</td>
|
||||
<td>5.6</td>
|
||||
<td>805</td>
|
||||
<td>42.2</td>
|
||||
<td>107</td>
|
||||
<td>42.8</td>
|
||||
<td>105</td>
|
||||
<td>22.9</td>
|
||||
<td>197</td>
|
||||
<td>71.7</td>
|
||||
<td>63</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8</th>
|
||||
<td>1.59</td>
|
||||
<td>3.3</td>
|
||||
<td>1345</td>
|
||||
<td>6.7</td>
|
||||
<td>673</td>
|
||||
<td>3.4</td>
|
||||
<td>1315</td>
|
||||
<td>3.5</td>
|
||||
<td>1296</td>
|
||||
<td>26.5</td>
|
||||
<td>170</td>
|
||||
<td>26.8</td>
|
||||
<td>168</td>
|
||||
<td>14.5</td>
|
||||
<td>310</td>
|
||||
<td>48.3</td>
|
||||
<td>93</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>2.51</td>
|
||||
<td>2.0</td>
|
||||
<td>2275</td>
|
||||
<td>4.0</td>
|
||||
<td>1127</td>
|
||||
<td>2.2</td>
|
||||
<td>2072</td>
|
||||
<td>2.3</td>
|
||||
<td>1945</td>
|
||||
<td>15.3</td>
|
||||
<td>294</td>
|
||||
<td>15.9</td>
|
||||
<td>283</td>
|
||||
<td>9.9</td>
|
||||
<td>456</td>
|
||||
<td>36.6</td>
|
||||
<td>123</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">A100x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>2.6</td>
|
||||
<td>765</td>
|
||||
<td>5.2</td>
|
||||
<td>383</td>
|
||||
<td>2.7</td>
|
||||
<td>746</td>
|
||||
<td>2.7</td>
|
||||
<td>732</td>
|
||||
<td>20.8</td>
|
||||
<td>97</td>
|
||||
<td>21.2</td>
|
||||
<td>95</td>
|
||||
<td>11.3</td>
|
||||
<td>179</td>
|
||||
<td>36.7</td>
|
||||
<td>55</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8</th>
|
||||
<td>1.34</td>
|
||||
<td>1.9</td>
|
||||
<td>1072</td>
|
||||
<td>3.8</td>
|
||||
<td>533</td>
|
||||
<td>1.9</td>
|
||||
<td>1045</td>
|
||||
<td>1.9</td>
|
||||
<td>1032</td>
|
||||
<td>14.8</td>
|
||||
<td>136</td>
|
||||
<td>15.2</td>
|
||||
<td>132</td>
|
||||
<td>8.1</td>
|
||||
<td>248</td>
|
||||
<td>39.6</td>
|
||||
<td>51</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>1.93</td>
|
||||
<td>1.2</td>
|
||||
<td>1627</td>
|
||||
<td>2.5</td>
|
||||
<td>810</td>
|
||||
<td>1.3</td>
|
||||
<td>1530</td>
|
||||
<td>1.4</td>
|
||||
<td>1474</td>
|
||||
<td>9.7</td>
|
||||
<td>208</td>
|
||||
<td>10.2</td>
|
||||
<td>197</td>
|
||||
<td>5.8</td>
|
||||
<td>348</td>
|
||||
<td>37.6</td>
|
||||
<td>53</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">H100x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>1.6</td>
|
||||
<td>672</td>
|
||||
<td>3.3</td>
|
||||
<td>334</td>
|
||||
<td>1.7</td>
|
||||
<td>662</td>
|
||||
<td>1.7</td>
|
||||
<td>652</td>
|
||||
<td>12.8</td>
|
||||
<td>85</td>
|
||||
<td>13.0</td>
|
||||
<td>84</td>
|
||||
<td>7.0</td>
|
||||
<td>155</td>
|
||||
<td>25.2</td>
|
||||
<td>43</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-FP8-dynamic</th>
|
||||
<td>1.33</td>
|
||||
<td>1.2</td>
|
||||
<td>925</td>
|
||||
<td>2.3</td>
|
||||
<td>467</td>
|
||||
<td>1.2</td>
|
||||
<td>908</td>
|
||||
<td>1.2</td>
|
||||
<td>896</td>
|
||||
<td>9.3</td>
|
||||
<td>118</td>
|
||||
<td>9.5</td>
|
||||
<td>115</td>
|
||||
<td>5.2</td>
|
||||
<td>210</td>
|
||||
<td>23.9</td>
|
||||
<td>46</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>1.37</td>
|
||||
<td>1.2</td>
|
||||
<td>944</td>
|
||||
<td>2.3</td>
|
||||
<td>474</td>
|
||||
<td>1.2</td>
|
||||
<td>931</td>
|
||||
<td>1.2</td>
|
||||
<td>907</td>
|
||||
<td>9.1</td>
|
||||
<td>121</td>
|
||||
<td>9.2</td>
|
||||
<td>119</td>
|
||||
<td>5.1</td>
|
||||
<td>214</td>
|
||||
<td>22.5</td>
|
||||
<td>49</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Use case profiles: prompt tokens / generation tokens
|
||||
|
||||
**QPD: Queries per dollar, based on on-demand cost at [Lambda Labs](https://lambdalabs.com/service/gpu-cloud) (observed on 2/18/2025).
|
||||
|
||||
|
||||
### Multi-stream asynchronous performance (measured with vLLM version 0.7.2)
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th style="text-align: center;" colspan="2" >Instruction Following<br>256 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >Multi-turn Chat<br>512 / 256</th>
|
||||
<th style="text-align: center;" colspan="2" >Docstring Generation<br>768 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >RAG<br>1024 / 128</th>
|
||||
<th style="text-align: center;" colspan="2" >Code Completion<br>256 / 1024</th>
|
||||
<th style="text-align: center;" colspan="2" >Code Fixing<br>1024 / 1024</th>
|
||||
<th style="text-align: center;" colspan="2" >Large Summarization<br>4096 / 512</th>
|
||||
<th style="text-align: center;" colspan="2" >Large RAG<br>10240 / 1536</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hardware</th>
|
||||
<th>Model</th>
|
||||
<th>Average cost reduction</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
<th>Maximum throughput (QPS)</th>
|
||||
<th>QPD</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="text-align: center" >
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">A6000x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>13.7</td>
|
||||
<td>30785</td>
|
||||
<td>5.5</td>
|
||||
<td>12327</td>
|
||||
<td>6.5</td>
|
||||
<td>14517</td>
|
||||
<td>5.1</td>
|
||||
<td>11439</td>
|
||||
<td>2.0</td>
|
||||
<td>4434</td>
|
||||
<td>1.3</td>
|
||||
<td>2982</td>
|
||||
<td>0.6</td>
|
||||
<td>1462</td>
|
||||
<td>0.2</td>
|
||||
<td>371</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8</th>
|
||||
<td>1.44</td>
|
||||
<td>21.4</td>
|
||||
<td>48181</td>
|
||||
<td>8.2</td>
|
||||
<td>18421</td>
|
||||
<td>9.8</td>
|
||||
<td>22051</td>
|
||||
<td>7.8</td>
|
||||
<td>17462</td>
|
||||
<td>2.8</td>
|
||||
<td>6281</td>
|
||||
<td>1.7</td>
|
||||
<td>3758</td>
|
||||
<td>1.0</td>
|
||||
<td>2335</td>
|
||||
<td>0.2</td>
|
||||
<td>419</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>0.98</td>
|
||||
<td>12.7</td>
|
||||
<td>28540</td>
|
||||
<td>5.7</td>
|
||||
<td>12796</td>
|
||||
<td>5.4</td>
|
||||
<td>12218</td>
|
||||
<td>3.7</td>
|
||||
<td>8401</td>
|
||||
<td>2.5</td>
|
||||
<td>5583</td>
|
||||
<td>1.3</td>
|
||||
<td>2987</td>
|
||||
<td>0.7</td>
|
||||
<td>1489</td>
|
||||
<td>0.2</td>
|
||||
<td>368</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">A100x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>15.6</td>
|
||||
<td>31306</td>
|
||||
<td>7.1</td>
|
||||
<td>14192</td>
|
||||
<td>7.7</td>
|
||||
<td>15435</td>
|
||||
<td>6.0</td>
|
||||
<td>11971</td>
|
||||
<td>2.4</td>
|
||||
<td>4878</td>
|
||||
<td>1.6</td>
|
||||
<td>3298</td>
|
||||
<td>0.9</td>
|
||||
<td>1862</td>
|
||||
<td>0.2</td>
|
||||
<td>355</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w8a8</th>
|
||||
<td>1.31</td>
|
||||
<td>20.8</td>
|
||||
<td>41907</td>
|
||||
<td>9.3</td>
|
||||
<td>18724</td>
|
||||
<td>10.5</td>
|
||||
<td>21043</td>
|
||||
<td>8.4</td>
|
||||
<td>16886</td>
|
||||
<td>3.0</td>
|
||||
<td>5975</td>
|
||||
<td>1.9</td>
|
||||
<td>3917</td>
|
||||
<td>1.2</td>
|
||||
<td>2481</td>
|
||||
<td>0.2</td>
|
||||
<td>464</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>0.94</td>
|
||||
<td>14.0</td>
|
||||
<td>28146</td>
|
||||
<td>6.5</td>
|
||||
<td>13042</td>
|
||||
<td>6.5</td>
|
||||
<td>12987</td>
|
||||
<td>5.1</td>
|
||||
<td>10194</td>
|
||||
<td>2.6</td>
|
||||
<td>5269</td>
|
||||
<td>1.5</td>
|
||||
<td>2925</td>
|
||||
<td>0.9</td>
|
||||
<td>1849</td>
|
||||
<td>0.2</td>
|
||||
<td>382</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3" valign="top">H100x1</th>
|
||||
<th>deepseek-ai/DeepSeek-R1-Distill-Qwen-14B</th>
|
||||
<td>---</td>
|
||||
<td>31.4</td>
|
||||
<td>34404</td>
|
||||
<td>14.1</td>
|
||||
<td>15482</td>
|
||||
<td>16.6</td>
|
||||
<td>18149</td>
|
||||
<td>13.3</td>
|
||||
<td>14572</td>
|
||||
<td>4.7</td>
|
||||
<td>5099</td>
|
||||
<td>2.6</td>
|
||||
<td>2849</td>
|
||||
<td>1.9</td>
|
||||
<td>2060</td>
|
||||
<td>0.3</td>
|
||||
<td>347</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-FP8-dynamic</th>
|
||||
<td>1.31</td>
|
||||
<td>40.9</td>
|
||||
<td>44729</td>
|
||||
<td>18.5</td>
|
||||
<td>20260</td>
|
||||
<td>22.1</td>
|
||||
<td>24165</td>
|
||||
<td>18.1</td>
|
||||
<td>19779</td>
|
||||
<td>5.7</td>
|
||||
<td>6246</td>
|
||||
<td>3.4</td>
|
||||
<td>3681</td>
|
||||
<td>2.5</td>
|
||||
<td>2746</td>
|
||||
<td>0.4</td>
|
||||
<td>474</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>neuralmagic/DeepSeek-R1-Distill-Qwen-14B-quantized.w4a16</th>
|
||||
<td>1.12</td>
|
||||
<td>33.3</td>
|
||||
<td>36387</td>
|
||||
<td>15.0</td>
|
||||
<td>16453</td>
|
||||
<td>17.6</td>
|
||||
<td>19241</td>
|
||||
<td>14.2</td>
|
||||
<td>15576</td>
|
||||
<td>4.6</td>
|
||||
<td>5034</td>
|
||||
<td>3.0</td>
|
||||
<td>3292</td>
|
||||
<td>2.2</td>
|
||||
<td>2412</td>
|
||||
<td>0.4</td>
|
||||
<td>481</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Use case profiles: prompt tokens / generation tokens
|
||||
|
||||
**QPS: Queries per second.
|
||||
|
||||
**QPD: Queries per dollar, based on on-demand cost at [Lambda Labs](https://lambdalabs.com/service/gpu-cloud) (observed on 2/18/2025).
|
||||
3
config.json
Normal file
3
config.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c7e375be6515d901db874f4857cfd8c68a1f64f96c9814972b318de1282ea046
|
||||
size 16260
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||
9
generation_config.json
Normal file
9
generation_config.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 151646,
|
||||
"do_sample": true,
|
||||
"eos_token_id": 151643,
|
||||
"temperature": 0.6,
|
||||
"top_p": 0.95,
|
||||
"transformers_version": "4.48.0"
|
||||
}
|
||||
3
model-00001-of-00004.safetensors
Normal file
3
model-00001-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:062bead12da833edb2fd0122beb0d6c77d7e769d043f54ff76ecde4bf0da6558
|
||||
size 4995436856
|
||||
3
model-00002-of-00004.safetensors
Normal file
3
model-00002-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ef72a16238b353844cff9e4314d11d2744ec33c793f4321556a121ac6e817059
|
||||
size 4956808544
|
||||
3
model-00003-of-00004.safetensors
Normal file
3
model-00003-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b6273444e56023f75564968b5a0604220c81c9a6bb315b4b33d7dc267c22812b
|
||||
size 4823057400
|
||||
3
model-00004-of-00004.safetensors
Normal file
3
model-00004-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:86de18dbfacc651b42c3828fd70aadbce3f2e3cb9ba8bc27b2c38634caa033d4
|
||||
size 1557135488
|
||||
3
model.safetensors.index.json
Normal file
3
model.safetensors.index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5c3536ebf41d514dd2f0cf89fa423a1d4cbe999917a4a0666632a852fd3a321
|
||||
size 76778
|
||||
21
recipe.yaml
Normal file
21
recipe.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
quant_stage:
|
||||
quant_modifiers:
|
||||
SmoothQuantModifier:
|
||||
smoothing_strength: 0.8
|
||||
mappings:
|
||||
- - ['re:.*q_proj', 're:.*k_proj', 're:.*v_proj']
|
||||
- re:.*input_layernorm
|
||||
- - ['re:.*gate_proj', 're:.*up_proj']
|
||||
- re:.*post_attention_layernorm
|
||||
- - ['re:.*down_proj']
|
||||
- re:.*up_proj
|
||||
GPTQModifier:
|
||||
sequential_update: true
|
||||
dampening_frac: 0.1
|
||||
ignore: [lm_head]
|
||||
config_groups:
|
||||
group_0:
|
||||
targets: [Linear]
|
||||
weights: {num_bits: 8, type: int, symmetric: true, strategy: channel, observer: mse}
|
||||
input_activations: {num_bits: 8, type: int, symmetric: true, strategy: token, dynamic: true,
|
||||
observer: memoryless}
|
||||
23
special_tokens_map.json
Normal file
23
special_tokens_map.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<|begin▁of▁sentence|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|end▁of▁sentence|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<|end▁of▁sentence|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88145e3c3249adc2546ede277e9819d6e405e19072456e4b521cbc724bd60773
|
||||
size 7031660
|
||||
3
tokenizer_config.json
Normal file
3
tokenizer_config.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ac8c85fb242563c2260baec0909debd69d718af6a0b3d90e6cab62b4d341cd5
|
||||
size 3071
|
||||
Reference in New Issue
Block a user