Skip to content

Return an error when a tensor's name in gguf is long#657

Open
ReinforcedKnowledge wants to merge 2 commits intoggml-org:masterfrom
ReinforcedKnowledge:master
Open

Return an error when a tensor's name in gguf is long#657
ReinforcedKnowledge wants to merge 2 commits intoggml-org:masterfrom
ReinforcedKnowledge:master

Conversation

@ReinforcedKnowledge
Copy link
Copy Markdown

Description

When writing a GGUF file, there are very few checks that are made but that could cause an error when loading and working with it. One of them is having tensor names that are longer than 64 characters.

The name of a tensor when reading tensor information doesn't have a limit of characters on it as we can see here gguf_tensor_info but when later on we work with the GGML tensors we find that there is indeed a limit which can cause an issue when looking up a tensor by its name.

Changes Made

This PR concerns gguf_init_from_file.

@ReinforcedKnowledge
Copy link
Copy Markdown
Author

This is a very small PR but as I'm trying to write blip2 in C/C++ using on GGML, I find that having an error here would have helped me find the issue with my GGUF file quicker.

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
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