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

Support for safetensor checkpoints #1028

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

richjames0
Copy link
Collaborator

Prior to this PR, our checkpointing code only supports loading .pth files but - in support of Mixtral 8x22B - we had need to load a safetensors file (v0.3 of the Instruct checkpoint, published by Mistral). We additionally noted that - as with .pth files - safetensors checkpoints could be split across multiple files. This PR addresses both cases.

Note we also introduce a new required command line parameter: checkpoint-type, which can take the value pth or safetensors.

Finally, a couple of minor fixes:

Set CPU count to 1 to stop some errors we otherwise see
Check that vocab size is correct instead of assuming so and slicing to it

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.

1 participant