Text Generation
Transformers
Safetensors
qwen2
multi-agent systems
multiagent-collaboration
reasoning
mathematics
code
conversational
text-generation-inference
Run this model with HF Jobs
Run Can111/m1-32b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Can111/m1-32b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Can111/m1-32b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Can111/m1-32b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Can111/m1-32b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Can111/m1-32b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Can111/m1-32b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Can111/m1-32b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Can111/m1-32b") model = AutoModelForCausalLM.from_pretrained("Can111/m1-32b", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Can111/m1-32b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Can111/m1-32b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Can111/m1-32b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Can111/m1-32b
- SGLang
How to use Can111/m1-32b 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 "Can111/m1-32b" \ --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": "Can111/m1-32b", "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 "Can111/m1-32b" \ --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": "Can111/m1-32b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Can111/m1-32b with Docker Model Runner:
docker model run hf.co/Can111/m1-32b
Improve language tag
#2
by lbourdois - opened
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091---base_model: Qwen/Qwen2.5-32B-Instructlanguage:- enlibrary_name: transformerslicense: apache-2.0tags:- multi-agent systems- multiagent-collaboration- reasoning- mathematics- codemodel-index:- name: m1-32bresults: []pipeline_tag: text-generation---[Two Heads are Better Than One: Test-time Scaling of Multi-agent Collaborative Reasoning](https://arxiv.org/pdf/2504.09772)**M1-32B** is a 32B-parameter large language model fine-tuned from [Qwen2.5-32B-Instruct](https://arxiv.org/pdf/2412.15115) 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](https://github.com/OpenBMB/AgentVerse).Code: [https://github.com/jincan333/MAS-TTS](https://github.com/jincan333/MAS-TTS)---## 🚀 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](https://huggingface.co/datasets/Can111/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| **Model** | **General Understanding** | | **Mathematical Reasoning** | | **Coding** | ||--------------------------|---------------------------|----------------|-----------------------------|------------|----------------|-----------|| | **GPQA** | **Commongen** | **AIME2024** | **MATH-500** | **HumanEval** | **MBPP-S**|| **Non-Reasoning Models** | | | | | | || Qwen2.5 | 50.2 | 96.7 | 21.1 | 84.4 | 89.0 | 80.2 || DeepSeek-V3 | **58.6** | **98.6** | **33.3** | **88.6** | 89.6 | 83.9 || GPT-4o | 49.2 | 97.8 | 7.8 | 81.3 | **90.9** | **85.4** || **Reasoning Models** | | | | | | || s1.1-32B | 58.3 | 94.1 | 53.3 | 90.6 | 82.3 | 77.4 || DeepSeek-R1 | **75.5** | 97.2 | 78.9 | **96.2** | **98.2** | 91.7 || o3-mini | 71.3 | **99.1** | **84.4** | 95.3 | 97.0 | **93.6** || M1-32B (Ours) | 61.1 | 96.9 | 60.0 | 95.1 | 92.8 | 89.1 || M1-32B w. CEO (Ours) | 62.1 | 97.4 | 62.2 | 95.8 | 93.9 | 90.5 |**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 UseM1-32B is intended for research on Multi-agent reasoning and collaboration in MAS---## CitationIf you use this model, please cite the relevant papers:```bibtex@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}}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103---base_model: Qwen/Qwen2.5-32B-Instructlanguage:- zho- eng- fra- spa- por- deu- ita- rus- jpn- kor- vie- tha- aralibrary_name: transformerslicense: apache-2.0tags:- multi-agent systems- multiagent-collaboration- reasoning- mathematics- codepipeline_tag: text-generationmodel-index:- name: m1-32bresults: []---[Two Heads are Better Than One: Test-time Scaling of Multi-agent Collaborative Reasoning](https://arxiv.org/pdf/2504.09772)**M1-32B** is a 32B-parameter large language model fine-tuned from [Qwen2.5-32B-Instruct](https://arxiv.org/pdf/2412.15115) 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](https://github.com/OpenBMB/AgentVerse).Code: [https://github.com/jincan333/MAS-TTS](https://github.com/jincan333/MAS-TTS)---## 🚀 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](https://huggingface.co/datasets/Can111/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| **Model** | **General Understanding** | | **Mathematical Reasoning** | | **Coding** | ||--------------------------|---------------------------|----------------|-----------------------------|------------|----------------|-----------|| | **GPQA** | **Commongen** | **AIME2024** | **MATH-500** | **HumanEval** | **MBPP-S**|| **Non-Reasoning Models** | | | | | | || Qwen2.5 | 50.2 | 96.7 | 21.1 | 84.4 | 89.0 | 80.2 || DeepSeek-V3 | **58.6** | **98.6** | **33.3** | **88.6** | 89.6 | 83.9 || GPT-4o | 49.2 | 97.8 | 7.8 | 81.3 | **90.9** | **85.4** || **Reasoning Models** | | | | | | || s1.1-32B | 58.3 | 94.1 | 53.3 | 90.6 | 82.3 | 77.4 || DeepSeek-R1 | **75.5** | 97.2 | 78.9 | **96.2** | **98.2** | 91.7 || o3-mini | 71.3 | **99.1** | **84.4** | 95.3 | 97.0 | **93.6** || M1-32B (Ours) | 61.1 | 96.9 | 60.0 | 95.1 | 92.8 | 89.1 || M1-32B w. CEO (Ours) | 62.1 | 97.4 | 62.2 | 95.8 | 93.9 | 90.5 |**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 UseM1-32B is intended for research on Multi-agent reasoning and collaboration in MAS---## CitationIf you use this model, please cite the relevant papers:```bibtex@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}}```
README.md+102-90