-
Notifications
You must be signed in to change notification settings - Fork 12.5k

Description
Expected Behavior
When setting '-c' to a large number, with sufficient RAM llama.cpp should run. I'm aware that it warns me that context sizes larger than 2048 might produce poor results, but the results are actually fine, if it's not crashing.
Current Behavior
When setting '-c' to a large number, llama.cpp crashes with the error message
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32289959360, available 32279078144)
(repeated many times with slightly varying numbers, see below).
To be precise, I'm using the command
./main -m ./models/65B/ggml-model-q4_0.bin -t 16 -c 3300 -b 16 -n 2048 --keep 0 --temp 0.8 \
--repeat_last_n 512 --repeat_penalty 1.1 --color \
--ignore-eos
which crashes while the same command with '-c 3200' works.
If still have plenty of free RAM (~60 GB) so that shouldn't be an issue.
This might be related to #52 but it seem to die later in the process so probably it's something different.
Environment and Context
I'm using Debian 11 and compiled using clang(++)-13 (but same result with g++) with OpenBLAS:
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 = 1 | SSE3 = 1 | VSX = 0 |
- Physical (or virtual) hardware you are using, e.g. for Linux:
$ lscpu
...
Model name: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
...
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
$ lsmem
RANGE SIZE STATE REMOVABLE BLOCK
0x0000000000000000-0x000000007fffffff 2G online yes 0
0x0000000100000000-0x00000020ffffffff 128G online yes 2-65
Memory block size: 2G
Total online memory: 130G
Total offline memory: 0B
- Operating System, e.g. for Linux:
Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
- SDK version, e.g. for Linux:
$ python3 --version
Python 3.10.9
$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
$ g++ --version
g++ (Debian 10.2.1-6) 10.2.1 20210110
$ clang++-13 --version
Debian clang version 13.0.1-6~deb11u1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
llama.cpp$ git log | head -1
commit a6956b25a1c783e5e96fe06c9c00438f846ef047
Failure Information (for bugs)
Hopefully everything stated above. Feel free to ask for details.
Steps to Reproduce
- Have an huge amount of RAM
- Execute command above
Failure Logs
main: warning: model does not support context sizes greater than 2048 tokens (3300 specified);expect poor results
main: seed = 1680105266
llama_model_load: loading model from './models/65B/ggml-model-q4_0.bin' - please wait ...
llama_model_load: n_vocab = 32000
llama_model_load: n_ctx = 3300
llama_model_load: n_embd = 8192
llama_model_load: n_mult = 256
llama_model_load: n_head = 64
llama_model_load: n_layer = 80
llama_model_load: n_rot = 128
llama_model_load: f16 = 2
llama_model_load: n_ff = 22016
llama_model_load: n_parts = 8
llama_model_load: type = 4
llama_model_load: ggml ctx size = 30783.73 MB
llama_model_load: mem required = 33343.73 MB (+ 5120.00 MB per state)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32289959360, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32289959360, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32289959360, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360771200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360771200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360771200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290025280, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290025280, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290025280, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290025280, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360837120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360837120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360837120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290091200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290091200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290091200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290091200, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360903040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360903040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360903040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290157120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290157120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290157120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290157120, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360968960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360968960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32360968960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290223040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290223040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290223040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290223040, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361034880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361034880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361034880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290288960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290288960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290288960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290288960, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361100800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361100800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361100800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290354880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290354880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290354880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290354880, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361166720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361166720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361166720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290420800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290420800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290420800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290420800, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361232640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361232640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361232640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290486720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290486720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290486720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290486720, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361298560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361298560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361298560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290552640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290552640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290552640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290552640, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361364480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361364480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361364480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290618560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290618560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290618560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290618560, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361430400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361430400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361430400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290684480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290684480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290684480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290684480, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361496320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361496320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361496320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290750400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290750400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290750400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290750400, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361562240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361562240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361562240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290816320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290816320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290816320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290816320, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361628160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361628160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361628160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290882240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290882240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290882240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290882240, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361694080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361694080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361694080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290948160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290948160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290948160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32290948160, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361760000, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361760000, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361760000, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32291014080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32291014080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32291014080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32291014080, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361825920, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361825920, available 32279078144)
ggml_new_tensor_impl: not enough space in the context's memory pool (needed 32361825920, available 32279078144)
llama_model_load: loading model part 1/8 from './models/65B/ggml-model-q4_0.bin'
llama_model_load: ........................................................................
74420 Segmentation fault ./main -m ./models/65B/ggml-model-q4_0.bin -t 16 -c 3300 -b 16 -n 2048 --keep 0 --temp 0.8 --repeat_last_n 512 --repeat_penalty 1.1 --color --ignore-eos