ollama some models crash on rocm (7900XT)

yizd12fk  于 5个月前  发布在  其他
关注(0)|答案(6)|浏览(52)

问题是什么?

我尝试运行(新的)嵌入示例:

curl http://10.0.3.22:11434/api/embed -d '{
  "model": "all-minilm",
  "input": ["Why is the sky blue?", "Why is the grass green?"]
}'

这触发了崩溃(我确实先拉取了模型)。请注意,它对某些模型崩溃,但对其他模型有效。例如,Llama 3.1可以正常工作。
你可能可以用输出做一些事情:

Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.014+02:00 level=DEBUG source=amd_linux.go:440 msg="updating rocm free memory" gpu=0 name=1002:744c before="19.2 GiB" now="19.2 GiB"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.014+02:00 level=DEBUG source=sched.go:181 msg="updating default concurrency" OLLAMA_MAX_LOADED_MODELS=0x604b1c442c80 gpu_count=1
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=sched.go:219 msg="loading first model" model=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=memory.go:101 msg=evaluating library=rocm gpu_count=1 available="[19.2 GiB]"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=INFO source=sched.go:710 msg="new model will fit in available VRAM in single GPU, loading" model=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662 gpu=0 parallel=4 available=20665856000 required="505.5 MiB"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=server.go:101 msg="system memory" total="62.7 GiB" free="59.4 GiB" free_swap="0 B"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=memory.go:101 msg=evaluating library=rocm gpu_count=1 available="[19.2 GiB]"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=INFO source=memory.go:309 msg="offload to rocm" layers.requested=-1 layers.model=7 layers.offload=7 layers.split="" memory.available="[19.2 GiB]" memory.required.full="505.5 MiB" memory.required.partial="505.5 MiB" memory.required.kv="768.0 KiB" memory.required.allocations="[505.5 MiB]" memory.weights.total="21.1 MiB" memory.weights.repeating="17179869184.0 GiB" memory.weights.nonrepeating="22.4 MiB" memory.graph.full="1.5 MiB" memory.graph.partial="1.5 MiB"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=payload.go:71 msg="availableServers : found" file=/tmp/ollama213676016/runners/cpu/ollama_llama_server
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=payload.go:71 msg="availableServers : found" file=/tmp/ollama213676016/runners/rocm/ollama_llama_server
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=payload.go:71 msg="availableServers : found" file=/tmp/ollama213676016/runners/cpu/ollama_llama_server
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.018+02:00 level=DEBUG source=payload.go:71 msg="availableServers : found" file=/tmp/ollama213676016/runners/rocm/ollama_llama_server
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.021+02:00 level=INFO source=server.go:392 msg="starting llama server" cmd="/tmp/ollama213676016/runners/rocm/ollama_llama_server --model /var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662 --ctx-size 1024 --batch-size 512 --embedding --log-disable --n-gpu-layers 7 --verbose --parallel 4 --port 35631"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.021+02:00 level=DEBUG source=server.go:409 msg=subprocess environment="[PATH=/home/mark/.nvm/versions/node/v20.8.0/bin:/home/mark/kde/src/kdesrc-build:/home/mark/bin:/usr/local/bin:/opt/rocm/bin:/home/mark/.local/bin:/opt/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/usr/lib/rustup/bin LD_LIBRARY_PATH=/opt/rocm/lib:/tmp/ollama213676016/runners/rocm:/tmp/ollama213676016/runners HIP_VISIBLE_DEVICES=0]"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.021+02:00 level=INFO source=sched.go:445 msg="loaded runners" count=1
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.021+02:00 level=INFO source=server.go:592 msg="waiting for llama runner to start responding"
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.022+02:00 level=INFO source=server.go:626 msg="waiting for server to become available" status="llm server error"
Aug 09 20:08:14 newphobos ollama[5524]: INFO [main] build info | build=3535 commit="1e6f6554a" tid="135273391656000" timestamp=1723226894
Aug 09 20:08:14 newphobos ollama[5524]: INFO [main] system info | n_threads=16 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 0 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="135273391656000" timestamp=1723226894 total_threads=32
Aug 09 20:08:14 newphobos ollama[5524]: INFO [main] HTTP server listening | hostname="127.0.0.1" n_threads_http="31" port="35631" tid="135273391656000" timestamp=1723226894
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: loaded meta data with 23 key-value pairs and 101 tensors from /var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662 (version GGUF V3 (latest))
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   0:                       general.architecture str              = bert
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   1:                               general.name str              = all-MiniLM-L6-v2
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   2:                           bert.block_count u32              = 6
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   3:                        bert.context_length u32              = 512
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   4:                      bert.embedding_length u32              = 384
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   5:                   bert.feed_forward_length u32              = 1536
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   6:                  bert.attention.head_count u32              = 12
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   7:          bert.attention.layer_norm_epsilon f32              = 0.000000
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   8:                          general.file_type u32              = 1
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv   9:                      bert.attention.causal bool             = false
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  10:                          bert.pooling_type u32              = 1
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  11:            tokenizer.ggml.token_type_count u32              = 2
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  12:                tokenizer.ggml.bos_token_id u32              = 101
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  13:                tokenizer.ggml.eos_token_id u32              = 102
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  14:                       tokenizer.ggml.model str              = bert
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  15:                      tokenizer.ggml.tokens arr[str,30522]   = ["[PAD]", "[unused0]", "[unused1]", "...
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  16:                      tokenizer.ggml.scores arr[f32,30522]   = [-1000.000000, -1000.000000, -1000.00...
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  17:                  tokenizer.ggml.token_type arr[i32,30522]   = [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  18:            tokenizer.ggml.unknown_token_id u32              = 100
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  19:          tokenizer.ggml.seperator_token_id u32              = 102
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  20:            tokenizer.ggml.padding_token_id u32              = 0
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  21:                tokenizer.ggml.cls_token_id u32              = 101
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - kv  22:               tokenizer.ggml.mask_token_id u32              = 103
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - type  f32:   63 tensors
Aug 09 20:08:14 newphobos ollama[5501]: llama_model_loader: - type  f16:   38 tensors
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_vocab: special tokens cache size = 5
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_vocab: token to piece cache size = 0.2032 MB
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: format           = GGUF V3 (latest)
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: arch             = bert
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: vocab type       = WPM
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_vocab          = 30522
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_merges         = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: vocab_only       = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_ctx_train      = 512
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_embd           = 384
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_layer          = 6
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_head           = 12
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_head_kv        = 12
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_rot            = 32
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_swa            = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_embd_head_k    = 32
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_embd_head_v    = 32
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_gqa            = 1
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_embd_k_gqa     = 384
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_embd_v_gqa     = 384
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: f_norm_eps       = 1.0e-12
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: f_norm_rms_eps   = 0.0e+00
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: f_clamp_kqv      = 0.0e+00
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: f_max_alibi_bias = 0.0e+00
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: f_logit_scale    = 0.0e+00
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_ff             = 1536
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_expert         = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_expert_used    = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: causal attn      = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: pooling type     = 1
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: rope type        = 2
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: rope scaling     = linear
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: freq_base_train  = 10000.0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: freq_scale_train = 1
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: n_ctx_orig_yarn  = 512
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: rope_finetuned   = unknown
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: ssm_d_conv       = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: ssm_d_inner      = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: ssm_d_state      = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: ssm_dt_rank      = 0
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: model type       = 22M
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: model ftype      = F16
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: model params     = 22.57 M
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: model size       = 43.10 MiB (16.02 BPW)
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: general.name     = all-MiniLM-L6-v2
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: BOS token        = 101 '[CLS]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: EOS token        = 102 '[SEP]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: UNK token        = 100 '[UNK]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: SEP token        = 102 '[SEP]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: PAD token        = 0 '[PAD]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: CLS token        = 101 '[CLS]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: MASK token       = 103 '[MASK]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: LF token         = 0 '[PAD]'
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_print_meta: max token length = 21
Aug 09 20:08:14 newphobos ollama[5501]: time=2024-08-09T20:08:14.272+02:00 level=INFO source=server.go:626 msg="waiting for server to become available" status="llm server loading model"
Aug 09 20:08:14 newphobos ollama[5501]: ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
Aug 09 20:08:14 newphobos ollama[5501]: ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
Aug 09 20:08:14 newphobos ollama[5501]: ggml_cuda_init: found 1 ROCm devices:
Aug 09 20:08:14 newphobos ollama[5501]:   Device 0: AMD Radeon RX 7900 XT, compute capability 11.0, VMM: no
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors: ggml ctx size =    0.08 MiB
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors: offloading 6 repeating layers to GPU
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors: offloading non-repeating layers to GPU
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors: offloaded 7/7 layers to GPU
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors:      ROCm0 buffer size =    20.37 MiB
Aug 09 20:08:14 newphobos ollama[5501]: llm_load_tensors:        CPU buffer size =    22.73 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: n_ctx      = 1024
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: n_batch    = 512
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: n_ubatch   = 512
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: flash_attn = 0
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: freq_base  = 10000.0
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: freq_scale = 1
Aug 09 20:08:15 newphobos ollama[5501]: llama_kv_cache_init:      ROCm0 KV buffer size =     9.00 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: KV self size  =    9.00 MiB, K (f16):    4.50 MiB, V (f16):    4.50 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model:        CPU  output buffer size =     0.00 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model:      ROCm0 compute buffer size =    16.01 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model:  ROCm_Host compute buffer size =     2.51 MiB
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: graph nodes  = 221
Aug 09 20:08:15 newphobos ollama[5501]: llama_new_context_with_model: graph splits = 2
Aug 09 20:08:15 newphobos ollama[5501]: /usr/lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_vector.h:1130: reference std::vector<unsigned long>::operator[](size_type) [_Tp = unsigned long, _Alloc = std::allocator<unsigned long>]: Assertion '__n < this->size()' failed.
Aug 09 20:08:15 newphobos ollama[5501]: time=2024-08-09T20:08:15.476+02:00 level=INFO source=server.go:626 msg="waiting for server to become available" status="llm server not responding"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.982+02:00 level=ERROR source=sched.go:451 msg="error loading llama server" error="llama runner process has terminated: signal: aborted (core dumped)"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.982+02:00 level=DEBUG source=sched.go:454 msg="triggering expiration for failed load" model=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.982+02:00 level=DEBUG source=sched.go:355 msg="runner expired event received" modelPath=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.982+02:00 level=DEBUG source=sched.go:371 msg="got lock to unload" modelPath=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662
Aug 09 20:08:17 newphobos ollama[5501]: [GIN] 2024/08/09 - 20:08:17 | 500 |  3.969014093s |       10.0.3.96 | POST     "/api/embed"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.983+02:00 level=DEBUG source=gpu.go:359 msg="updating system memory data" before.total="62.7 GiB" before.free="59.4 GiB" before.free_swap="0 B" now.total="62.7 GiB" now.free="59.3 GiB" now.free_swap="0 B"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.983+02:00 level=DEBUG source=amd_linux.go:440 msg="updating rocm free memory" gpu=0 name=1002:744c before="19.2 GiB" now="19.2 GiB"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.983+02:00 level=DEBUG source=server.go:1053 msg="stopping llama server"
Aug 09 20:08:17 newphobos ollama[5501]: time=2024-08-09T20:08:17.983+02:00 level=DEBUG source=sched.go:376 msg="runner released" modelPath=/var/lib/ollama/.ollama/models/blobs/sha256-797b70c4edf85907fe0a49eb85811256f65fa0f7bf52166b147fd16be2be4662
Aug 09 20:08:18 newphobos ollama[5501]: time=2024-08-09T20:08:18.234+02:00 level=DEBUG source=gpu.go:359 msg="updating system memory data" before.total="62.7 GiB" before.free="59.3 GiB" before.free_swap="0 B" now.total="62.7 GiB" now.free="59.3 GiB" now.free_swap="0 B"
Aug 09 20:08:18 newphobos ollama[5501]: time=2024-08-09T20:08:18.234+02:00 level=DEBUG source=amd_linux.go:440 msg="updating rocm free memory" gpu=0 name=1002:744c before="19.2 GiB" now="19.2 GiB"
Aug 09 20:08:18 newphobos ollama[5501]: time=2024-08-09T20:08:18.483+02:00 level=DEBUG source=gpu.go:359 msg="updating system memory data" before.total="62.7 GiB" before.free="59.3 GiB" before.free_swap="0 B" now.total="62.7 GiB" now.free="59.3 GiB" now.free_swap="0 B"

特别强调这一行:

Aug 09 20:08:15 newphobos ollama[5501]: /usr/lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_vector.h:1130: reference std::vector<unsigned long>::operator[](size_type) [_Tp = unsigned long, _Alloc = std::allocator<unsigned long>]: Assertion '__n < this->size()' failed.

索引越界?我不明白这个错误是如何/在哪里/是什么的,因为Ollama是一个Go应用程序,而这个错误是C++的。.

操作系统

Linux

GPU

AMD

CPU

AMD

Ollama版本

0.3.4

jtoj6r0c

jtoj6r0c1#

我认为你看到的C++头文件是因为Ollama正在使用llama.cpp作为后端。如果你还没有在那里发布问题,我建议你也在那里发布。

cczfrluj

cczfrluj2#

我不明白为什么或如何去那里。我根本没有直接使用llama.cpp,而且日志记录也没有显示太多关于它的内容。如果没有更多的线索,这将是一个非常无用的错误,对吧?
我很乐意在有意义的地方提供帮助,但在这里我真的不知道我能怎么帮忙。

w46czmvw

w46czmvw3#

我不明白为什么或者我应该去哪里。我根本没有直接使用llama.cpp,而且日志也没有显示太多关于它的内容。如果没有太多线索,这将是一个非常无用的错误,对吧?
我很乐意在有意义的地方提供帮助,但在这里我真的不知道我能怎么帮忙。
既然这个问题只发生在你的特定GPU上,ROCm也可能是原因。
然而,我认为这个问题与ollama本身无关。🤔

50pmv0ei

50pmv0ei4#

如果您仍然遇到这个问题,如果您可以访问Docker,请尝试使用Ollama Docker Image。在README中查找AMD GPU。我建议这个的原因是,当我试图在我的主系统上实现GPU加速时,遇到了一些奇怪的依赖问题。然而,使用Docker镜像对我来说完美无缺。也许对你来说也是类似的情况,但在你的情况下导致了你提到的错误。我认为值得一试,你怎么看?

igetnqfo

igetnqfo5#

Pff,好吧,我尽量避免使用Docker镜像,因为我使用的是发行版更新(Arch Linux)。虽然它们更新速度快,但我还是偶尔会想要更新到尚未在他们的仓库中的较新版本。
换句话说,是的,我应该尝试一下Docker镜像。即使它稍微偏离了主题,我也感到好奇。有没有办法自动更新Docker镜像?因为我并不真正喜欢不得不再次拉取镜像、找到我的执行行并重新启动它。当然,它可以工作,但这有点麻烦,而我已经在Docker中有了足够的麻烦,所以我不期待再添加另一个......

eoigrqb6

eoigrqb66#

Pff,好吧,我尽量避免使用Docker镜像,因为我使用的是发行版更新(Arch Linux)。虽然它们更新速度快,但我还是偶尔会发现自己想要更新到尚未在他们的仓库中的较新版本。
换句话说,是的,我应该尝试一下Docker镜像。即使它稍微偏离了主题,我也感到好奇。有没有办法自动更新Docker镜像?因为我不太喜欢不得不再次拉取镜像、找到我的执行行并重新启动它。当然,它可以工作,但这有点麻烦,我已经在Docker中有了足够的东西,所以再添加一个不是我期待的事情......
根据文档,这里有--pull=always
我很好奇这是否能解决你的问题。

相关问题