Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
grpo
conversational
text-generation-inference
Instructions to use leonMW/DeepSeek-R1-Distill-Qwen-14B-S with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leonMW/DeepSeek-R1-Distill-Qwen-14B-S with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leonMW/DeepSeek-R1-Distill-Qwen-14B-S") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("leonMW/DeepSeek-R1-Distill-Qwen-14B-S") model = AutoModelForCausalLM.from_pretrained("leonMW/DeepSeek-R1-Distill-Qwen-14B-S", device_map="auto") 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 Settings
- vLLM
How to use leonMW/DeepSeek-R1-Distill-Qwen-14B-S with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leonMW/DeepSeek-R1-Distill-Qwen-14B-S" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leonMW/DeepSeek-R1-Distill-Qwen-14B-S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leonMW/DeepSeek-R1-Distill-Qwen-14B-S
- SGLang
How to use leonMW/DeepSeek-R1-Distill-Qwen-14B-S 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 "leonMW/DeepSeek-R1-Distill-Qwen-14B-S" \ --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": "leonMW/DeepSeek-R1-Distill-Qwen-14B-S", "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 "leonMW/DeepSeek-R1-Distill-Qwen-14B-S" \ --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": "leonMW/DeepSeek-R1-Distill-Qwen-14B-S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use leonMW/DeepSeek-R1-Distill-Qwen-14B-S with Docker Model Runner:
docker model run hf.co/leonMW/DeepSeek-R1-Distill-Qwen-14B-S
Training in progress, epoch 1
Browse files- README.md +2 -3
- generation_config.json +3 -1
- model-00001-of-00006.safetensors +1 -1
- model-00002-of-00006.safetensors +1 -1
- model-00003-of-00006.safetensors +1 -1
- model-00004-of-00006.safetensors +1 -1
- model-00005-of-00006.safetensors +1 -1
- model-00006-of-00006.safetensors +1 -1
- tokenizer_config.json +4 -0
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
| 3 |
library_name: transformers
|
| 4 |
model_name: DeepSeek-R1-Distill-Qwen-14B-S
|
| 5 |
tags:
|
|
@@ -11,7 +10,7 @@ licence: license
|
|
| 11 |
|
| 12 |
# Model Card for DeepSeek-R1-Distill-Qwen-14B-S
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
@@ -27,7 +26,7 @@ print(output["generated_text"])
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/leonwenderoth-tu-darmstadt/huggingface/runs/
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
model_name: DeepSeek-R1-Distill-Qwen-14B-S
|
| 4 |
tags:
|
|
|
|
| 10 |
|
| 11 |
# Model Card for DeepSeek-R1-Distill-Qwen-14B-S
|
| 12 |
|
| 13 |
+
This model is a fine-tuned version of [None](https://huggingface.co/None).
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
|
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/leonwenderoth-tu-darmstadt/huggingface/runs/u947p8om)
|
| 30 |
|
| 31 |
|
| 32 |
This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
|
generation_config.json
CHANGED
|
@@ -2,7 +2,9 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 151646,
|
| 4 |
"do_sample": true,
|
| 5 |
-
"eos_token_id":
|
|
|
|
|
|
|
| 6 |
"pad_token_id": 151643,
|
| 7 |
"temperature": 0.6,
|
| 8 |
"top_p": 0.95,
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 151646,
|
| 4 |
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151643
|
| 7 |
+
],
|
| 8 |
"pad_token_id": 151643,
|
| 9 |
"temperature": 0.6,
|
| 10 |
"top_p": 0.95,
|
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4986211280
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a183340b279417b0695c471d5caf1e1db178076bb37fca5d342703bf5ff93e3
|
| 3 |
size 4986211280
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4954847344
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37fcb1582b392cd6b27687ca9078984234d1318d0f8cc9b51b1354e691ea3f64
|
| 3 |
size 4954847344
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4954847392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac0ef80663f0ac45e6fd7e2ba6f69585409539ab61fa0f286a188f9381b2769a
|
| 3 |
size 4954847392
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4954847392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:915b593df09fa72d0a1ad62a3d9b7c3dd2943584abbfae00f372245aa914bd6a
|
| 3 |
size 4954847392
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4954847392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1ba0bb8de7a31293d2963ce8fac2dd75c93efcf1b63a286cd4c1eb5d8986b921
|
| 3 |
size 4954847392
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4734533160
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e193e39525cb173e1862ec15b23a8d78b7b21718a398d31a63073386454fbe2
|
| 3 |
size 4734533160
|
tokenizer_config.json
CHANGED
|
@@ -185,8 +185,12 @@
|
|
| 185 |
"eos_token": "<|end▁of▁sentence|>",
|
| 186 |
"extra_special_tokens": {},
|
| 187 |
"legacy": true,
|
|
|
|
| 188 |
"model_max_length": 16384,
|
|
|
|
| 189 |
"pad_token": "<|end▁of▁sentence|>",
|
|
|
|
|
|
|
| 190 |
"sp_model_kwargs": {},
|
| 191 |
"tokenizer_class": "LlamaTokenizerFast",
|
| 192 |
"unk_token": null,
|
|
|
|
| 185 |
"eos_token": "<|end▁of▁sentence|>",
|
| 186 |
"extra_special_tokens": {},
|
| 187 |
"legacy": true,
|
| 188 |
+
"max_length": null,
|
| 189 |
"model_max_length": 16384,
|
| 190 |
+
"pad_to_multiple_of": null,
|
| 191 |
"pad_token": "<|end▁of▁sentence|>",
|
| 192 |
+
"pad_token_type_id": 0,
|
| 193 |
+
"padding_side": "left",
|
| 194 |
"sp_model_kwargs": {},
|
| 195 |
"tokenizer_class": "LlamaTokenizerFast",
|
| 196 |
"unk_token": null,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 11729
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92264a30c113f17107f861db73738a49fb12bcf774c116b1e4c162aff230fa8b
|
| 3 |
size 11729
|