Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a method to allow PTH files with state maps to be loaded. #2639

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

zachcp
Copy link
Contributor

@zachcp zachcp commented Nov 26, 2024

  • discussed in a Discord Thread
  • added a method to allow loading of pth files that have a state_map.

pub fn from_pth_with_state<P: AsRef<std::path::Path>>(
p: P,
dtype: DType,
state_key: String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a &str rather than a String?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Updated.

@LaurentMazare LaurentMazare merged commit b4deb5c into huggingface:main Nov 26, 2024
10 checks passed
imihalcea pushed a commit to imihalcea/candle that referenced this pull request Nov 26, 2024
…ggingface#2639)

* Provide a method to allow PTH files iwth state maps to be loaded.

* add a line to the doc

* String-. &str
@zachcp zachcp deleted the 20241126-canlde_pth branch November 27, 2024 01:12
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.

2 participants