-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
illegal instrution #2090
Comments
If you can use cmake, try the following, may print more diagnose info.
|
@mqy ~/llama.cpp/build $ ls CMakeCache.txt bin |
you didn't run |
"the next" is building llama.cpp, then moving the GGML to the correct folder. Do not load a GGML from the downloads folder. Here are some steps to follow:
Here's an example of using llama.cpp:
*modify -t # parameter to the # of physical cores in your device. If you have an issue, then let me know precisely what step you made it to, and the error. |
@JackJollimore
|
@adaaaaaa can you run |
Thanks for your response. Please let us know I have to ask just in case: You're using Termux from Fdroid, yah? Edit: Output shows that you copied the GGML to models, which the wrong directory. The correct path is |
@JackJollimore yes,termux cpu is snapdrogan8+gen1 |
@JackJollimore 7B ggml-vocab.bin vicuna-7b-v1.3.ggmlv3.q4_1.bin |
Sorry, I'm not certain based on your response. Termux from the Google Playstore is incompatible. Termux from FDroid is required. |
yes,i run it the second time ,it output different codes now,why? |
it's download from droid-ify...not google. |
According to the output, llama.cpp works as expected from build/bin. There's no illegal instruction. Edit: please ensure Output is readable going forward.
is Termux is fully setup?
|
Since main from cmake works, I'm guessing the Illegal instruction is caused by an outdated main binary. Here is the stand output pattern:
@adaaaaaa 's main crashed right after the first line. @adaaaaaa would you please build BTW, you'd better tell us the latest commit (git log -1), it's good to follow standard bug report process, isn't? |
@mqy
|
@JackJollimore
yes,and had updated yesterday |
@Green-Sky @JackJollimore |
Thanks |
I'm having the same problem with the Snapdragon 7+ Gen 2, so maybe it's a processor-specific issue. |
I have the same processor and same issue. Appears to be related to telling the compiler to optimize to the native processor. I use the following to work around it: Find the directory the CMakelists.txt file is in, cd to that directory, and run the following line: sed -i 's/add_compile_options(-mcpu=native)//g' CMakeLists.txt Then make a build subdirectory, cd into it, and run cmake as follows: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-mcpu=cortex-a35 -march=armv8.4a+dotprod' -S ../ Now run make. You should now have a valid executable that will run without the illegal instruction problem. |
strange that:
Related issue (previous fix) #1210 |
@tcristo
get something different now...🙃 |
I have the same issue, I have a snapdragon 8 gen 2, I believe it's armv9a, same as 7 gen 2. May I know why you tell it's "mcpu=cortex-a35 -march=armv8.4a+dotprod?" a35 is quite old, and shouldn't be something like -march=armv9a? |
Problem solved for new Snapdragon (armv9a) thanks to this thread: Find the directory the CMakelists.txt file is in (should be main dir) and run the following line:
Snapdragon 8 gen 2 gives me 110ms per token for 7B Q4_K_S and -t 5 |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
system:android 13
python:3.11
model:vicuna-7b-v1.3.ggmlv3.q4_1.bin
`~/.../models/7B $ ln -s ~/storage/downloads/python/vicuna-7b-v1.3.ggmlv3.q4_1.bin ggml-model.bin
~/.../models/7B $ ls
ggml-model.bin ggml-model.bin.old
~/.../models/7B $ cd ../..
~/llama.cpp $ ./main
main: build = 776 (55dbb91)
main: seed = 1688404061
llama.cpp: loading model from models/7B/ggml-model.bin
llama_model_load_internal: format = ggjt v3 (latest)
llama_model_load_internal: n_vocab = 32000 llama_model_load_internal: n_ctx = 512 llama_model_load_internal: n_embd = 4096
llama_model_load_internal: n_mult = 256
llama_model_load_internal: n_head = 32
llama_model_load_internal: n_layer = 32 llama_model_load_internal: n_rot = 128 llama_model_load_internal: ftype = 3 (mostly Q4_1)
llama_model_load_internal: n_ff = 11008 llama_model_load_internal: model size = 7B llama_model_load_internal: ggml ctx size = 0.08 MB
Illegal instruction`
what' the next?
The text was updated successfully, but these errors were encountered: