Skip to content

support bpe tokenizer in convert - #2228

Merged
ggerganov merged 3 commits into
ggml-org:masterfrom
ftgreat:master
Jul 25, 2023
Merged

ggerganov merged 3 commits into
ggml-org:masterfrom
ftgreat:master

Conversation

@ftgreat

@ftgreat ftgreat commented Jul 15, 2023

Copy link
Copy Markdown
Contributor

Our released Aquila models used bpe tokenizer, so in convert.py we just add one branch for preprocessing bpe tokenizer vocab into sentencepiece in order to use following modules like inference or int4. we have make sure all encoding ids are all the same and have no impact other modules.

Could you please review this pr, thanks.
Related issue: #2093

ldwang added 2 commits July 15, 2023 14:12
Signed-off-by: ldwang <ftgreat@gmail.com>
Signed-off-by: ldwang <ftgreat@gmail.com>
@howard0su

Copy link
Copy Markdown
Contributor

Can you provide test instruction so that I can verify the change?

Signed-off-by: ldwang <ftgreat@gmail.com>
@ftgreat

ftgreat commented Jul 18, 2023

Copy link
Copy Markdown
Contributor Author

Can you provide test instruction so that I can verify the change?

instruction:
python convert.py models/7B --vocab-only --outfile models/aquila-vocab.bin --vocabtype bpe

requirements:
put vocab.json in models dir, vocab.json from Aquila-tokenizer https://github.com/FlagAI-Open/FlagAI/blob/master/examples/Aquila/Aquila-tokenizer-hf/vocab.json

@klosax

klosax commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

Note: Using an llama model with gpt2 tokenizer will be fully supported in the new ggml file format. ggml-org/ggml#302

@ftgreat

ftgreat commented Jul 25, 2023

Copy link
Copy Markdown
Contributor Author

Note: Using an llama model with gpt2 tokenizer will be fully supported in the new ggml file format. ggerganov/ggml#302

Could you please give me the support schedule?
And how to add our released models, thanks.

@ggerganov
ggerganov merged commit fce48ca into ggml-org:master Jul 25, 2023
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert, fix

Signed-off-by: ldwang <ftgreat@gmail.com>

---------

Signed-off-by: ldwang <ftgreat@gmail.com>
Co-authored-by: ldwang <ftgreat@gmail.com>
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert, fix

Signed-off-by: ldwang <ftgreat@gmail.com>

---------

Signed-off-by: ldwang <ftgreat@gmail.com>
Co-authored-by: ldwang <ftgreat@gmail.com>
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert, fix

Signed-off-by: ldwang <ftgreat@gmail.com>

---------

Signed-off-by: ldwang <ftgreat@gmail.com>
Co-authored-by: ldwang <ftgreat@gmail.com>
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert, fix

Signed-off-by: ldwang <ftgreat@gmail.com>

---------

Signed-off-by: ldwang <ftgreat@gmail.com>
Co-authored-by: ldwang <ftgreat@gmail.com>
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert

Signed-off-by: ldwang <ftgreat@gmail.com>

* support bpe tokenizer in convert, fix

Signed-off-by: ldwang <ftgreat@gmail.com>

---------

Signed-off-by: ldwang <ftgreat@gmail.com>
Co-authored-by: ldwang <ftgreat@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.

4 participants