Skip to content

Saving nested configs crashes in Pixtral #36048

@zucchini-nlp

Description

@zucchini-nlp

System Info

Issue from https://huggingface.co/mistral-community/pixtral-12b/discussions/24. When saving the config head_dim is skipped for being same as default value but when loaded back head_dim is inferred as a different value

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

from transformers import AutoConfig
config = AutoConfig.rom_pretrained("mistral-community/pixtral-12b")
config.save_pretrained("tmp")
config_second = config.from_pretrained("tmp")
# config != config_second, head-dim is missing and inferred incorrectly

Expected behavior

Will work on it, issue here so I don't forget :)

EDIT: might also be fixed with the help of community (#36077) 🤗

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions