-
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
I'm pegging CPU (./examples/chat.sh
works very slowly) on a 5800X3D / u22 linux, anything that can be done?
#735
Comments
To be honest I'm trying to help you, but the effort put into this issue to explain what's going on is so low... You took the time to dump the system information, but I Don't think you actually wrote more than a couple words. There's different types of performance issues going on right now. Is the slow down straight from the start, or does it get worse over time? And around how many tokens per second are you getting? edit: |
I haven't spent any time on this project but can if it would be useful. I
am not even sure this project is intended for non Mac M2 hardware.
…On Tue, Apr 4, 2023 at 23:54 MillionthOdin16 ***@***.***> wrote:
To be honest I'm trying to help you, but the effort put into this issue to
explain what's going on is so low...
You took the time to dump the system information, but I Don't think you
actually wrote more than a couple words. There's different types of
performance issues going on right now.
Is the slow down straight from the start, or does it get worse over time?
And around how many tokens per second are you getting?
edit:
Bro, and you're a software dev... 🙄
—
Reply to this email directly, view it on GitHub
<#735 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOZDW2MY2V42V5XLDJ6FPDW7UJJNANCNFSM6AAAAAAWQ2KWZA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It may not be relevant to this issue (hard to tell based on quick skim of the above), but updated context from #603 sounds like things there may have been fixed; which might potentially help here too?
|
Try setting threads to the physical core count, not the thread count - ggml/llama.cpp is memory bandwidth bound - there is a lot of open discussion about this in the issues. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Faster responses.
Current Behavior
Used all 16 threads / 8 cores for seconds to minutes when responding to chat mode.
Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
(llama.cpp) 🔥 python3 --version
Python 3.10.6
(llama.cpp) 🔥 make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(llama.cpp) 🔥 g++ --version
g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
🔥 git log | head -1
commit a0c0516
🔥 lscpu | egrep "AMD|Flags"
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 7 5800X3D 8-Core Processor
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
Virtualization:
(llama.cpp) 🔥 python3 --version
Python 3.10.6
(llama.cpp) 🔥 pip list | egrep "torch|numpy|sentencepiece"
numpy 1.24.2
sentencepiece 0.1.97
torch 2.0.0
(llama.cpp) 🔥 md5sum ./models/7B/ggml-model-q4_0.bin
f8b83a4351a2c4413aa1bb9bb995556f ./models/7B/ggml-model-q4_0.bin
(llama.cpp) 🔥 sudo perf stat ./main -m ./models/7B/ggml-model-q4_0.bin -t 16 -n 1024 -p "Please close your issue when it has been answered."
main: seed = 1680500041
llama_model_load: loading model from './models/7B/ggml-model-q4_0.bin' - please wait ...
llama_model_load: n_vocab = 32000
llama_model_load: n_ctx = 512
llama_model_load: n_embd = 4096
llama_model_load: n_mult = 256
llama_model_load: n_head = 32
llama_model_load: n_layer = 32
llama_model_load: n_rot = 128
llama_model_load: f16 = 2
llama_model_load: n_ff = 11008
llama_model_load: n_parts = 1
llama_model_load: type = 1
llama_model_load: ggml map size = 4017.70 MB
llama_model_load: ggml ctx size = 81.25 KB
llama_model_load: mem required = 5809.78 MB (+ 1026.00 MB per state)
llama_model_load: loading tensors from './models/7B/ggml-model-q4_0.bin'
llama_model_load: model size = 4017.27 MB / num tensors = 291
llama_init_from_file: kv self size = 256.00 MB
system_info: n_threads = 16 / 16 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 |
sampling: temp = 0.800000, top_k = 40, top_p = 0.950000, repeat_last_n = 64, repeat_penalty = 1.100000
generate: n_ctx = 512, n_batch = 8, n_predict = 1024, n_keep = 0
Please close your issue when it has been answered.
Please do not use this category for questions that can be directed to the main support page or other sections of our website. [end of text]
llama_print_timings: load time = 7921.97 ms
llama_print_timings: sample time = 15.50 ms / 26 runs ( 0.60 ms per run)
llama_print_timings: prompt eval time = 8986.05 ms / 11 tokens ( 816.91 ms per token)
llama_print_timings: eval time = 92976.12 ms / 25 runs ( 3719.04 ms per run)
llama_print_timings: total time = 102616.54 ms
Performance counter stats for './main -m ./models/7B/ggml-model-q4_0.bin -t 16 -n 1024 -p Please close your issue when it has been answered.':
6,088,040,635,313 cycles # 4.167 GHz (83.32%)
6,073,514,788 stalled-cycles-frontend # 0.10% frontend cycles idle (83.36%)
9,381,196,263 stalled-cycles-backend # 0.15% backend cycles idle (83.34%)
13,159,707,650,067 instructions # 2.16 insn per cycle
# 0.00 stalled cycles per insn (83.31%)
3,292,654,196,851 branches # 2.254 G/sec (83.35%)
187,524,242 branch-misses # 0.01% of all branches (83.35%)
The text was updated successfully, but these errors were encountered: