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 +2 -4
- adapter_model.safetensors +1 -1
- tokenizer.json +2 -2
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,19 +1,17 @@
|
|
| 1 |
---
|
| 2 |
base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
|
| 3 |
-
datasets: AIML-TUDA/SLR-Bench
|
| 4 |
library_name: transformers
|
| 5 |
model_name: DeepSeek-R1-Distill-Qwen-7B-S
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
- grpo
|
| 9 |
-
- open-r1
|
| 10 |
- trl
|
| 11 |
licence: license
|
| 12 |
---
|
| 13 |
|
| 14 |
# Model Card for DeepSeek-R1-Distill-Qwen-7B-S
|
| 15 |
|
| 16 |
-
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)
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
|
@@ -29,7 +27,7 @@ print(output["generated_text"])
|
|
| 29 |
|
| 30 |
## Training procedure
|
| 31 |
|
| 32 |
-
[<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/
|
| 33 |
|
| 34 |
|
| 35 |
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 |
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 |
- grpo
|
|
|
|
| 8 |
- trl
|
| 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/qwg16ch3)
|
| 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).
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 80792880
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e82218ce0f3e1be2d9ecbe7cb3f1323e66a4adf4bae86d16c980514dfd145db
|
| 3 |
size 80792880
|
tokenizer.json
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:a4256422650d141f228fe954acee98679da412984c29a569877eefd3af69315a
|
| 3 |
+
size 11422959
|
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:8c03fb0a2519fe1221cc0794b826e3fa32b144f6afc892f441c388a80afa7bd0
|
| 3 |
size 11729
|