Skip to content

[feat] Add revision to load a specific model version#2419

Merged
tomaarsen merged 1 commit intohuggingface:masterfrom
tomaarsen:feat/revision
Jan 17, 2024
Merged

[feat] Add revision to load a specific model version#2419
tomaarsen merged 1 commit intohuggingface:masterfrom
tomaarsen:feat/revision

Conversation

@tomaarsen
Copy link
Copy Markdown
Member

@tomaarsen tomaarsen commented Jan 17, 2024

Supersedes #1645, closes #1373

Hello!

Pull Request overview

  • Add revision to load a specific model version
  • Plus some tests

Details

This adds the revision keyword argument to SentenceTransformers, and propagates it down to all huggingface_hub and transformer functions that load from the Hub. The diff is fairly big, but the change is in essence really simple.

I also added some tests to show that different revisions can indeed be successfully loaded.

Thanks @plynch-chwy @yoko92 @amine-mf for your comments on #1645 to notify me of this missing feature.

  • Tom Aarsen

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.

Support for model repository revisions

1 participant