feat: Add A3M Router - Parallel Multi-LLM with Ensemble Voting#14
Open
Das-rebel wants to merge 2 commits into
Open
feat: Add A3M Router - Parallel Multi-LLM with Ensemble Voting#14Das-rebel wants to merge 2 commits into
Das-rebel wants to merge 2 commits into
Conversation
A3M Router is an open-source LLM router ranked withmartian#1 on RouterArena (score 76.43), using parallel multi-LLM execution with confidence-scored voting across 47+ providers. Key features: - Query-type classification (code, math, creative, factual) - Fallback routing when CLI unavailable - Cost-aware model selection - RouterArena withmartian#1 benchmark result included in docstring GitHub: https://github.com/Das-rebel/a3m-router RouterArena: RouteWorks/RouterArena#113
A3M Router (Adaptive Memory Multi-Model Router) adds: - Parallel multi-LLM execution with ensemble voting - Confidence-weighted Shapley value credit assignment - Thompson Sampling for exploration/exploitation - Complexity-based routing with willingness-to-pay awareness Reference: https://github.com/Das-rebel/a3m-router NPM: npm install adaptive-memory-multi-model-router Submitted for RouterBench evaluation.
Author
|
Hey @withmartian! Checking in on this A3M Router submission. Latest updates:
Let me know if you need any changes to the submission format! Best, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A3M Router Submission for RouterBench
Overview
A3M Router (Adaptive Memory Multi-Model Router) is an open-source LLM gateway featuring parallel multi-LLM execution with confidence-weighted ensemble voting - a fundamentally different approach from sequential fallback routers.
Reference: https://github.com/Das-rebel/a3m-router
NPM:
npm install adaptive-memory-multi-model-router@2.14.58Key Innovations
1. Parallel Multi-LLM Execution
Unlike all other routers (litellm, one-api, LibreChat) which use sequential fallback, A3M executes multiple providers in parallel and merges results via confidence-weighted voting.
2. Confidence-Weighted Shapley Value Credit Assignment
Mathematical framework for fair credit assignment:
Where:
3. Thompson Sampling for Exploration/Exploitation
Uses Bayesian sampling to balance:
4. Complexity-Aware Routing
Estimates prompt complexity via:
Routes to appropriate tier based on complexity + willingness-to-pay.
Benchmark Results
Implementation
routers/a3m_router.pyAbstractRouterTesting
Run with:
Would appreciate review and feedback!