Skip to content

Models without Vocabulary#5798

Merged
ggerganov merged 10 commits intoggml-org:masterfrom
Xarbirus:models-without-vocab
Mar 14, 2024
Merged

Models without Vocabulary#5798
ggerganov merged 10 commits intoggml-org:masterfrom
Xarbirus:models-without-vocab

Conversation

@Xarbirus
Copy link
Copy Markdown
Contributor

I made some changes to the model converter so that it could create a gguf model without a built-in dictionary.
This will allow to use any custom external dictionary in an application built with llama.cpp.

Comment thread llama.h Outdated
Comment thread convert.py Outdated
@cebtenzzre
Copy link
Copy Markdown
Collaborator

Do you have a more specific example of a use case for this feature - e.g., a model with a vocab type not currently supported by llama.cpp, but with weights that are?

Copy link
Copy Markdown
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

This seems something that can be useful

@Xarbirus
Copy link
Copy Markdown
Contributor Author

Xarbirus commented Mar 4, 2024

@cebtenzzre right now we're using some kind of this tokenizer with the llama model trained by our ml engineers. And in our system the vocab is on the client side, and the server only processes tokens. So there is no need for the vocab to be included in the model.

@Xarbirus Xarbirus force-pushed the models-without-vocab branch from 735c684 to 2580fe5 Compare March 4, 2024 16:09
@Xarbirus Xarbirus force-pushed the models-without-vocab branch from 2580fe5 to e0504d5 Compare March 7, 2024 14:11
Comment thread convert.py Outdated
Comment thread convert.py Outdated
Comment thread llama.h Outdated
Comment thread convert.py Outdated
Comment thread convert.py Outdated
Comment thread convert.py Outdated
Comment thread convert.py
@ggerganov ggerganov merged commit 69ff613 into ggml-org:master Mar 14, 2024
NeoZhangJianyu pushed a commit to NeoZhangJianyu/llama.cpp that referenced this pull request Mar 15, 2024
* additional methods to read model and ctx parameters

* vocab size as a part of a model metadata

* models without vocabulary, convert.py part

* models without vocabulary, llama.cpp part

* PR clean up

* converter scrypt fixes

* llama_vocab_type update (renamed the new key)

* pr review fixes

* revert function renaming

* one more NoVocab assert
@Xarbirus Xarbirus deleted the models-without-vocab branch April 17, 2024 10:11
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* additional methods to read model and ctx parameters

* vocab size as a part of a model metadata

* models without vocabulary, convert.py part

* models without vocabulary, llama.cpp part

* PR clean up

* converter scrypt fixes

* llama_vocab_type update (renamed the new key)

* pr review fixes

* revert function renaming

* one more NoVocab assert
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
* additional methods to read model and ctx parameters

* vocab size as a part of a model metadata

* models without vocabulary, convert.py part

* models without vocabulary, llama.cpp part

* PR clean up

* converter scrypt fixes

* llama_vocab_type update (renamed the new key)

* pr review fixes

* revert function renaming

* one more NoVocab assert
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.

3 participants