P1-235B-A22B demonstrates excellent general capabilities across various benchmarks. As shown below, P1-235B-A22B achieves better performance than its base model Qwen3-235B-A22B-Thinking-2507 on multiple tasks, further validating the strong generalization of P1 series models.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Load model and tokenizer
5model_name = "P1-235B-A22B"
6tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11 trust_remote_code=True
12)
13
14# Physics problem solving
15prompt = """Solve this physics problem:
16
17A block of mass m = 2.0 kg slides down a rough incline at angle θ = 30°
18with coefficient of friction μ = 0.2. Calculate the acceleration of the block.
19
20Provide a detailed solution with reasoning steps."""
21
22inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
23outputs = model.generate(
24 **inputs,
25 max_length=81920,
26 temperature=0.6,
27 top_p=0.9,
28 do_sample=True
29)
30
31solution = tokenizer.decode(outputs[0], skip_special_tokens=True)
32print(solution)
We are grateful to the open-source community for their invaluable contributions. Special thanks to:
1@misc{p1-2025,
2 title={P1: Mastering Physics Olympiads with Reinforcement Learning},
3 author={P1 Team},
4 year={2025},
5 url={https://prime-rl.github.io/P1/}
6}