Instructions to use SII-Enigma/Llama3.2-8B-Ins-AMPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SII-Enigma/Llama3.2-8B-Ins-AMPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SII-Enigma/Llama3.2-8B-Ins-AMPO") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SII-Enigma/Llama3.2-8B-Ins-AMPO") model = AutoModelForCausalLM.from_pretrained("SII-Enigma/Llama3.2-8B-Ins-AMPO") 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
- vLLM
How to use SII-Enigma/Llama3.2-8B-Ins-AMPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SII-Enigma/Llama3.2-8B-Ins-AMPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SII-Enigma/Llama3.2-8B-Ins-AMPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SII-Enigma/Llama3.2-8B-Ins-AMPO
- SGLang
How to use SII-Enigma/Llama3.2-8B-Ins-AMPO 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 "SII-Enigma/Llama3.2-8B-Ins-AMPO" \ --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": "SII-Enigma/Llama3.2-8B-Ins-AMPO", "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 "SII-Enigma/Llama3.2-8B-Ins-AMPO" \ --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": "SII-Enigma/Llama3.2-8B-Ins-AMPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SII-Enigma/Llama3.2-8B-Ins-AMPO with Docker Model Runner:
docker model run hf.co/SII-Enigma/Llama3.2-8B-Ins-AMPO
Introduction
AMPO, a novel framework that intelligently leverages guidance from multiple, diverse teacher models, intervening only when the on-policy model fails. Our two core contributions, Adaptive Multi-Guidance Replacement and Comprehension-based Guidance Selection, ensure that this external knowledge is used both efficiently and effectively.
Key Highlights:
- Adaptive Multi-Guidance Replacement: Minimizes intervention by providing external guidance only upon complete on-policy failure, preserving self-discovery while enhancing reasoning efficiency.
- Comprehension-based Guidance Selection: Improves learning effectiveness by guiding the model to assimilate the most comprehensible external solutions, demonstrably boosting performance.
- Superior Performance: Achieves better performance and efficiency compared to using RL or SFT alone.
Multi-Guidance Pool
Teacher Models: AceReason-Nemotron-1.1-7B, DeepSeek-R1-Distill-Qwen-7B, OpenR1-Qwen-7B, Qwen3-8B(thinking)
Inference Example
Here’s an example of using AMPO for inference:
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
model_path = "SII-Enigma/Llama3.2-8B-Ins-AMPO"
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=8192)
outputs = llm.generate([chat], params)
print(outputs[0].outputs[0].text)
Acknowledgement
AMPO builds upon LUFFY, veRL, RLPR and utilizes vLLM for inference. We utilize Math-Verify for math reasoning evaluation. We thank the open-source community for codes, datasets and backbones.
Citation
If you find our model, data, or evaluation code useful, please kindly cite our paper:
@misc{yuan2025teacheradaptivemultiguidancepolicy,
title={More Than One Teacher: Adaptive Multi-Guidance Policy Optimization for Diverse Exploration},
author={Xiaoyang Yuan and Yujuan Ding and Yi Bin and Wenqi Shao and Jinyu Cai and Jingkuan Song and Yang Yang and Heng Tao Shen},
year={2025},
eprint={2510.02227},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2510.02227},
}
- Downloads last month
- 4
Model tree for SII-Enigma/Llama3.2-8B-Ins-AMPO
Base model
voidful/Llama-3.2-8B-Instruct