Instructions to use CelineHuangxy/ICPO-Qwen3-8B-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CelineHuangxy/ICPO-Qwen3-8B-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CelineHuangxy/ICPO-Qwen3-8B-code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CelineHuangxy/ICPO-Qwen3-8B-code") model = AutoModelForCausalLM.from_pretrained("CelineHuangxy/ICPO-Qwen3-8B-code", 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 CelineHuangxy/ICPO-Qwen3-8B-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CelineHuangxy/ICPO-Qwen3-8B-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CelineHuangxy/ICPO-Qwen3-8B-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CelineHuangxy/ICPO-Qwen3-8B-code
- SGLang
How to use CelineHuangxy/ICPO-Qwen3-8B-code 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 "CelineHuangxy/ICPO-Qwen3-8B-code" \ --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": "CelineHuangxy/ICPO-Qwen3-8B-code", "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 "CelineHuangxy/ICPO-Qwen3-8B-code" \ --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": "CelineHuangxy/ICPO-Qwen3-8B-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CelineHuangxy/ICPO-Qwen3-8B-code with Docker Model Runner:
docker model run hf.co/CelineHuangxy/ICPO-Qwen3-8B-code
ICPO-Qwen3-8B-code
Introduction
ICPO is an RLVR (Reinforcement Learning with Verifiable Rewards) approach presented in the paper Think Outside the Policy: In-Context Steered Policy Optimization. ICPO-Qwen3-8B-code is trained using MathInstruct as the expert dataset.
Existing Reinforcement Learning from Verifiable Rewards (RLVR) methods, such as Group Relative Policy Optimization (GRPO), have achieved remarkable progress in improving the reasoning capabilities of Large Reasoning Models (LRMs). However, they exhibit limited exploration due to reliance on on-policy rollouts which are confined to the current policy's distribution, resulting in narrow trajectory diversity. Recent approaches attempt to expand policy coverage by incorporating trajectories generated from stronger expert models, yet this reliance increases computational cost and such advanced models are often inaccessible. To address these issues, we propose In-Context Steered Policy Optimization (ICPO), a unified framework that leverages the inherent in-context learning capability of LRMs to provide expert guidance using existing datasets. ICPO introduces mixed-policy GRPO with implicit expert forcing, which expands exploration beyond the current policy distribution without requiring advanced LRM trajectories. To further stabilize optimization, ICPO integrates expert region reject sampling to filter unreliable off-policy trajectories and annealed expert-bonus reward shaping to balance early expert guidance with later autonomous improvement. Results demonstrate that ICPO consistently enhances RLVR performance and training stability on mathematical reasoning benchmarks, revealing a scalable and effective RLVR paradigm for LRMs.
Inference
Here is an example of using ICPO models for inference:
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
model_path="CelineHuangxy/ICPO-Qwen3-8B-math"
question = "which number is larger? 9.11 or 9.9?"
tokenizer = AutoTokenizer.from_pretrained(model_path)
messages = [{"role": "user", "content": question}]
chat = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
llm = LLM(model=model_path)
params = SamplingParams(temperature=0.6, max_tokens=32768)
outputs = llm.generate([chat], params)
print(outputs[0].outputs[0].text)
Acknowledgements
LTE is built on the following repositories and we thank their teams for their valuable contributions to the community:
Citation
If you find our work useful, feel free to cite our paper:
@inproceedings{huang2026think,
title={Think outside the policy: In-context steered policy optimization},
author={Huang, Hsiu-Yuan and Tang, Chenming and Liu, Weijie and Bai, Clive and Yang, Saiyong and Wu, Yunfang},
booktitle={Findings of the Association for Computational Linguistics: ACL 2026},
pages={2758--2776},
year={2026}
}
- Downloads last month
- 226