Text Generation
Transformers
Safetensors
llama
deepseek
int4
vllm
llmcompressor
conversational
text-generation-inference
compressed-tensors
Instructions to use RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16") model = AutoModelForCausalLM.from_pretrained("RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16") 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 RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16
- SGLang
How to use RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16 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 "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16" \ --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": "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16", "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 "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16" \ --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": "RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16 with Docker Model Runner:
docker model run hf.co/RedHatAI/DeepSeek-R1-Distill-Llama-8B-quantized.w4a16
Update README.md
Browse files
README.md
CHANGED
|
@@ -209,15 +209,15 @@ lm_eval \
|
|
| 209 |
<tr>
|
| 210 |
<td rowspan="7"><b>OpenLLM V2</b></td>
|
| 211 |
<td>IFEval (Inst Level Strict Acc, 0-shot)</td>
|
| 212 |
-
<td>38.
|
| 213 |
<td>37.85</td>
|
| 214 |
<td>98.7%</td>
|
| 215 |
</tr>
|
| 216 |
<tr>
|
| 217 |
<td>BBH (Acc-Norm, 3-shot)</td>
|
| 218 |
-
<td>
|
| 219 |
-
<td>
|
| 220 |
-
<td>
|
| 221 |
</tr>
|
| 222 |
<tr>
|
| 223 |
<td>Math-Hard (Exact-Match, 4-shot)</td>
|
|
@@ -227,27 +227,27 @@ lm_eval \
|
|
| 227 |
</tr>
|
| 228 |
<tr>
|
| 229 |
<td>GPQA (Acc-Norm, 0-shot)</td>
|
| 230 |
-
<td>
|
| 231 |
-
<td>
|
| 232 |
-
<td>
|
| 233 |
</tr>
|
| 234 |
<tr>
|
| 235 |
<td>MUSR (Acc-Norm, 0-shot)</td>
|
| 236 |
-
<td>
|
| 237 |
-
<td>
|
| 238 |
-
<td>
|
| 239 |
</tr>
|
| 240 |
<tr>
|
| 241 |
<td>MMLU-Pro (Acc, 5-shot)</td>
|
| 242 |
-
<td>
|
| 243 |
-
<td>
|
| 244 |
-
<td>
|
| 245 |
</tr>
|
| 246 |
<tr>
|
| 247 |
<td><b>Average Score</b></td>
|
| 248 |
-
<td><b>
|
| 249 |
-
<td><b>
|
| 250 |
-
<td><b>
|
| 251 |
</tr>
|
| 252 |
<tr>
|
| 253 |
<td rowspan="4"><b>Coding</b></td>
|
|
|
|
| 209 |
<tr>
|
| 210 |
<td rowspan="7"><b>OpenLLM V2</b></td>
|
| 211 |
<td>IFEval (Inst Level Strict Acc, 0-shot)</td>
|
| 212 |
+
<td>38.37</td>
|
| 213 |
<td>37.85</td>
|
| 214 |
<td>98.7%</td>
|
| 215 |
</tr>
|
| 216 |
<tr>
|
| 217 |
<td>BBH (Acc-Norm, 3-shot)</td>
|
| 218 |
+
<td>7.43</td>
|
| 219 |
+
<td>6.48</td>
|
| 220 |
+
<td>---</td>
|
| 221 |
</tr>
|
| 222 |
<tr>
|
| 223 |
<td>Math-Hard (Exact-Match, 4-shot)</td>
|
|
|
|
| 227 |
</tr>
|
| 228 |
<tr>
|
| 229 |
<td>GPQA (Acc-Norm, 0-shot)</td>
|
| 230 |
+
<td>1.51</td>
|
| 231 |
+
<td>1.01</td>
|
| 232 |
+
<td>---</td>
|
| 233 |
</tr>
|
| 234 |
<tr>
|
| 235 |
<td>MUSR (Acc-Norm, 0-shot)</td>
|
| 236 |
+
<td>1.86</td>
|
| 237 |
+
<td>1.27</td>
|
| 238 |
+
<td>---</td>
|
| 239 |
</tr>
|
| 240 |
<tr>
|
| 241 |
<td>MMLU-Pro (Acc, 5-shot)</td>
|
| 242 |
+
<td>1.61</td>
|
| 243 |
+
<td>1.52</td>
|
| 244 |
+
<td>---</td>
|
| 245 |
</tr>
|
| 246 |
<tr>
|
| 247 |
<td><b>Average Score</b></td>
|
| 248 |
+
<td><b>8.47</b></td>
|
| 249 |
+
<td><b>8.02</b></td>
|
| 250 |
+
<td><b>---</b></td>
|
| 251 |
</tr>
|
| 252 |
<tr>
|
| 253 |
<td rowspan="4"><b>Coding</b></td>
|