Skip to content

converting phi-3-small error. #7922

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

Closed
0wwafa opened this issue Jun 13, 2024 · 13 comments
Closed

converting phi-3-small error. #7922

0wwafa opened this issue Jun 13, 2024 · 13 comments
Labels

Comments

@0wwafa
Copy link

0wwafa commented Jun 13, 2024

python llama.cpp/convert-hf-to-gguf.py --outtype f16 --outfile /content/Phi-3-small-128k-instruct.f16.gguf /content/Phi-3-small-128k-instruct

INFO:hf-to-gguf:Loading model: Phi-3-small-128k-instruct
ERROR:hf-to-gguf:Model Phi3SmallForCausalLM is not supported
@0wwafa
Copy link
Author

0wwafa commented Jun 13, 2024

@tannedbum
Copy link

I got past that, convert script works with L3 model but the quantize script stopped working today. Colab.

!./llama.cpp/quantize /content/models/"model".gguf "model"-q6_k.gguf q6_k

/bin/bash: line 1: ./llama.cpp/quantize: No such file or directory

@0wwafa
Copy link
Author

0wwafa commented Jun 14, 2024

I got past that, convert script works with L3 model but the quantize script stopped working today. Colab.

!./llama.cpp/quantize /content/models/"model".gguf "model"-q6_k.gguf q6_k

/bin/bash: line 1: ./llama.cpp/quantize: No such file or directory

that's because now quantize is called llama-quantize.

@0wwafa
Copy link
Author

0wwafa commented Jun 14, 2024

I got past that, convert script works with L3 model but the quantize script stopped working today. Colab.

How? With the same colab notebook? Did you change something?

@0wwafa
Copy link
Author

0wwafa commented Jun 14, 2024

I tried again but I got the same result!

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
pip install -r requirements.txt
pip install ./gguf-py/
python convert-hf-to-gguf.py --outtype f16 --outfile /content/Phi-3-small-128k-instruct.f16.gguf /content/Phi-3-small-128k-instruct

same as before.

INFO:hf-to-gguf:Loading model: Phi-3-small-128k-instruct
ERROR:hf-to-gguf:Model Phi3SmallForCausalLM is not supported

@mingxing0769
Copy link

the same error , Local or https://huggingface.co/spaces/ggml-org/gguf-my-repo

@hushaudio
Copy link

same problem here, was really hoping this would work with my fine tune as i switch to newer models but no luck

@Aisuko
Copy link
Contributor

Aisuko commented Jun 29, 2024

Phi-3-small is different architecture, see https://huggingface.co/microsoft/Phi-3-small-128k-instruct/blob/main/config.json#L4.

Currently, the script supports Phi3ForCausalLM, see https://github.com/ggerganov/llama.cpp/blob/72272b83a3878e91251218c981b4c6ec16c33912/convert-hf-to-gguf.py#L1805-L1807

In other word, it should work with microsoft/Phi-3-medium-128k-instruct. If you have enough CPU resources, maybe you want to check https://huggingface.co/aisuko/phi3-medium-128k-instruct-gguf.

Otherwise, GPT2 series also useful for testing https://huggingface.co/aisuko/gpt2-xl-gguf with 8 CPUs.

@0wwafa
Copy link
Author

0wwafa commented Jun 30, 2024

https://huggingface.co/microsoft/Phi-3-small-128k-instruct is still unsupperted.

in config.json:

"architectures": [
    "Phi3SmallForCausalLM"
  ],
  "attention_dropout_prob": 0.0,
  "auto_map": {
    "AutoConfig": "configuration_phi3_small.Phi3SmallConfig",
    "AutoModelForCausalLM": "modeling_phi3_small.Phi3SmallForCausalLM",
    "AutoTokenizer": "tokenization_phi3_small.Phi3SmallTokenizer"
  },

And convert says:

INFO:hf-to-gguf:Loading model: Phi-3-small-128k-instruct
ERROR:hf-to-gguf:Model Phi3SmallForCausalLM is not supported

@0wwafa
Copy link
Author

0wwafa commented Jun 30, 2024

@ggerganov please help.

@0wwafa
Copy link
Author

0wwafa commented Jun 30, 2024

According to https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard phi-3 is the best for it's size both the small version both the medium version. Too bad is still unsupported.

@0wwafa
Copy link
Author

0wwafa commented Jun 30, 2024

Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants