mistral_models.md · 8.5 KB

Mistral AI Models Configuration

Overview

The models/mistral.yaml file provides comprehensive configuration for all Mistral AI models available through their API. This configuration follows the same structure as the Gemini models configuration, ensuring consistency across the MindX system.

Model Categories

Large Language Models (LLMs)

Mistral Large Models

Mistral Small Models

Code Generation Models

Legacy Models

Embedding Models

Configuration Structure

Each model entry includes the following parameters:

Task Scores (0.0 - 1.0)

Pricing (per 1K tokens)

Technical Specifications

Capabilities

Model Selection Guidelines

For General Use

For Code Generation

For Embeddings

For Cost Optimization

Context Length Considerations

128K Context Models

64K Context Models

32K Context Models

8K Context Models

Performance Characteristics

Speed vs Quality Trade-offs

ModelSpeedQualityCostBest For
mistral-nemo-latest⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐High-throughput, simple tasks
mistral-small-latest⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Balanced performance
mistral-large-latest⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Complex reasoning, quality
codestral-latest⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Code generation

Task-Specific Recommendations

Reasoning Tasks

Code Generation

Writing Tasks

Chat/Conversation

Data Analysis

Integration with MindX

Default Model Selection

The MindX system uses these models based on configuration:

# In .env file
MINDX_LLM__MISTRAL__DEFAULT_MODEL="mistral-large-latest"
MINDX_LLM__MISTRAL__DEFAULT_MODEL_FOR_CODING="codestral-latest"
MINDX_LLM__MISTRAL__DEFAULT_MODEL_FOR_REASONING="mistral-large-latest"

Model Registry Integration

The models are automatically registered in the MindX model registry and can be selected based on:

  1. Task requirements - Automatic selection based on task scores
  2. Cost constraints - Selection based on pricing tiers
  3. Performance needs - Selection based on speed requirements
  4. Context length - Selection based on input size

Graceful Degradation

If Mistral API keys are not available, the system will:

Usage Examples

Basic Model Selection

from llm.llm_factory import LLMFactory

Get a Mistral model

model = await LLMFactory.create_llm_handler( provider="mistral", model="mistral-large-latest" )

Code Generation

# Use Codestral for code generation
code_model = await LLMFactory.create_llm_handler(
    provider="mistral",
    model="codestral-latest"
)

High-Speed Processing

# Use Nemo for high-throughput tasks
fast_model = await LLMFactory.create_llm_handler(
    provider="mistral",
    model="mistral-nemo-latest"
)

Monitoring and Analytics

Performance Metrics

The system tracks:

Model Comparison

Built-in tools allow comparison of:

Future Updates

The mistral.yaml file will be updated as new Mistral models are released. Updates include:

Support and Troubleshooting

Common Issues

  1. Model not found - Check API name spelling
  2. Context length exceeded - Use models with larger context windows
  3. Function calling not supported - Use models that support function calling
  4. High costs - Switch to more cost-effective models

Best Practices

  1. Start with small models - Test with mistral-small-latest first
  2. Monitor costs - Use cost tracking features
  3. Choose appropriate context length - Match model to input size
  4. Use specialized models - Use codestral- for code tasks

This configuration ensures optimal model selection and performance within the MindX system while maintaining cost efficiency and quality standards.


All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference