Skip to content

convert-hf-to-gguf-update improvements #7340

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

Merged
merged 2 commits into from
May 17, 2024

Conversation

akx
Copy link
Contributor

@akx akx commented May 17, 2024

Extracted from #7328.

This PR:

  • implements the TODO to automate updating convert-hf-to-gguf.py (by way of a simple regex replacement between two marker lines)
  • improves download speed (by using a shared requests Session)
  • improves download behavior (models aren't skipped just because there's an empty directory, and directories are created as late as possible)

akx added 2 commits May 17, 2024 14:02
* share requests session for performance
* create directories only when needed, don't skip downloads when empty directory encountered
* be more graceful about errors
Comment on lines -120 to -121
# if downloaded file is less than 1KB, we likely need to download an LFS instead
if os.path.getsize(save_path) < 1024:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll just always use a resolve URL in the post-image. Works just as well.

@akx akx marked this pull request as ready for review May 17, 2024 11:22
@ggerganov ggerganov merged commit d273c14 into ggml-org:master May 17, 2024
12 checks passed
@akx akx deleted the convert-hf-to-gguf-update-improvements branch May 17, 2024 12:49
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