Skip to content

fix(exporters): handle read-only config in sentence-transformers >=5#2439

Open
SAY-5 wants to merge 1 commit into
huggingface:mainfrom
SAY-5:fix-sentence-transformers-config
Open

fix(exporters): handle read-only config in sentence-transformers >=5#2439
SAY-5 wants to merge 1 commit into
huggingface:mainfrom
SAY-5:fix-sentence-transformers-config

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 21, 2026

Fixes #2438

SentenceTransformer.config is a read-only property in sentence-transformers >=5, so assigning to model.config raises AttributeError. Skip the assignment when not writable and set export_model_type on the underlying transformer config directly.

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.

Exporting Models: torch_dtype is deprecated

1 participant