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.
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
Model conversion support for T5 and FLAN-T5 model variants #8055
Model conversion support for T5 and FLAN-T5 model variants #8055
Changes from 4 commits
da4f661
47a0a0c
98931f8
a59f4f9
843b1b7
3d5019f
8a30bd0
3853e3a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason why the
decoder_start_token_id
isn't with the rest of the tokenizer config (like e.g.tokenizer.ggml.bos_token_id
)?In what way is it different from
tokenizer.ggml.bos_token_id
? When is it used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's different. It's not related to the tokenizer at all, it's a model parameter. Decoder start token is not a separate specific token like BOS, EOS or PAD. It's used in encoder-decoder models like T5 as an initial starting token of the autoregressive decoding process. The model creators decided to use one of the existing tokens as the decoder start token (PAD in case of T5) and id of this token is stored in this parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
enc
anddec
prefixes will (eventually) need to be also handled by the new markdown output mode ofgguf-dump.py
(#7853).Can be fixed in a separate PR, I'm mentioning this for future reference.
(@mofosyne, you should be aware of this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@compilade I tried it on one example model
python3 gguf-py/scripts/gguf-dump.py --markdown /mnt/md0/models/t5-small.gguf
and I'm not sure what could be fixed, can you be more specific?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the markdown output of
gguf-dump.py
, there's currently a special case for tensor names which don't start withblk
(ref: #7853 (comment), it seemed reasonable at the time), and it puts them all in the same section (so thattoken_embd.weight
is in the same section asoutput.weight
). If you try it on a non-T5 model (e.g. tinyllama or something), you'll notice that there are sections for each layer number.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #8090