Giter VIP home page Giter VIP logo

groq-moa's Introduction

Mixture-of-Agents Demo Powered by Groq

This Streamlit application showcases the Mixture of Agents (MOA) architecture proposed by Together AI, powered by Groq LLMs. It allows users to interact with a configurable multi-agent system for enhanced AI-driven conversations.

MOA Architecture Source: Adaptation of Together AI Blog - Mixture of Agents

Features

  • Interactive chat interface powered by MOA
  • Configurable main model and layer agents
  • Real-time streaming of responses
  • Visualization of intermediate layer outputs
  • Customizable agent parameters through the UI

Installation

  1. Clone the repository:

    git clone https://github.com/skapadia3214/groq-moa.git
    cd groq-moa
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Set up your environment variables: Create a .env file in the root directory and add your Groq API key:

    GROQ_API_KEY=your_api_key_here
    

Usage

  1. Run the Streamlit app:

    streamlit run app.py
    
  2. Open your web browser and navigate to the URL provided by Streamlit (usually http://localhost:8501).

  3. Use the sidebar to configure the MOA settings:

    • Select the main model
    • Set the number of cycles
    • Customize the layer agent configuration
  4. Start chatting with the MOA system using the input box at the bottom of the page.

Project Structure

  • app.py: Main Streamlit application file
  • moa/: Package containing the MOA implementation
    • __init__.py: Package initializer
    • moa.py: Core MOA agent implementation
    • prompts.py: System prompts for the agents
  • main.py: CLI version of the MOA chat interface
  • requirements.txt: List of Python dependencies
  • static/: Directory for static assets (images, etc.)

Configuration

The MOA system can be configured through the Streamlit UI or by modifying the default configuration in app.py. The main configurable parameters are:

  • Main model: The primary language model used for generating final responses
  • Number of cycles: How many times the layer agents are invoked before the main agent
  • Layer agent configuration: A JSON object defining the system prompts, model names, and other parameters for each layer agent

Contributing

Contributions to this project are welcome! Please follow these steps to contribute:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Make your changes and commit them with descriptive commit messages
  4. Push your changes to your fork
  5. Submit a pull request to the main repository

Please ensure that your code adheres to the project's coding standards and includes appropriate tests and documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • Groq for providing the underlying language models
  • Together AI for proposing the Mixture of Agents architecture and providing the conceptual image
  • Streamlit for the web application framework

Citation

This project implements the Mixture-of-Agents architecture proposed in the following paper:

@article{wang2024mixture,
  title={Mixture-of-Agents Enhances Large Language Model Capabilities},
  author={Wang, Junlin and Wang, Jue and Athiwaratkun, Ben and Zhang, Ce and Zou, James},
  journal={arXiv preprint arXiv:2406.04692},
  year={2024}
}

For more information about the Mixture-of-Agents concept, please refer to the original research paper and the Together AI blog post.

Contact

For questions or support, please open an issue on the GitHub repository or contact [email protected] directly.

groq-moa's People

Contributors

skapadia3214 avatar jwswj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.