Skip to content

Commit 70197c7

Browse files
arpannookala-12Harika
andauthored
cld2labs/DeepSeek-R1-Distill-Llama-8B (#96)
* feat: add DeepSeek-R1-Distill-Llama-8B model card and deployment guide for Dell EI Signed-off-by: arpannookala-12 <ganesh.arpan.nookala@cloud2labs.com> * update deepseek r1 distill llama 8b * Remove README.md from model-deployment folder --------- Signed-off-by: arpannookala-12 <ganesh.arpan.nookala@cloud2labs.com> Co-authored-by: Harika <codewith3@gmail.com>
1 parent 4d9093e commit 70197c7

2 files changed

Lines changed: 168 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
## Step 1: Prerequisites to Deploy DeepSeek-R1-Distill-Llama-8B Model on Xeon with Keycloak
2+
3+
Ensure the Enterprise Inference stack with Keycloak is already deployed before proceeding.
4+
5+
Edit `core/scripts/generate-token.sh` and set your values before sourcing it:
6+
7+
| Variable | Description |
8+
| ------------------------- | ------------------------------------------------------------------------ |
9+
| `BASE_URL` | Hostname of your cluster (e.g. `api.example.com`), without `https://` |
10+
| `KEYCLOAK_ADMIN_USERNAME` | Keycloak admin username |
11+
| `KEYCLOAK_PASSWORD` | Keycloak admin password |
12+
| `KEYCLOAK_CLIENT_ID` | Keycloak client ID configured during EI deployment |
13+
14+
Then run:
15+
16+
```bash
17+
export HUGGING_FACE_HUB_TOKEN="your_token_here"
18+
19+
cd ~/Enterprise-Inference
20+
source core/scripts/generate-token.sh
21+
```
22+
23+
This exports: `BASE_URL`, `KEYCLOAK_CLIENT_ID`, `KEYCLOAK_CLIENT_SECRET`, and `TOKEN`.
24+
25+
## Step 2: Deploy DeepSeek-R1-Distill-Llama-8B Model
26+
27+
```bash
28+
helm install deepseek-r1-distill-cpu ./core/helm-charts/vllm \
29+
--values ./core/helm-charts/vllm/xeon-values.yaml \
30+
--set LLM_MODEL_ID="deepseek-ai/DeepSeek-R1-Distill-Llama-8B" \
31+
--set global.HUGGINGFACEHUB_API_TOKEN="$HUGGING_FACE_HUB_TOKEN" \
32+
--set ingress.enabled=true \
33+
--set ingress.secretname="${BASE_URL}" \
34+
--set ingress.host="${BASE_URL}" \
35+
--set oidc.client_id="$KEYCLOAK_CLIENT_ID" \
36+
--set oidc.client_secret="$KEYCLOAK_CLIENT_SECRET" \
37+
--set apisix.enabled=true \
38+
--set tensor_parallel_size="1" \
39+
--set pipeline_parallel_size="1"
40+
```
41+
42+
## Step 3: Verify the Deployment
43+
44+
```bash
45+
kubectl get pods
46+
kubectl get apisixroutes
47+
```
48+
49+
Expected Output:
50+
51+
```
52+
NAME READY STATUS RESTARTS
53+
keycloak-0 1/1 Running 0
54+
keycloak-postgresql-0 1/1 Running 0
55+
deepseek-r1-distill-cpu-<hash>-<hash> 1/1 Running 0
56+
```
57+
58+
> Note: The pod name suffix `<hash>-<hash>` is auto-generated by Kubernetes and will differ on each deployment. Ensure all pods show `1/1 Running`.
59+
60+
```
61+
NAME HOSTS
62+
deepseek-r1-distill-cpu-apisixroute api.example.com
63+
```
64+
65+
## Step 4: Test the Deployed Model
66+
67+
```bash
68+
curl -k https://${BASE_URL}/DeepSeek-R1-Distill-Llama-8B-vllmcpu/v1/completions \
69+
-X POST \
70+
-H "Content-Type: application/json" \
71+
-H "Authorization: Bearer $TOKEN" \
72+
-d '{
73+
"model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
74+
"prompt": "What is Deep Learning?",
75+
"max_tokens": 25,
76+
"temperature": 0
77+
}'
78+
```
79+
80+
If successful, the model will return a completion response.
81+
82+
## To undeploy the model
83+
84+
```bash
85+
helm uninstall deepseek-r1-distill-cpu
86+
```
87+
88+
## Parameters
89+
90+
| Parameter | Description |
91+
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
92+
| `--set LLM_MODEL_ID="deepseek-ai/DeepSeek-R1-Distill-Llama-8B"`| Defines the target model from **Hugging Face** to deploy. |
93+
| `--set global.HUGGINGFACEHUB_API_TOKEN="..."` | Authenticates access to gated or private Hugging Face models. Replace with your own secure token. |
94+
| `--set ingress.enabled=true` | Enables Kubernetes **Ingress** to expose the model service externally. |
95+
| `--set ingress.host="${BASE_URL}"` | Public hostname or FQDN for the inference endpoint (maps to your Ingress controller IP). |
96+
| `--set ingress.secretname="${BASE_URL}"` | Kubernetes **TLS Secret** used for HTTPS termination at the ingress layer. |
97+
| `--set oidc.client_id="..."` | Keycloak OIDC client ID used for token-based authentication. |
98+
| `--set oidc.client_secret="..."` | Keycloak OIDC client secret corresponding to the client ID. |
99+
| `--set apisix.enabled=true` | Enables **APISIX** as the API gateway for routing and authentication. |
100+
| `--set tensor_parallel_size="1"` | Number of tensor parallel workers. Set to the number of available CPUs/GPUs per node. |
101+
| `--set pipeline_parallel_size="1"` | Number of pipeline parallel stages. Typically `1` for single-node deployments. |
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# DeepSeek-R1-Distill-Llama-8B
2+
3+
This model uses DeepSeek-R1-Llama-8B, an 8-billion-parameter reasoning model distilled from the larger DeepSeek-R1 family and built upon Meta’s Llama architecture. It is optimized for lightweight deployment, faster inference, and efficient reasoning performance while preserving strong capabilities in logic, dialogue, and code generation.
4+
DeepSeek’s R1 reinforcement learning process and distillation techniques enable this smaller variant to maintain high reasoning quality with substantially reduced computational requirements.
5+
6+
For complete technical details, licensing, evaluation metrics, and usage guidelines, please refer to the official Hugging Face model page:
7+
8+
https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B
9+
10+
This model provides inference-only access and is distributed under the DeepSeek license.
11+
12+
Ensure full compliance with the DeepSeek and Meta licensing terms before integrating this model into any application or service.
13+
14+
### Model Attribution
15+
16+
**Developer:** DeepSeek AI
17+
18+
**purpose:** Lightweight reasoning, dialogue, and code generation
19+
20+
**Sizes/Variants:** 8B distilled reasoning model
21+
22+
**Modalities:** Text → Text (Reasoning, Coding, and Dialogue)
23+
24+
**Parameter Size:** 8 billion
25+
26+
**Max Context:** ~64K tokens (backend dependent)
27+
28+
**License:** DeepSeek License (use-restricted; see Hugging Face page)
29+
30+
**Minimum required CPU Cores:** 157
31+
32+
### Usage Notice
33+
34+
**By using this model, you agree that:**
35+
36+
- All data is processed through the DeepSeek-R1-Llama-8B model hosted under the DeepSeek license.
37+
- You must follow the DeepSeek and Meta licensing requirements, including possible non-commercial or restricted-use clauses.
38+
- Generated content (text, reasoning traces, or code) must be validated for correctness and safety before production use.
39+
- The model must not be used to produce harmful content, misinformation, or automated decisions in critical or regulated domains.
40+
41+
### Intended Applications
42+
43+
- Lightweight and cost-efficient reasoning and problem-solving
44+
- Assistant-style multi-turn conversations
45+
- Code generation, completion, and debugging (Python, Go, JavaScript, etc.)
46+
- Educational tools, research prototypes, and RAG-based assistant systems
47+
- Baselines for fine-tuning and further distillation research
48+
- On-device or edge inference scenarios with GPU/memory constraints
49+
50+
### Limitations
51+
52+
- May produce inaccurate or incomplete reasoning steps
53+
- Smaller size may reduce performance on highly complex logic or long-context tasks
54+
- Not suited for safety-critical or regulated environments
55+
- License may restrict commercial use
56+
- Inference performance depends on optimized backends for smaller Llama-based models
57+
58+
### References
59+
60+
DeepSeek Official Site: https://deepseek.ai
61+
62+
Hugging Face Model Card: https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B
63+
64+
Llama Architecture Reference: https://huggingface.co/meta-llama
65+
66+
67+

0 commit comments

Comments
 (0)