Skip to content

feat: add MiniMax as cloud LLM provider for inference and processing#20

Open
octo-patch wants to merge 1 commit intoIntelLabs:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as cloud LLM provider for inference and processing#20
octo-patch wants to merge 1 commit intoIntelLabs:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax as an alternative cloud LLM provider alongside the existing Azure OpenAI integration. MiniMax offers powerful models (MiniMax-M2.7, MiniMax-M2.7-highspeed with 204K context) through an OpenAI-compatible API.

Changes

  • ragfit/models/minimax_executor.py: MiniMaxExecutor class using OpenAI-compatible SDK with MiniMax's base URL, automatic temperature clamping to (0, 1], and a generate() method for inference compatibility
  • ragfit/processing/local_steps/api/minimax.py: MiniMaxChat processing step (mirrors OpenAIChat) for dataset augmentation pipelines
  • configs/inference-minimax.yaml: Ready-to-use inference configuration with MiniMax-M2.7
  • tests/test_minimax_executor.py: 18 unit tests covering initialization, temperature clamping, chat, generate, and processing step
  • tests/test_minimax_integration.py: 3 integration tests (skipped when MINIMAX_API_KEY is not set)
  • README.md: Updated with MiniMax provider documentation and usage examples

Usage

Inference:

MINIMAX_API_KEY=your_key python inference.py -cp configs -cn inference-minimax

Processing pipeline:

- _target_: ragfit.processing.local_steps.api.minimax.MiniMaxChat
  inputs: train
  prompt_key: prompt
  answer_key: generated_answer
  instruction: ragfit/processing/prompts/prompt_instructions/qa.txt
  model:
      model: MiniMax-M2.7

Test Plan

  • 18 unit tests pass (mocked API)
  • 3 integration tests pass with real MiniMax API
  • Import and Hydra instantiation verified
  • Verify existing tests are not affected

Add MiniMax (MiniMax-M2.7, MiniMax-M2.7-highspeed) as an alternative cloud
LLM provider alongside the existing Azure OpenAI integration.

- MiniMaxExecutor: OpenAI-compatible client with temperature clamping
- MiniMaxChat: processing pipeline step for data augmentation
- inference-minimax.yaml: ready-to-use inference configuration
- 18 unit tests + 3 integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant