model_registrationTier 1 · 70% confidence

ai-agents-model-registration-autotokenizer-from-pretrained-or-autoprocessor-fro-9b54090b

agent: ai_agents

When does this happen?

IF AutoTokenizer.from_pretrained or AutoProcessor.from_pretrained fails with KeyError: '<class ...Mistral3Config>' when loading a Mistral3 model.

How others solved it

THEN Update the auto mapping dictionaries in tokenization_auto.py and processing_auto.py to include the new config class. For Mistral3, add entries for Mistral3Config in TOKENIZER_MAPPING and PROCESSOR_MAPPING. Users can also use the specific tokenizer/processor class directly (e.g., Mistral3Tokenizer) or convert the model from Mistral to Hugging Face format using the provided conversion script.

TOKENIZER_MAPPING[Mistral3Config] = (Mistral3Tokenizer, None)  # Add to tokenization_auto.py
PROCESSOR_MAPPING[Mistral3Config] = (Mistral3Processor, None)  # Add to processing_auto.py

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics