Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
grpo
trl
conversational
text-generation-inference
Instructions to use leonMW/DeepSeek-R1-Distill-Qwen-7B-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-7B-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-7B-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-7B-S") model = AutoModelForCausalLM.from_pretrained("leonMW/DeepSeek-R1-Distill-Qwen-7B-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-7B-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-7B-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-7B-S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leonMW/DeepSeek-R1-Distill-Qwen-7B-S
- SGLang
How to use leonMW/DeepSeek-R1-Distill-Qwen-7B-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-7B-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-7B-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-7B-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-7B-S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use leonMW/DeepSeek-R1-Distill-Qwen-7B-S with Docker Model Runner:
docker model run hf.co/leonMW/DeepSeek-R1-Distill-Qwen-7B-S
Training in progress, epoch 1
Browse files- README.md +7 -6
- config.json +1 -1
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
- model-00004-of-00004.safetensors +1 -1
- tokenizer_config.json +0 -4
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
model_name: DeepSeek-R1-Distill-Qwen-7B-S
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
-
- grpo
|
| 7 |
- trl
|
|
|
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for DeepSeek-R1-Distill-Qwen-7B-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,7 +27,7 @@ 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).
|
|
@@ -34,10 +35,10 @@ This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing
|
|
| 34 |
### Framework versions
|
| 35 |
|
| 36 |
- TRL: 0.23.0
|
| 37 |
-
- Transformers: 4.56.
|
| 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-7B
|
| 3 |
library_name: transformers
|
| 4 |
model_name: DeepSeek-R1-Distill-Qwen-7B-S
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
+
- grpo
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for DeepSeek-R1-Distill-Qwen-7B-S
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [deepseek-ai/DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B).
|
| 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/6e7rbl0y)
|
| 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).
|
|
|
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
- TRL: 0.23.0
|
| 38 |
+
- Transformers: 4.56.2
|
| 39 |
- Pytorch: 2.7.1
|
| 40 |
+
- Datasets: 4.1.1
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
|
| 43 |
## Citations
|
| 44 |
|
config.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
| 52 |
"rope_theta": 10000,
|
| 53 |
"sliding_window": null,
|
| 54 |
"tie_word_embeddings": false,
|
| 55 |
-
"transformers_version": "4.56.
|
| 56 |
"use_cache": true,
|
| 57 |
"use_mrope": false,
|
| 58 |
"use_sliding_window": false,
|
|
|
|
| 52 |
"rope_theta": 10000,
|
| 53 |
"sliding_window": null,
|
| 54 |
"tie_word_embeddings": false,
|
| 55 |
+
"transformers_version": "4.56.2",
|
| 56 |
"use_cache": true,
|
| 57 |
"use_mrope": false,
|
| 58 |
"use_sliding_window": false,
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4877660776
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f92e283c68a5aaaec340154b19c5eb47b1af2763d5f8373fb828f2d9e99c090f
|
| 3 |
size 4877660776
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4932751008
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8071dbd73b597cf546bcc617e1fe0ea63e345ad0ca74131e9edd534f4a7300da
|
| 3 |
size 4932751008
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4330865200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8a082cc033a19c7e743abbe2ebd4d4b964c0a464bf7373434f6c70fc0529581
|
| 3 |
size 4330865200
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1089994880
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73725f36c100c9544e595c52f70ea3b8b1f2bd2702e6dd05a0cc7cce5cacc4d1
|
| 3 |
size 1089994880
|
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 11665
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4c22616f29b6acb0c167ad6cfb8098e01151b4a513cbf44c28513543f5a598c
|
| 3 |
size 11665
|