feat: add MiniMax as LLM provider for financial evaluation#92
Open
octo-patch wants to merge 1 commit intoThe-FinAI:mainfrom
Open
feat: add MiniMax as LLM provider for financial evaluation#92octo-patch wants to merge 1 commit intoThe-FinAI:mainfrom
octo-patch wants to merge 1 commit intoThe-FinAI:mainfrom
Conversation
Add MiniMax (M2.7, M2.7-highspeed, M2.5, M2.5-highspeed) as an alternative commercial LLM provider alongside OpenAI for financial benchmark evaluation. MiniMax offers 204K context windows via an OpenAI-compatible API. Changes: - Refactor ChatLM to support configurable API base URL and key env var - Add MiniMaxLM subclass with temperature clamping (0,1] - Update evaluator routing to auto-detect MiniMax model names - Add MiniMaxModel for FActScore evaluation - Add api_base parameter to OpenAIModel for custom endpoints - Add 30 unit tests + 3 integration tests - Update README with MiniMax usage instructions Co-Authored-By: Octopus <liyuan851277048@icloud.com>
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.
Summary
Add MiniMax as an alternative commercial LLM provider for financial benchmark evaluation alongside OpenAI.
MiniMax offers large language models (M2.7, M2.5) with 204K context windows via an OpenAI-compatible chat completions API, making it a drop-in option for evaluating financial tasks.
Changes
ChatLMto support configurableAPI_BASE_URLandAPI_KEY_ENVclass attributes (backward-compatible, defaults to OpenAI)MiniMaxLMsubclass (src/minimax_lm.py) with:MINIMAX_API_KEYenvironment variableevaluator.pyto auto-detect MiniMax model names and route toMiniMaxLMMiniMaxModelfor FActScore evaluation (src/factscore_package/minimax_lm.py)OpenAIModelwith optionalapi_baseparameter for custom endpointsUsage
export MINIMAX_API_KEY=YOUR_KEY_HERE python eval.py --model MiniMax-M2.7 --tasks flare_ner,flare_sm_acl,flare_fpbSupported models:
MiniMax-M2.7,MiniMax-M2.7-highspeed,MiniMax-M2.5,MiniMax-M2.5-highspeedTest Plan