[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72385":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},72385,"MoA","togethercomputer\u002FMoA","togethercomputer","Together Mixture-Of-Agents (MoA) –  65.1% on AlpacaEval with OSS models","",null,"Python",2904,378,37,16,0,4,12,62.94,"Apache License 2.0",false,"main",true,[],"2026-06-12 04:01:04","# Mixture-of-Agents (MoA)\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-green.svg)](LICENSE)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2406.04692-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2406.04692)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Together%20AI-blue?logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.com\u002Finvite\u002F9Rk6sSeWEG)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Ftogethercompute.svg?style=social&label=Follow%20%40togethercompute)](https:\u002F\u002Ftwitter.com\u002Ftogethercompute)\n\n\u003Cimg alt=\"MoA architecture\" src=\".\u002Fassets\u002Fmoa.jpg\">\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#overview\">\u003Cstrong>Overview\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#quickstart-moa-in-50-loc\">\u003Cstrong>Quickstart\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#multi-layer-moa-example\">\u003Cstrong>Advanced example\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#interactive-cli-demo\">\u003Cstrong>Interactive CLI Demo\u003C\u002Fstrong>\u003C\u002Fa>\n  ·\n  \u003Ca href=\"#evaluation\">\u003Cstrong>Evaluation\u003C\u002Fstrong>\u003C\u002Fa>\n  ·\n  \u003Ca href=\"#results\">\u003Cstrong>Results\u003C\u002Fstrong>\u003C\u002Fa>\n  .\n  \u003Ca href=\"#credits\">\u003Cstrong>Credits\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Overview\n\nMixture of Agents (MoA) is a novel approach that leverages the collective strengths of multiple LLMs to enhance performance, achieving state-of-the-art results. By employing a layered architecture where each layer comprises several LLM agents, **MoA significantly outperforms GPT-4 Omni’s 57.5% on AlpacaEval 2.0 with a score of 65.1%**, using only open-source models!\n\n## Quickstart: MoA in 50 LOC\n\nTo get to get started with using MoA in your own apps, see `moa.py`. In this simple example, we'll use 2 layers and 4 LLMs. You'll need to:\n\n1. Install the Together Python library: `pip install together`\n2. Get your [Together API Key](https:\u002F\u002Fapi.together.xyz\u002Fsettings\u002Fapi-keys) & export it: `export TOGETHER_API_KEY=`\n3. Run the python file: `python moa.py`\n\n\u003Cimg alt=\"MoA explained\" src=\".\u002Fassets\u002Fmoa-explained.png\">\n\n## Multi-layer MoA Example\n\nIn the previous example, we went over how to implement MoA with 2 layers (4 LLMs answering and one LLM aggregating). However, one strength of MoA is being able to go through several layers to get an even better response. In this example, we'll go through how to run MoA with 3+ layers in `advanced-moa.py`.\n\n```python\npython advanced-moa.py\n```\n\n\u003Cimg alt=\"MoA – 3 layer example\" src=\".\u002Fassets\u002Fmoa-3layer.png\">\n\n## Interactive CLI Demo\n\nThis interactive CLI demo showcases a simple multi-turn chatbot where the final response is aggregated from various reference models.\n\nTo run the interactive demo, follow these 3 steps:\n\n1. Export Your API Key: `export TOGETHER_API_KEY={your_key}`\n2. Install Requirements: `pip install -r requirements.txt`\n3. Run the script: `python bot.py`\n\nThe CLI will prompt you to input instructions interactively:\n\n1. Start by entering your instruction at the \">>>\" prompt.\n2. The system will process your input using the predefined reference models.\n3. It will generate a response based on the aggregated outputs from these models.\n4. You can continue the conversation by inputting more instructions, with the system maintaining the context of the multi-turn interaction.\n\n### [Optional] Additional Configuration\n\nThe demo will ask you to specify certain options but if you want to do additional configuration, you can specify these parameters:\n\n- `--aggregator`: The primary model used for final response generation.\n- `--reference_models`: List of models used as references.\n- `--temperature`: Controls the randomness of the response generation.\n- `--max_tokens`: Maximum number of tokens in the response.\n- `--rounds`: Number of rounds to process the input for refinement. (num rounds == num of MoA layers - 1)\n- `--num_proc`: Number of processes to run in parallel for faster execution.\n- `--multi_turn`: Boolean to toggle multi-turn interaction capability.\n\n## Evaluation\n\nWe provide scripts to quickly reproduce some of the results presented in our paper\nFor convenience, we have included the code from [AlpacaEval](https:\u002F\u002Fgithub.com\u002Ftatsu-lab\u002Falpaca_eval),\n[MT-Bench](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat), and [FLASK](https:\u002F\u002Fgithub.com\u002FkaistAI\u002FFLASK), with necessary modifications.\nWe extend our gratitude to these projects for creating the benchmarks.\n\n### Preparation\n\n```bash\n# install requirements\npip install -r requirements.txt\ncd alpaca_eval\npip install -e .\ncd FastChat\npip install -e \".[model_worker,llm_judge]\"\ncd ..\n\n# setup api keys\nexport TOGETHER_API_KEY=\u003CTOGETHER_API_KEY>\nexport OPENAI_API_KEY=\u003COPENAI_API_KEY>\n```\n\n### Run AlpacaEval 2\n\nTo run AlpacaEval 2, execute the following scripts:\n\n```\nbash run_eval_alpaca_eval.sh\n```\n\n### Run MT-Bench\n\nFor a minimal example of MT-Bench evaluation, run:\n\n```\nbash run_eval_mt_bench.sh\n```\n\n### Run FLASK\n\nFor a minimal example of FLASK evaluation, run:\n\n```\nbash run_eval_flask.sh\n```\n\n### Results\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Falpaca_and_mtbench.png\" alt=\"alpaca_mtbench\" style=\"width: 100%; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n  \u003Cbr>\n\u003C\u002Fdiv>\n\nWe achieved top positions on both the AlpacaEval 2.0 leaderboard and MT-Bench. Notably, on AlpacaEval 2.0, using solely open-source models, we achieved a margin of 7.6% absolute improvement from 57.5% (GPT-4 Omni) to 65.1% (MoA).\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Fflask.png\" alt=\"flask\" style=\"width: 50%; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n  \u003Cbr>\n\u003C\u002Fdiv>\n\nFLASK offers fine-grained evaluation of models across multiple dimensions. Our MoA method significantly outperforms the original Qwen1.5-110B-Chat on harmlessness, robustness, correctness, efficiency, factuality, commonsense, insightfulness, completeness. Additionally, MoA also outperforms GPT-4 Omni in terms of correctness, factuality, insightfulness, completeness, and metacognition.\n\nPlease feel free to contact us if you have difficulties in reproducing the results.\n\n## Credits\n\nNotably, this work was made possible by the collaborative spirit and contributions of active organizations in the AI field. We appreciate the efforts of Meta AI, Mistral AI, Microsoft, Alibaba Cloud, and DataBricks for developing the Llama 3, Mixtral, WizardLM 2, Qwen 1.5, and DBRX models. Additionally, we extend our gratitude to Tatsu Labs, LMSYS, and KAIST AI for developing the AlpacaEval, MT-Bench, and FLASK evaluation benchmarks.\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the LICENSE file for details.\n\n## Citation\n\nIf you find this work helpful, please consider citing:\n\n```bibtex\n@article{wang2024mixture,\n  title={Mixture-of-Agents Enhances Large Language Model Capabilities},\n  author={Wang, Junlin and Wang, Jue and Athiwaratkun, Ben and Zhang, Ce and Zou, James},\n  journal={arXiv preprint arXiv:2406.04692},\n  year={2024}\n}\n```\n","Together Mixture-Of-Agents (MoA) 是一个通过整合多个大型语言模型（LLMs）的优势来提升性能的创新方案，仅使用开源模型就在AlpacaEval 2.0评测中达到了65.1%的得分，超越了GPT-4 Omni的57.5%。该项目采用分层架构设计，每层包含若干个LLM代理，能够根据任务需求灵活配置层数与模型数量以优化最终输出质量。特别适用于需要高质量文本生成或复杂问题解答的应用场景，如高级聊天机器人、内容创作辅助等。项目提供了快速入门指南及多层架构示例代码，便于开发者轻松集成到自己的应用程序中。",2,"2026-06-11 03:41:50","high_star"]