Instructions to use wyy1112/OPD-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wyy1112/OPD-Models with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wyy1112/OPD-Models")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("wyy1112/OPD-Models", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wyy1112/OPD-Models with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wyy1112/OPD-Models" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wyy1112/OPD-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wyy1112/OPD-Models
- SGLang
How to use wyy1112/OPD-Models 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 "wyy1112/OPD-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wyy1112/OPD-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "wyy1112/OPD-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wyy1112/OPD-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wyy1112/OPD-Models with Docker Model Runner:
docker model run hf.co/wyy1112/OPD-Models
Add paper and code links
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
library_name: transformers
|
| 4 |
-
pipeline_tag: text-generation
|
| 5 |
base_model:
|
| 6 |
- Qwen/Qwen3-4B
|
| 7 |
- Qwen/Qwen3-1.7B-Base
|
|
|
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
- on-policy-distillation
|
| 10 |
- grpo
|
|
@@ -13,8 +13,10 @@ tags:
|
|
| 13 |
|
| 14 |
# OPD-Models
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
| Subfolder | Role in OPD | Init | Training | Weights |
|
| 20 |
|---|---|---|---|---|
|
|
@@ -40,4 +42,4 @@ To download a single model for vLLM / verl:
|
|
| 40 |
|
| 41 |
```bash
|
| 42 |
hf download wyy1112/OPD-Models --include "math_grpo500_qwen3_4b/*" --local-dir OPD-Models
|
| 43 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
base_model:
|
| 3 |
- Qwen/Qwen3-4B
|
| 4 |
- Qwen/Qwen3-1.7B-Base
|
| 5 |
+
library_name: transformers
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
- on-policy-distillation
|
| 10 |
- grpo
|
|
|
|
| 13 |
|
| 14 |
# OPD-Models
|
| 15 |
|
| 16 |
+
**Paper**: [Beyond Prompt Count: How Data Shapes Transfer in On-Policy Distillation](https://huggingface.co/papers/2609.37377)
|
| 17 |
+
**Code**: [github.com/wyy-1112/dissecting-opd](https://github.com/wyy-1112/dissecting-opd)
|
| 18 |
+
|
| 19 |
+
Checkpoints trained for the on-policy distillation (OPD) experiments of our paper. All other teachers and students used in the paper are public Hub checkpoints. Each model lives in its own subfolder:
|
| 20 |
|
| 21 |
| Subfolder | Role in OPD | Init | Training | Weights |
|
| 22 |
|---|---|---|---|---|
|
|
|
|
| 42 |
|
| 43 |
```bash
|
| 44 |
hf download wyy1112/OPD-Models --include "math_grpo500_qwen3_4b/*" --local-dir OPD-Models
|
| 45 |
+
```
|