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") 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 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 +8 -7
- config.json +1 -1
- generation_config.json +4 -2
- 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 +0 -4
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
model_name: DeepSeek-R1-Distill-Qwen-14B-S
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
-
- trl
|
| 7 |
- grpo
|
|
|
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for DeepSeek-R1-Distill-Qwen-14B-S
|
| 12 |
|
| 13 |
-
This model is a fine-tuned version of [
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
@@ -26,18 +27,18 @@ print(output["generated_text"])
|
|
| 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/
|
| 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).
|
| 33 |
|
| 34 |
### Framework versions
|
| 35 |
|
| 36 |
-
- TRL: 0.23.
|
| 37 |
-
- Transformers: 4.
|
| 38 |
- Pytorch: 2.7.1
|
| 39 |
-
- Datasets: 4.1.
|
| 40 |
-
- Tokenizers: 0.22.
|
| 41 |
|
| 42 |
## Citations
|
| 43 |
|
|
|
|
| 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:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- grpo
|
| 8 |
+
- trl
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for DeepSeek-R1-Distill-Qwen-14B-S
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [deepseek-ai/DeepSeek-R1-Distill-Qwen-14B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 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/iu6e5zo1)
|
| 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).
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
+
- TRL: 0.23.1
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
- Pytorch: 2.7.1
|
| 40 |
+
- Datasets: 4.1.1
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
|
| 43 |
## Citations
|
| 44 |
|
config.json
CHANGED
|
@@ -72,7 +72,7 @@
|
|
| 72 |
"rope_theta": 1000000.0,
|
| 73 |
"sliding_window": null,
|
| 74 |
"tie_word_embeddings": false,
|
| 75 |
-
"transformers_version": "4.
|
| 76 |
"use_cache": true,
|
| 77 |
"use_sliding_window": false,
|
| 78 |
"vocab_size": 152064
|
|
|
|
| 72 |
"rope_theta": 1000000.0,
|
| 73 |
"sliding_window": null,
|
| 74 |
"tie_word_embeddings": false,
|
| 75 |
+
"transformers_version": "4.57.0",
|
| 76 |
"use_cache": true,
|
| 77 |
"use_sliding_window": false,
|
| 78 |
"vocab_size": 152064
|
generation_config.json
CHANGED
|
@@ -2,9 +2,11 @@
|
|
| 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,
|
| 9 |
-
"transformers_version": "4.
|
| 10 |
}
|
|
|
|
| 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,
|
| 11 |
+
"transformers_version": "4.57.0"
|
| 12 |
}
|
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:4a28ed54e22d1618184d024bbc615ce235dc2f619f2bcc00752cf2de8cf38671
|
| 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:49aaf3ca229073a79400b90f6f281145c765b5fb75bef79acdbfcb02b8c92db4
|
| 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:1534325c790b6626a9001027609b400d0c93c70c57266277bc83bf090ae252d1
|
| 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:63dd4e92e1598cc694a91cc5a63d49ec247022d1f4279dc9a8a712ddd747232d
|
| 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:44fbdff5473f1003f51bede61ee47a581c324932965b1953c580d76a22def7cd
|
| 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:28281519df0036b34b38bd0cc1f41e5c7a4d0627df22a7956b6dd24fca00dd9f
|
| 3 |
size 4734533160
|
tokenizer_config.json
CHANGED
|
@@ -185,12 +185,8 @@
|
|
| 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,
|
|
|
|
| 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,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d2f7cc3fdd41307ad68275dea955ad58f734e9b3a6c9f65bb8ec2cb84479e42
|
| 3 |
+
size 11729
|