Return file paths from gguf and safetensors parsers#2014
Merged
Conversation
…tation) Co-Authored-By: Claude <Agents+claude@huggingface.co>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
coyotte508
approved these changes
Mar 2, 2026
Prepend the path prefix (directory portion of the index file path) to each shard filename in the returned filepaths array, so that all entries are consistent repo-relative paths rather than a mix of full paths and bare filenames. Co-authored-by: Julien Chaumond <julien@huggingface.co>
Member
Author
Member
Author
|
CI failure seems unrelated |
Collaborator
|
this red CI is not relevant to this PR. this CI passes green on rerun. the likely scenario why the test is/was flaky is: transient network failure/timeout in CI from hub when downloading the header of one of the 64 shard files (kimi-k2.5). Re-running the CI job should made it pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ggufAllShardsnow returnsurls(the resolved shard URLs) alongsideshardsandparameterCountparseSafetensorsMetadatanow returnsfilepaths(the resolved file paths, including index + shard files for sharded models)Test plan
ggufAllShardsreturn type includesurlsfor both single and sharded GGUF filesparseSafetensorsMetadatareturn type includesfilepathsfor both single and sharded safetensorsNote
Medium Risk
Mostly additive API surface, but it changes TypeScript return types for
ggufAllShardsandparseSafetensorsMetadata, which could require downstream updates for consumers relying on the previous shapes.Overview
Adds resolved file location outputs to weight parsers.
ggufAllShardsnow returnsurlsalongsideshardsandparameterCount(for both sharded and single-file GGUF), andparseSafetensorsMetadatanow returnsfilepathslisting the weights involved (single file, or index + shard files for sharded models). Tests are updated to assert the new fields.Written by Cursor Bugbot for commit 8099f34. This will update automatically on new commits. Configure here.