Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use DGME/Qwen2.5-0.5B-Open-R1-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DGME/Qwen2.5-0.5B-Open-R1-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DGME/Qwen2.5-0.5B-Open-R1-SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DGME/Qwen2.5-0.5B-Open-R1-SFT") model = AutoModelForCausalLM.from_pretrained("DGME/Qwen2.5-0.5B-Open-R1-SFT", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DGME/Qwen2.5-0.5B-Open-R1-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DGME/Qwen2.5-0.5B-Open-R1-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DGME/Qwen2.5-0.5B-Open-R1-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DGME/Qwen2.5-0.5B-Open-R1-SFT
- SGLang
How to use DGME/Qwen2.5-0.5B-Open-R1-SFT 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 "DGME/Qwen2.5-0.5B-Open-R1-SFT" \ --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": "DGME/Qwen2.5-0.5B-Open-R1-SFT", "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 "DGME/Qwen2.5-0.5B-Open-R1-SFT" \ --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": "DGME/Qwen2.5-0.5B-Open-R1-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DGME/Qwen2.5-0.5B-Open-R1-SFT with Docker Model Runner:
docker model run hf.co/DGME/Qwen2.5-0.5B-Open-R1-SFT
Training in progress, step 90
Browse files- adapter_config.json +2 -2
- adapter_model.safetensors +1 -1
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -24,8 +24,8 @@
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
],
|
| 30 |
"task_type": "CAUSAL_LM",
|
| 31 |
"trainable_token_indices": null,
|
|
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
+
"v_proj",
|
| 28 |
+
"q_proj"
|
| 29 |
],
|
| 30 |
"task_type": "CAUSAL_LM",
|
| 31 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4338000
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4eb1ffc4c7d234ab7a920e86c6d2dcc4fcef0baf485a6eab2b444ada6578183a
|
| 3 |
size 4338000
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f3b44f01c4bc7e7e80b64840f1b1612650781efab1eb0f58e793dc6dde87102
|
| 3 |
size 6392
|