Instructions to use cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100") model = AutoModelForCausalLM.from_pretrained("cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100", 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 cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100
- SGLang
How to use cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100 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 "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100" \ --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": "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100", "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 "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100" \ --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": "cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100 with Docker Model Runner:
docker model run hf.co/cmpatino/Qwen3-1.7B-DirectOPD-SFTShift-100
Qwen3-1.7B — Direct-OPD (SFT-induced teacher shift), 100 steps
Pilot artifact of the Direct-OPD SFT-vs-RL policy-shift experiment (condition
sft). Student Qwen/Qwen3-1.7B trained for 100 Direct-OPD steps against the
token-level policy-shift signal between:
| role | model |
|---|---|
| pi_T (post-shift teacher) | cmpatino/DeepSeek-R1-Distill-Qwen-1.5B-DeepMath-SFT100 @ baee02cc3858ddb200601f247b6a22f072b599d1 |
| pi_Tref (pre-shift teacher) | deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B @ ad9f0ae0864d7fbcd1cd905e3c6c5b069cc8b562 |
Root = step 100. checkpoint-{20,40,60,80,100}/ = intermediate merged checkpoints.
Weights are bf16 (verl's FSDP->HF merge downcasts the fp32 masters).
Reproduction
- code:
https://github.com/BytedTsinghua-SIA/Direct-OPD@3a9d6bd37b00a38e7a9b2959239e4631e5324aea+logs/phase4_seed.patch(seed 42 shim) - data:
cmpatino/direct-opd-sft-deepmath-pilot-data@22625ae5db434947195bf862c429cd94504a4809::opd_train.parquet(6,400 prompts, one pass) - 100 steps x 64 prompts x 4 rollouts, lr 1e-6, adaptive KL (init/max 2.5), max prompt 1024 / response 2048 tokens, seed 42
- driver + full env block:
logs/run_manifest.json, console loglogs/train.log.gz
Caveats: no in-training validation (test_freq=-1); bit-exact reproducibility is not
attainable (vLLM continuous batching, dynamic micro-batching, FSDP reductions); teacher scoring
reuses the student's Qwen3 token ids verbatim (shared-vocab assumption, unasserted upstream).
- Downloads last month
- 1