Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
open-r1
trl
grpo
conversational
text-generation-inference
Instructions to use prefixsliding/8B-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prefixsliding/8B-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prefixsliding/8B-v2") 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("prefixsliding/8B-v2") model = AutoModelForCausalLM.from_pretrained("prefixsliding/8B-v2", 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 prefixsliding/8B-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prefixsliding/8B-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prefixsliding/8B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prefixsliding/8B-v2
- SGLang
How to use prefixsliding/8B-v2 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 "prefixsliding/8B-v2" \ --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": "prefixsliding/8B-v2", "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 "prefixsliding/8B-v2" \ --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": "prefixsliding/8B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prefixsliding/8B-v2 with Docker Model Runner:
docker model run hf.co/prefixsliding/8B-v2
Model save
Browse files- README.md +2 -4
- all_results.json +4 -4
- train_results.json +4 -4
- trainer_state.json +45 -9
README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3-8B
|
| 3 |
-
datasets: ryzax/train_v6_filtered_math
|
| 4 |
library_name: transformers
|
| 5 |
model_name: 8B-v2
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- open-r1
|
| 9 |
- trl
|
| 10 |
- grpo
|
| 11 |
licence: license
|
|
@@ -13,7 +11,7 @@ licence: license
|
|
| 13 |
|
| 14 |
# Model Card for 8B-v2
|
| 15 |
|
| 16 |
-
This model is a fine-tuned version of [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)
|
| 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/muennighoff/s2/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: Qwen/Qwen3-8B
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: 8B-v2
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- grpo
|
| 9 |
licence: license
|
|
|
|
| 11 |
|
| 12 |
# Model Card for 8B-v2
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B).
|
| 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/muennighoff/s2/runs/v6dzxsu9)
|
| 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).
|
all_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 0.0,
|
| 3 |
-
"train_loss":
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93894,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 0.0,
|
| 3 |
+
"train_loss": 9.714211751292874e-06,
|
| 4 |
+
"train_runtime": 700.4321,
|
| 5 |
"train_samples": 93894,
|
| 6 |
+
"train_samples_per_second": 365.489,
|
| 7 |
+
"train_steps_per_second": 1.428
|
| 8 |
}
|
train_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 0.0,
|
| 3 |
-
"train_loss":
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93894,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 0.0,
|
| 3 |
+
"train_loss": 9.714211751292874e-06,
|
| 4 |
+
"train_runtime": 700.4321,
|
| 5 |
"train_samples": 93894,
|
| 6 |
+
"train_samples_per_second": 365.489,
|
| 7 |
+
"train_steps_per_second": 1.428
|
| 8 |
}
|
trainer_state.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
-
"epoch": 0.
|
| 6 |
"eval_steps": 500,
|
| 7 |
-
"global_step":
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
@@ -36010,18 +36010,54 @@
|
|
| 36010 |
"tools/num_tool_detect_error": 0.0
|
| 36011 |
},
|
| 36012 |
{
|
| 36013 |
-
"
|
| 36014 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36015 |
"total_flos": 0.0,
|
| 36016 |
-
"train_loss":
|
| 36017 |
-
"train_runtime":
|
| 36018 |
-
"train_samples_per_second":
|
| 36019 |
-
"train_steps_per_second":
|
| 36020 |
}
|
| 36021 |
],
|
| 36022 |
"logging_steps": 1,
|
| 36023 |
"max_steps": 1000,
|
| 36024 |
-
"num_input_tokens_seen":
|
| 36025 |
"num_train_epochs": 1,
|
| 36026 |
"save_steps": 100,
|
| 36027 |
"stateful_callbacks": {
|
|
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.17057532962702623,
|
| 6 |
"eval_steps": 500,
|
| 7 |
+
"global_step": 1001,
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
|
|
| 36010 |
"tools/num_tool_detect_error": 0.0
|
| 36011 |
},
|
| 36012 |
{
|
| 36013 |
+
"clip_ratio/high_max": 0.0,
|
| 36014 |
+
"clip_ratio/high_mean": 0.0,
|
| 36015 |
+
"clip_ratio/low_mean": 0.0,
|
| 36016 |
+
"clip_ratio/low_min": 0.0,
|
| 36017 |
+
"clip_ratio/region_mean": 0.0,
|
| 36018 |
+
"completions/clipped_ratio": 0.1171875,
|
| 36019 |
+
"completions/max_length": 2048.0,
|
| 36020 |
+
"completions/max_terminated_length": 2033.0,
|
| 36021 |
+
"completions/mean_length": 1211.97265625,
|
| 36022 |
+
"completions/mean_terminated_length": 1101.0,
|
| 36023 |
+
"completions/min_length": 20.0,
|
| 36024 |
+
"completions/min_terminated_length": 20.0,
|
| 36025 |
+
"entropy": 0.16800379753112793,
|
| 36026 |
+
"epoch": 0.17057532962702623,
|
| 36027 |
+
"frac_reward_zero_std": 0.4375,
|
| 36028 |
+
"grad_norm": 0.2011258453130722,
|
| 36029 |
+
"learning_rate": 1e-06,
|
| 36030 |
+
"loss": 0.0097,
|
| 36031 |
+
"num_tokens": 425104847.0,
|
| 36032 |
+
"reward": 0.6484375,
|
| 36033 |
+
"reward_std": 0.22965487837791443,
|
| 36034 |
+
"rewards/simpleverify_reward/mean": 0.6484375,
|
| 36035 |
+
"rewards/simpleverify_reward/std": 0.47839346528053284,
|
| 36036 |
+
"step": 1001,
|
| 36037 |
+
"tools/generated_tokens": 4155.984375,
|
| 36038 |
+
"tools/num_python": 0.0,
|
| 36039 |
+
"tools/num_python_exec_error": 0.0,
|
| 36040 |
+
"tools/num_retrieval": 0.0,
|
| 36041 |
+
"tools/num_retriever_exec_error": 0.0,
|
| 36042 |
+
"tools/num_saving": 1.4375,
|
| 36043 |
+
"tools/num_saving_exec_error": 0.0,
|
| 36044 |
+
"tools/num_saving_forced": 0.0,
|
| 36045 |
+
"tools/num_saving_invalid_use": 0.0,
|
| 36046 |
+
"tools/num_tool_detect_error": 0.0
|
| 36047 |
+
},
|
| 36048 |
+
{
|
| 36049 |
+
"epoch": 0.17057532962702623,
|
| 36050 |
+
"step": 1001,
|
| 36051 |
"total_flos": 0.0,
|
| 36052 |
+
"train_loss": 9.714211751292874e-06,
|
| 36053 |
+
"train_runtime": 700.4321,
|
| 36054 |
+
"train_samples_per_second": 365.489,
|
| 36055 |
+
"train_steps_per_second": 1.428
|
| 36056 |
}
|
| 36057 |
],
|
| 36058 |
"logging_steps": 1,
|
| 36059 |
"max_steps": 1000,
|
| 36060 |
+
"num_input_tokens_seen": 425104847,
|
| 36061 |
"num_train_epochs": 1,
|
| 36062 |
"save_steps": 100,
|
| 36063 |
"stateful_callbacks": {
|