feat: add MiniMax as LLM evaluation provider#983
Open
octo-patch wants to merge 1 commit intoh2oai:mainfrom
Open
feat: add MiniMax as LLM evaluation provider#983octo-patch wants to merge 1 commit intoh2oai:mainfrom
octo-patch wants to merge 1 commit intoh2oai:mainfrom
Conversation
Add MiniMax (MiniMax-M2.7, M2.5, M2.5-highspeed) as an alternative LLM provider for GPT-based model evaluation alongside OpenAI and Azure. - Extend get_openai_client() with MiniMax provider support via OPENAI_API_TYPE=minimax or auto-detection when MINIMAX_API_KEY is set - Add MiniMax models to the metric_gpt_model predefined dropdown - Update check_metric() to recognize MINIMAX_API_KEY - Add MiniMax API Token field in Settings UI - Wire MINIMAX_API_KEY through the training environment - Update evaluation documentation and tooltips - Add 7 unit tests and 4 integration tests (including live API)
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 LLM provider for GPT-based model evaluation, alongside OpenAI and Azure OpenAI.
MiniMax provides OpenAI-compatible chat completion models (M2.7, M2.5, M2.5-highspeed) that can serve as AI judges for evaluating fine-tuned model outputs.
Changes
text_causal_language_modeling_metrics.py): Extendget_openai_client()factory to support MiniMax viaOPENAI_API_TYPE=minimaxor auto-detection whenMINIMAX_API_KEYis set andOPENAI_API_KEYis nottext_causal_language_modeling_config.py): Add MiniMax-M2.7, MiniMax-M2.5, MiniMax-M2.5-highspeed to the predefined metric model dropdownutils.py): Updatecheck_metric()to preserve GPT metric whenMINIMAX_API_KEYis availablesettings.py): Add MiniMax API Token field in the settings pageapp_utils/utils.py,config.py): WireMINIMAX_API_KEYthrough training environment variables and default settingsUsage
Option 1 — Auto-detect (simplest):
Option 2 — Explicit selection (when both keys are set):
Then select
MiniMax-M2.7(orM2.5/M2.5-highspeed) as the Metric Gpt Model in the experiment configuration.Test plan
get_openai_client()covering all provider paths (default OpenAI, MiniMax via API type, MiniMax auto-detect, preference when both keys set, explicit override, custom base URL, Azure)check_metric()with MiniMax key scenariosMINIMAX_API_KEYnot set)check_metrictests continue to pass11 files changed, 259 additions(+), 14 deletions(-)