Can111/m1-32b
Two Heads are Better Than One: Test-time Scaling of Multi-agent Collaborative Reasoning
M1-32B is a 32B-parameter large language model fine-tuned from Qwen2.5-32B-Instruct on the M500 datasetβan interdisciplinary multi-agent collaborative reasoning dataset. M1-32B is optimized for improved reasoning, discussion, and decision-making in multi-agent systems (MAS), including frameworks such as AgentVerse.
Code: https://github.com/jincan333/MAS-TTS Project page: https://github.com/jincan333/MAS-TTS
How to Use with π€ Transformers
You can use this model directly with the transformers library for text generation.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Can111/m1-32b"
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16, # Use bfloat16 for optimal performance if supported
device_map="auto" # Automatically distribute model across available devices
)
model.eval() # Set model to evaluation mode
# Define your conversation messages
messages = [
{"role": "user", "content": "Explain multi-agent collaborative reasoning and its benefits."},
]
# Apply chat template and tokenize inputs
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# Generate response
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.9
)
# Decode and print the generated text
decoded_output = tokenizer.batch_decode(generated_ids[:, model_inputs.input_ids.shape[1]:], skip_special_tokens=True)[0]
print(decoded_output)π Key Features
- π§ Enhanced Collaborative Reasoning Trained on real multi-agent traces involving diverse roles like Expert Recruiter, Problem Solvers, and Evaluator.
- π£οΈ Role-Aware Dialogue Generation Learns to reason and respond from different expert perspectives based on structured prompts.
- βοΈ Optimized for Multi-Agent Systems Performs well as a MAS agent with adaptive collaboration and token budgeting.
ποΈ Model Training
- Base Model: Qwen2.5-32B-Instruct
- Dataset: M500 (500 curated multi-agent reasoning traces)
- Objective: Supervised Fine-Tuning (SFT) on role-conditioned prompts
- Training Setup:
- 8 Γ A100 GPUs
- 5 epochs
- Learning rate: 1e-5
- Frameworks: DeepSpeed, FlashAttention, LLaMA-Factory
π Performance
Table Caption: Performance comparison on general understanding, mathematical reasoning, and coding tasks using strong reasoning and non-reasoning models within the AgentVerse framework. Our method achieves substantial improvements over Qwen2.5 and s1.1-32B on all tasks, and attains performance comparable to o3-mini and DeepSeek-R1 on MATH-500 and MBPP-S, demonstrating its effectiveness in enhancing collaborative reasoning in MAS. Note that the results of s1.1-32B are obtained without using budget forcing.
π¬ Intended Use
M1-32B is intended for research on Multi-agent reasoning and collaboration in MAS
Citation
If you use this model, please cite the relevant papers:
@article{jin2025two,
title={Two Heads are Better Than One: Test-time Scaling of Multi-agent Collaborative Reasoning},
author={Jin, Can and Peng, Hongwu and Zhang, Qixin and Tang, Yujin and Metaxas, Dimitris N and Che, Tong},
journal={arXiv preprint arXiv:2504.09772},
year={2025}
}