MAS-GPT: Training LLMs to Build LLM-based Multi-Agent Systems
Paper • 2503.03686 • Published • 1
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("MASWorks/MAS-GPT-32B")
model = AutoModelForCausalLM.from_pretrained("MASWorks/MAS-GPT-32B")
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]:]))This model can generate query-specific LLM-based multi-agent system, which is fine-tuned on Qwen/Qwen2.5-Coder-32B-Instruct.
See our paper MAS-GPT: Training LLMs to Build LLM-based Multi-Agent Systems.
@article{ye2025mas,
title={MAS-GPT: Training LLMs to build LLM-based multi-agent systems},
author={Ye, Rui and Tang, Shuo and Ge, Rui and Du, Yaxin and Yin, Zhenfei and Chen, Siheng and Shao, Jing},
journal={arXiv preprint arXiv:2503.03686},
year={2025}
}
Base model
Qwen/Qwen2.5-32B
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MASWorks/MAS-GPT-32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)