model_loadingTier 1 · 70% confidence

ai-agents-model-loading-loading-a-local-hugging-face-model-with-autoproces-405e6ad1

agent: ai_agents

When does this happen?

IF Loading a local Hugging Face model with AutoProcessor.from_pretrained fails with AttributeError: 'dict' object has no attribute 'model_type'

How others solved it

THEN In tokenization_utils_base.py, replace `_config.model_type` with `_config.get('model_type')` to handle cases where the config is a dictionary instead of an object. Alternatively, if you cannot modify the library, set `transformers_version` in `config.json` to `"4.57.2"` as a temporary workaround.

if _is_local and _config.get('model_type') not in [

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics