MMOPD/domain-rl-data
Viewer • Updated • 19.3k • 174
How to use MMOPD/Qwen3-4B-OT3-if with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="MMOPD/Qwen3-4B-OT3-if")
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("MMOPD/Qwen3-4B-OT3-if")
model = AutoModelForCausalLM.from_pretrained("MMOPD/Qwen3-4B-OT3-if", 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]:]))How to use MMOPD/Qwen3-4B-OT3-if with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "MMOPD/Qwen3-4B-OT3-if"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "MMOPD/Qwen3-4B-OT3-if",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/MMOPD/Qwen3-4B-OT3-if
How to use MMOPD/Qwen3-4B-OT3-if with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "MMOPD/Qwen3-4B-OT3-if" \
--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": "MMOPD/Qwen3-4B-OT3-if",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "MMOPD/Qwen3-4B-OT3-if" \
--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": "MMOPD/Qwen3-4B-OT3-if",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use MMOPD/Qwen3-4B-OT3-if with Docker Model Runner:
docker model run hf.co/MMOPD/Qwen3-4B-OT3-if
The Instruction Following domain teacher of No Pain, More Gain: Iterative Merging for Effective Multi-Teacher On-Policy Distillation (code).
| Initialization | Qwen3-4B-OT3 (Qwen3-4B-Base after SFT on OpenThoughts3-1.2M) |
| Method | GRPO |
| Data | if subset of MMOPD/domain-rl-data: 11,728 verifiable instruction-following prompts from the rlvr1 blend of nvidia/Nemotron-RL-Ultra-Training-Blends |
| Recipe | 200 steps, 64 prompts x 8 samples per step, 32,768-token rollouts at temperature 1.0, peak LR 3e-6, no KL penalty; reward = 1 if every instruction of the prompt is satisfied by the answer after the thinking block |
| Weights | bfloat16, cast from the fp32 training weights |
IFBench prompt-level loose accuracy 59.4 (avg@3: three samples per prompt with seeds 42-44, temperature 1.0, top-p 1.0, 32,768-token completion cap).
Qwen3 chat template in thinking mode. The reasoning follows the OpenThoughts3 format: the assistant turn starts with <think> (one space) and the reasoning, then \n</think>\n\n and the answer.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "MMOPD/Qwen3-4B-OT3-if"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "..."}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=True)
out = model.generate(**tok(text, return_tensors="pt").to(model.device), max_new_tokens=32768,
do_sample=True, temperature=1.0, top_p=1.0)
print(tok.decode(out[0], skip_special_tokens=True))
@article{kim2026immopd,
title = {No Pain, More Gain: Iterative Merging for Effective Multi-Teacher On-Policy Distillation},
author = {Kim, Seonghyeon and Jang, Chaeyun and Lee, Noah and Kim, Boseop and Lee, Juho},
journal = {arXiv preprint arXiv:2609.34745},
year = {2026}
}
Base model
Qwen/Qwen3-4B-Base