Skip to content
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

feat: add Phi-1.5/Phi-2 tokenizer #9361

Merged
merged 3 commits into from
Sep 12, 2024
Merged

feat: add Phi-1.5/Phi-2 tokenizer #9361

merged 3 commits into from
Sep 12, 2024

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