Skip to content

Conversation

daminho
Copy link
Contributor

@daminho daminho commented Sep 8, 2024

Add Phi-2/Phi-1.5 Tokenizer in get_vocab_base_pre
ref: https://huggingface.co/microsoft/phi-2
image

Running example: -p "I believe the meaning of life is" -n 128
image

@github-actions github-actions bot added the python python script changes label Sep 8, 2024
@daminho daminho changed the title Add Phi-1.5/Phi-2 tokenizer feat: add Phi-1.5/Phi-2 tokenizer Sep 8, 2024
@ggerganov
Copy link
Member

The convert_hf_to_gguf_update.py scripts needs to be updated as well

@daminho
Copy link
Contributor Author

daminho commented Sep 8, 2024

@ggerganov my bad, I just updated it. Thanks for pointing it out

@bviksoe
Copy link
Contributor

bviksoe commented Sep 8, 2024

Isn't there a "phi" vs "phi2" discrepancy in this patch?

@ggerganov
Copy link
Member

llama.cpp does not handle the phi2 pre-tokenizer. The llm_load_vocab function has to be updated

@daminho
Copy link
Contributor Author

daminho commented Sep 9, 2024

I have updated, you can find the result in the updated image in description @ggerganov

@ggerganov ggerganov merged commit c837981 into ggml-org:master Sep 12, 2024
9 checks passed
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
* add phi2 tokenizer

* add phi name to convert_hf_to_gguf_update.py

* make tokenizer_pre consistent; llama.cpp work
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
* add phi2 tokenizer

* add phi name to convert_hf_to_gguf_update.py

* make tokenizer_pre consistent; llama.cpp work
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
* add phi2 tokenizer

* add phi name to convert_hf_to_gguf_update.py

* make tokenizer_pre consistent; llama.cpp work
Nexesenex pushed a commit to Nexesenex/croco.cpp that referenced this pull request Feb 25, 2025
* add phi2 tokenizer

* add phi name to convert_hf_to_gguf_update.py

* make tokenizer_pre consistent; llama.cpp work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python script changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants