[GH-ISSUE #1806] [BUG]: Query vector must have non-zero length #1179

Closed
opened 2026-02-22 18:23:33 -05:00 by yindo · 8 comments
Owner

Originally created by @MrLinks75 on GitHub (Jul 3, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1806

How are you running AnythingLLM?

Docker (local)

What happened?

Environment : Debian 10 (Buster)
AnythingLLM Version : Docker (Local)
LLM Source : Ollama - Qwen2:7b-instruct || Max Token : 8192
LLM Agent : Ollama - Qwen2:7b-instruct || Default function only enabled
Transcription Model : Xenova/Whisper-large
Embedding Model : Ollama - royalpha/sentence-camembert-large:latest (is advertised as "embedding" on ollama) - Max embedding chunk : 512 | Text Chunk size : 450 | Text Chunk Overlap : 50
Vector Database : LanceDB

What was tried :

  • According to issue #971 a solution was to log inside the docker and deleting the workspace through /app/server/storage/lancedb/{workspace name}.lance didn't seem to work.
  • Ollama was rebooted, and verified that the service was working correctly.

Are there known steps to reproduce?

Scenario to reproduce the error :
Loading the docker and setting up works perfectly.
User is able to converse with the model on a new workspace
The uploads of documents, and embeds into the workspace will work, however as soon as we try to talk with the LLM after embedding the following error occurs :
Failed to execute query stream: lance error: LanceError(IO): Query vector must have non-zero length, /home/build_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-0.12.1/src/dataset/scanner.rs:434:17

Originally created by @MrLinks75 on GitHub (Jul 3, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1806 ### How are you running AnythingLLM? Docker (local) ### What happened? **Environment** : Debian 10 (Buster) **AnythingLLM Version** : Docker (Local) **LLM Source** : Ollama - Qwen2:7b-instruct || Max Token : 8192 **LLM Agent** : Ollama - Qwen2:7b-instruct || Default function only enabled **Transcription Model** : Xenova/Whisper-large **Embedding Model** : Ollama - royalpha/sentence-camembert-large:latest (is advertised as "embedding" on ollama) - Max embedding chunk : 512 | Text Chunk size : 450 | Text Chunk Overlap : 50 **Vector Database** : LanceDB What was tried : - According to issue #971 a solution was to log inside the docker and deleting the workspace through `/app/server/storage/lancedb/{workspace name}.lance` didn't seem to work. - Ollama was rebooted, and verified that the service was working correctly. ### Are there known steps to reproduce? Scenario to reproduce the error : Loading the docker and setting up works perfectly. User is able to converse with the model on a new workspace The uploads of documents, and embeds into the workspace will work, however as soon as we try to talk with the LLM after embedding the following error occurs : ```Failed to execute query stream: lance error: LanceError(IO): Query vector must have non-zero length, /home/build_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-0.12.1/src/dataset/scanner.rs:434:17```
yindo added the possible bugneeds info / can't replicate labels 2026-02-22 18:23:33 -05:00
yindo closed this issue 2026-02-22 18:23:33 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jul 3, 2024):

Your embedder is failing to produce a vector

Embedding Model : Ollama - royalpha/sentence-camembert-large:latest

Do the Ollama logs show a failure here? The lanceDB error is just echoing the zero-length vector produced by the embedder call

@timothycarambat commented on GitHub (Jul 3, 2024): Your embedder is failing to produce a vector > Embedding Model : Ollama - royalpha/sentence-camembert-large:latest Do the Ollama logs show a failure here? The lanceDB error is just echoing the zero-length vector produced by the embedder call
Author
Owner

@laowalter commented on GitHub (Jul 3, 2024):

I have the same problem. Here is the outputs of ollama:

2024/07/04 09:59:32 routes.go:1064: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE: OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_MODELS: OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://*] OLLAMA_RUNNERS_DIR: OLLAMA_SCHED_SPREAD:false OLLAMA_TMPDIR: ROCR_VISIBLE_DEVICES:]"
time=2024-07-04T09:59:32.784+08:00 level=INFO source=images.go:730 msg="total blobs: 0"
time=2024-07-04T09:59:32.784+08:00 level=INFO source=images.go:737 msg="total unused blobs removed: 0"
time=2024-07-04T09:59:32.784+08:00 level=INFO source=routes.go:1111 msg="Listening on [::]:11434 (version 0.1.48)"
time=2024-07-04T09:59:32.784+08:00 level=INFO source=payload.go:30 msg="extracting embedded files" dir=/tmp/ollama1452395262/runners
time=2024-07-04T09:59:34.187+08:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v11 rocm_v60101 cpu]"
time=2024-07-04T09:59:34.285+08:00 level=INFO source=types.go:98 msg="inference compute" id=GPU-0b590d5f-8072-c4bf-7201-b913f7372a6a library=cuda compute=8.6 driver=12.4 name="NVIDIA GeForce RTX 3090" total="23.7 GiB" available="21.5 GiB"
[GIN] 2024/07/04 - 09:59:45 | 200 |      16.036µs |      172.21.0.2 | HEAD     "/"
[GIN] 2024/07/04 - 09:59:45 | 404 |     244.797µs |      172.21.0.2 | POST     "/api/embeddings"
[GIN] 2024/07/04 - 10:00:08 | 200 |      13.667µs |      172.21.0.2 | HEAD     "/"
[GIN] 2024/07/04 - 10:00:08 | 404 |      44.524µs |      172.21.0.2 | POST     "/api/embeddings"
@laowalter commented on GitHub (Jul 3, 2024): I have the same problem. Here is the outputs of ollama: ``` 2024/07/04 09:59:32 routes.go:1064: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE: OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_MODELS: OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://*] OLLAMA_RUNNERS_DIR: OLLAMA_SCHED_SPREAD:false OLLAMA_TMPDIR: ROCR_VISIBLE_DEVICES:]" time=2024-07-04T09:59:32.784+08:00 level=INFO source=images.go:730 msg="total blobs: 0" time=2024-07-04T09:59:32.784+08:00 level=INFO source=images.go:737 msg="total unused blobs removed: 0" time=2024-07-04T09:59:32.784+08:00 level=INFO source=routes.go:1111 msg="Listening on [::]:11434 (version 0.1.48)" time=2024-07-04T09:59:32.784+08:00 level=INFO source=payload.go:30 msg="extracting embedded files" dir=/tmp/ollama1452395262/runners time=2024-07-04T09:59:34.187+08:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v11 rocm_v60101 cpu]" time=2024-07-04T09:59:34.285+08:00 level=INFO source=types.go:98 msg="inference compute" id=GPU-0b590d5f-8072-c4bf-7201-b913f7372a6a library=cuda compute=8.6 driver=12.4 name="NVIDIA GeForce RTX 3090" total="23.7 GiB" available="21.5 GiB" [GIN] 2024/07/04 - 09:59:45 | 200 | 16.036µs | 172.21.0.2 | HEAD "/" [GIN] 2024/07/04 - 09:59:45 | 404 | 244.797µs | 172.21.0.2 | POST "/api/embeddings" [GIN] 2024/07/04 - 10:00:08 | 200 | 13.667µs | 172.21.0.2 | HEAD "/" [GIN] 2024/07/04 - 10:00:08 | 404 | 44.524µs | 172.21.0.2 | POST "/api/embeddings" ```
Author
Owner

@timothycarambat commented on GitHub (Jul 3, 2024):

[GIN] 2024/07/04 - 09:59:45 | 404 | 244.797µs | 172.21.0.2 | POST "/api/embeddings"

This call 404's - so the route does not exist or more likely, the model being used does not exist or is not an embedding model

@timothycarambat commented on GitHub (Jul 3, 2024): > [GIN] 2024/07/04 - 09:59:45 | 404 | 244.797µs | 172.21.0.2 | POST "/api/embeddings" This call 404's - so the route does not exist or more likely, the model being used does not exist _or_ is not an embedding model
Author
Owner

@MrLinks75 commented on GitHub (Jul 4, 2024):

Here are the most recent logs after retrying it :

juil. 04 18:01:17 anythingllm ollama[736]: [GIN] 2024/07/04 - 18:01:17 | 200 |       56.23µs |      172.17.0.2 | HEAD     "/"
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.362Z level=INFO source=memory.go:309 msg="offload to cpu" layers.requested=-1 layers.model=25 layers.offload=0 layers.split="" memory.available="[27.2 GiB]" memory.required.full="240.2 MiB" memory.required.partial="0 B" memory.required.kv="12.0 MiB" memory.required.allocations="[240.2 MiB]" memory.weights.total="175.2 MiB" memory.weights.repeating="149.6 MiB" memory.weights.nonrepeating="25.6 MiB" memory.graph.full="32.0 MiB" memory.graph.partial="32.0 MiB"
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.362Z level=INFO source=server.go:368 msg="starting llama server" cmd="/tmp/ollama275852801/runners/cpu_avx2/ollama_llama_server --model /usr/share/ollama/.ollama/models/blobs/sha256-bc28ef679b56451636a55d2d09182f8215d39f0c37358b4f9cfba0386769b406 --ctx-size 2048 --batch-size 512 --embedding --log-disable --parallel 1 --port 36477"
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=sched.go:382 msg="loaded runners" count=1
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=server.go:556 msg="waiting for llama runner to start responding"
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=server.go:594 msg="waiting for server to become available" status="llm server error"
juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] build info | build=1 commit="7c26775" tid="139642647390080" timestamp=1720116077
juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] system info | n_threads=15 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="139642647390080" timestamp=1720116077 total_threads=15
juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] HTTP server listening | hostname="127.0.0.1" n_threads_http="14" port="36477" tid="139642647390080" timestamp=1720116077
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: loaded meta data with 19 key-value pairs and 389 tensors from /usr/share/ollama/.ollama/models/blobs/sha256-bc28ef679b56451636a55d2d09182f8215d39f0c37358b4f9cfba0386769b406 (version GGUF V3 (latest))
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   0:                       general.architecture str              = bert
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   1:                               general.name str              = sentence-camembert-large
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   2:                           bert.block_count u32              = 24
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   3:                        bert.context_length u32              = 514
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   4:                      bert.embedding_length u32              = 1024
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   5:                   bert.feed_forward_length u32              = 4096
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   6:                  bert.attention.head_count u32              = 16
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   7:          bert.attention.layer_norm_epsilon f32              = 0.000010
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   8:                          general.file_type u32              = 2
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv   9:                      bert.attention.causal bool             = false
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  10:            tokenizer.ggml.token_type_count u32              = 2
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  11:                tokenizer.ggml.bos_token_id u32              = 0
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  12:                tokenizer.ggml.eos_token_id u32              = 2
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  13:                       tokenizer.ggml.model str              = bert
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  14:                      tokenizer.ggml.tokens arr[str,32005]   = ["▁<s>NOTUSED", "▁<pad>", "▁</s...
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  15:                      tokenizer.ggml.scores arr[f32,32005]   = [-1000.000000, -1000.000000, -1000.00...
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  16:                  tokenizer.ggml.token_type arr[i32,32005]   = [3, 3, 3, 3, 1, 3, 3, 1, 1, 1, 1, 1, ...
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  17:            tokenizer.ggml.padding_token_id u32              = 1
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv  18:               general.quantization_version u32              = 2
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type  f32:  244 tensors
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type q4_0:  144 tensors
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type q6_K:    1 tensors
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_vocab: special tokens cache size = 7
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_vocab: token to piece cache size = 0.2572 MB
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: format           = GGUF V3 (latest)
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: arch             = bert
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: vocab type       = WPM
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_vocab          = 32005
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_merges         = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ctx_train      = 514
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd           = 1024
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_head           = 16
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_head_kv        = 16
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_layer          = 24
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_rot            = 64
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_head_k    = 64
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_head_v    = 64
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_gqa            = 1
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_k_gqa     = 1024
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_v_gqa     = 1024
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_norm_eps       = 1.0e-05
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_norm_rms_eps   = 0.0e+00
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_clamp_kqv      = 0.0e+00
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_max_alibi_bias = 0.0e+00
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_logit_scale    = 0.0e+00
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ff             = 4096
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_expert         = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_expert_used    = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: causal attn      = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: pooling type     = -1
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope type        = 2
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope scaling     = linear
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: freq_base_train  = 10000.0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: freq_scale_train = 1
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ctx_orig_yarn  = 514
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope_finetuned   = unknown
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_conv       = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_inner      = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_state      = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_dt_rank      = 0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model type       = 335M
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model ftype      = Q4_0
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model params     = 335.61 M
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model size       = 190.88 MiB (4.77 BPW)
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: general.name     = sentence-camembert-large
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: BOS token        = 0 '▁<s>NOTUSED'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: EOS token        = 2 '▁</s>NOTUSED'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: UNK token        = 100 '▁▁on'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: SEP token        = 102 '▁h'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: PAD token        = 1 '▁<pad>'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: CLS token        = 101 '▁▁–'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: MASK token       = 103 '▁y'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: LF token         = 0 '▁<s>NOTUSED'
juil. 04 18:01:17 anythingllm ollama[736]: llm_load_tensors: ggml ctx size =    0.18 MiB
juil. 04 18:01:17 anythingllm ollama[736]: llama_model_load: error loading model: check_tensor_dims: tensor 'token_types.weight' has wrong shape; expected  1024,     2, got  1024,     1,     1,     1
juil. 04 18:01:17 anythingllm ollama[736]: llama_load_model_from_file: exception loading model
juil. 04 18:01:17 anythingllm ollama[736]: terminate called after throwing an instance of 'std::runtime_error'
juil. 04 18:01:17 anythingllm ollama[736]:   what():  check_tensor_dims: tensor 'token_types.weight' has wrong shape; expected  1024,     2, got  1024,     1,     1,     1
juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.614Z level=ERROR source=sched.go:388 msg="error loading llama server" error="llama runner process has terminated: signal: aborted "
juil. 04 18:01:17 anythingllm ollama[736]: [GIN] 2024/07/04 - 18:01:17 | 500 |  265.323347ms |      172.17.0.2 | POST     "/api/embeddings"
@MrLinks75 commented on GitHub (Jul 4, 2024): Here are the most recent logs after retrying it : ``` juil. 04 18:01:17 anythingllm ollama[736]: [GIN] 2024/07/04 - 18:01:17 | 200 | 56.23µs | 172.17.0.2 | HEAD "/" juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.362Z level=INFO source=memory.go:309 msg="offload to cpu" layers.requested=-1 layers.model=25 layers.offload=0 layers.split="" memory.available="[27.2 GiB]" memory.required.full="240.2 MiB" memory.required.partial="0 B" memory.required.kv="12.0 MiB" memory.required.allocations="[240.2 MiB]" memory.weights.total="175.2 MiB" memory.weights.repeating="149.6 MiB" memory.weights.nonrepeating="25.6 MiB" memory.graph.full="32.0 MiB" memory.graph.partial="32.0 MiB" juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.362Z level=INFO source=server.go:368 msg="starting llama server" cmd="/tmp/ollama275852801/runners/cpu_avx2/ollama_llama_server --model /usr/share/ollama/.ollama/models/blobs/sha256-bc28ef679b56451636a55d2d09182f8215d39f0c37358b4f9cfba0386769b406 --ctx-size 2048 --batch-size 512 --embedding --log-disable --parallel 1 --port 36477" juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=sched.go:382 msg="loaded runners" count=1 juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=server.go:556 msg="waiting for llama runner to start responding" juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.363Z level=INFO source=server.go:594 msg="waiting for server to become available" status="llm server error" juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] build info | build=1 commit="7c26775" tid="139642647390080" timestamp=1720116077 juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] system info | n_threads=15 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="139642647390080" timestamp=1720116077 total_threads=15 juil. 04 18:01:17 anythingllm ollama[736]: INFO [main] HTTP server listening | hostname="127.0.0.1" n_threads_http="14" port="36477" tid="139642647390080" timestamp=1720116077 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: loaded meta data with 19 key-value pairs and 389 tensors from /usr/share/ollama/.ollama/models/blobs/sha256-bc28ef679b56451636a55d2d09182f8215d39f0c37358b4f9cfba0386769b406 (version GGUF V3 (latest)) juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 0: general.architecture str = bert juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 1: general.name str = sentence-camembert-large juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 2: bert.block_count u32 = 24 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 3: bert.context_length u32 = 514 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 4: bert.embedding_length u32 = 1024 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 5: bert.feed_forward_length u32 = 4096 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 6: bert.attention.head_count u32 = 16 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 7: bert.attention.layer_norm_epsilon f32 = 0.000010 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 8: general.file_type u32 = 2 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 9: bert.attention.causal bool = false juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 10: tokenizer.ggml.token_type_count u32 = 2 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 11: tokenizer.ggml.bos_token_id u32 = 0 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 12: tokenizer.ggml.eos_token_id u32 = 2 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 13: tokenizer.ggml.model str = bert juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 14: tokenizer.ggml.tokens arr[str,32005] = ["▁<s>NOTUSED", "▁<pad>", "▁</s... juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 15: tokenizer.ggml.scores arr[f32,32005] = [-1000.000000, -1000.000000, -1000.00... juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 16: tokenizer.ggml.token_type arr[i32,32005] = [3, 3, 3, 3, 1, 3, 3, 1, 1, 1, 1, 1, ... juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 17: tokenizer.ggml.padding_token_id u32 = 1 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - kv 18: general.quantization_version u32 = 2 juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type f32: 244 tensors juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type q4_0: 144 tensors juil. 04 18:01:17 anythingllm ollama[736]: llama_model_loader: - type q6_K: 1 tensors juil. 04 18:01:17 anythingllm ollama[736]: llm_load_vocab: special tokens cache size = 7 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_vocab: token to piece cache size = 0.2572 MB juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: format = GGUF V3 (latest) juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: arch = bert juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: vocab type = WPM juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_vocab = 32005 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_merges = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ctx_train = 514 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd = 1024 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_head = 16 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_head_kv = 16 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_layer = 24 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_rot = 64 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_head_k = 64 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_head_v = 64 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_gqa = 1 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_k_gqa = 1024 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_embd_v_gqa = 1024 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_norm_eps = 1.0e-05 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_norm_rms_eps = 0.0e+00 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_clamp_kqv = 0.0e+00 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_max_alibi_bias = 0.0e+00 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: f_logit_scale = 0.0e+00 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ff = 4096 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_expert = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_expert_used = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: causal attn = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: pooling type = -1 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope type = 2 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope scaling = linear juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: freq_base_train = 10000.0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: freq_scale_train = 1 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: n_ctx_orig_yarn = 514 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: rope_finetuned = unknown juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_conv = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_inner = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_d_state = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: ssm_dt_rank = 0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model type = 335M juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model ftype = Q4_0 juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model params = 335.61 M juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: model size = 190.88 MiB (4.77 BPW) juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: general.name = sentence-camembert-large juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: BOS token = 0 '▁<s>NOTUSED' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: EOS token = 2 '▁</s>NOTUSED' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: UNK token = 100 '▁▁on' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: SEP token = 102 '▁h' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: PAD token = 1 '▁<pad>' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: CLS token = 101 '▁▁–' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: MASK token = 103 '▁y' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_print_meta: LF token = 0 '▁<s>NOTUSED' juil. 04 18:01:17 anythingllm ollama[736]: llm_load_tensors: ggml ctx size = 0.18 MiB juil. 04 18:01:17 anythingllm ollama[736]: llama_model_load: error loading model: check_tensor_dims: tensor 'token_types.weight' has wrong shape; expected 1024, 2, got 1024, 1, 1, 1 juil. 04 18:01:17 anythingllm ollama[736]: llama_load_model_from_file: exception loading model juil. 04 18:01:17 anythingllm ollama[736]: terminate called after throwing an instance of 'std::runtime_error' juil. 04 18:01:17 anythingllm ollama[736]: what(): check_tensor_dims: tensor 'token_types.weight' has wrong shape; expected 1024, 2, got 1024, 1, 1, 1 juil. 04 18:01:17 anythingllm ollama[736]: time=2024-07-04T18:01:17.614Z level=ERROR source=sched.go:388 msg="error loading llama server" error="llama runner process has terminated: signal: aborted " juil. 04 18:01:17 anythingllm ollama[736]: [GIN] 2024/07/04 - 18:01:17 | 500 | 265.323347ms | 172.17.0.2 | POST "/api/embeddings" ```
Author
Owner

@laowalter commented on GitHub (Jul 4, 2024):

[GIN] 2024/07/04 - 09:59:45 | 404 | 244.797µs | 172.21.0.2 | POST "/api/embeddings"

This call 404's - so the route does not exist or more likely, the model being used does not exist or is not an embedding model

I was use llama3:8b , it should be a non embedding model, but according https://ollama.com/blog/embedding-models, I pull an embedding model with ollama pull mxbai-embed-large:335m, still get that error, btw, I use docker.

Failed to execute query stream: lance error: LanceError(IO): Query vector must have non-zero length, /home/build_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-0.12.1/src/dataset/scanner.rs:434:17.

Here is the log:

[GIN] 2024/07/05 - 08:01:13 | 200 |         1m18s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2024/07/05 - 08:01:19 | 200 |      16.489µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/07/05 - 08:01:19 | 200 |     322.199µs |       127.0.0.1 | GET      "/api/tags"
[GIN] 2024/07/05 - 08:01:58 | 200 |     413.608µs |      172.21.0.2 | GET      "/api/tags"
[GIN] 2024/07/05 - 08:02:29 | 200 |      12.732µs |      172.21.0.2 | HEAD     "/"
[GIN] 2024/07/05 - 08:02:29 | 404 |      53.417µs |      172.21.0.2 | POST     "/api/embeddings"

Any I have tried the following command:

curl http://localhost:11434/api/embeddings -d '{
  "model": "mxbai-embed-large:335m",
  "prompt": "Llamas are members of the camelid family"
}' 
{"embedding":[0.5836910605430603,1.174238681793213,0.6437044739723206,0.8015689253807068,-0.13337066769599915,0.6463207602500916,-0.4428424537181854,0.8883296847343445,0.6466319561004639,-0.24520285427570343,0.6332620978355408,0.3442302346229553,-0.6286677718162537,0.13648957014083862,-0.5202873945236206,0.7003358602523804,0.213469460606575,-0.16699951887130737,-0.14375916123390198,-0.28568047285079956,-0.8277233839035034,0.7495803833007812,-0.8268232345581055,0.1735931783914566,1.221886396408081,1.0010429620742798,1.230084
@laowalter commented on GitHub (Jul 4, 2024): > > [GIN] 2024/07/04 - 09:59:45 | 404 | 244.797µs | 172.21.0.2 | POST "/api/embeddings" > > This call 404's - so the route does not exist or more likely, the model being used does not exist _or_ is not an embedding model I was use llama3:8b , it should be a non embedding model, but according https://ollama.com/blog/embedding-models, I pull an embedding model with ollama pull mxbai-embed-large:335m, still get that error, btw, I use docker. ` Failed to execute query stream: lance error: LanceError(IO): Query vector must have non-zero length, /home/build_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-0.12.1/src/dataset/scanner.rs:434:17.` Here is the log: ``` [GIN] 2024/07/05 - 08:01:13 | 200 | 1m18s | 127.0.0.1 | POST "/api/pull" [GIN] 2024/07/05 - 08:01:19 | 200 | 16.489µs | 127.0.0.1 | HEAD "/" [GIN] 2024/07/05 - 08:01:19 | 200 | 322.199µs | 127.0.0.1 | GET "/api/tags" [GIN] 2024/07/05 - 08:01:58 | 200 | 413.608µs | 172.21.0.2 | GET "/api/tags" [GIN] 2024/07/05 - 08:02:29 | 200 | 12.732µs | 172.21.0.2 | HEAD "/" [GIN] 2024/07/05 - 08:02:29 | 404 | 53.417µs | 172.21.0.2 | POST "/api/embeddings" ``` Any I have tried the following command: ``` curl http://localhost:11434/api/embeddings -d '{ "model": "mxbai-embed-large:335m", "prompt": "Llamas are members of the camelid family" }' {"embedding":[0.5836910605430603,1.174238681793213,0.6437044739723206,0.8015689253807068,-0.13337066769599915,0.6463207602500916,-0.4428424537181854,0.8883296847343445,0.6466319561004639,-0.24520285427570343,0.6332620978355408,0.3442302346229553,-0.6286677718162537,0.13648957014083862,-0.5202873945236206,0.7003358602523804,0.213469460606575,-0.16699951887130737,-0.14375916123390198,-0.28568047285079956,-0.8277233839035034,0.7495803833007812,-0.8268232345581055,0.1735931783914566,1.221886396408081,1.0010429620742798,1.230084 ```
Author
Owner

@timothycarambat commented on GitHub (Jul 5, 2024):

And you have mxbai-embed-large:335m as the embedding model selection in AnythingLLM? Also, does this happen on really small files? If you are using this on a large file it may be running out of memory in the ollama process

@timothycarambat commented on GitHub (Jul 5, 2024): And you have `mxbai-embed-large:335m` as the embedding model selection in AnythingLLM? Also, does this happen on really small files? If you are using this on a large file it may be running out of memory in the ollama process
Author
Owner

@timothycarambat commented on GitHub (Jul 5, 2024):

Marking as not a bug since this is a config issue, but can continue to comment within this thread

@timothycarambat commented on GitHub (Jul 5, 2024): Marking as not a bug since this is a config issue, but can continue to comment within this thread
Author
Owner

@rosscdh commented on GitHub (Jan 24, 2026):

getting a similar response.. i suspect the payload sent is too large.. and gets zeroed before sending to vector?

@rosscdh commented on GitHub (Jan 24, 2026): getting a similar response.. i suspect the payload sent is too large.. and gets zeroed before sending to vector?
yindo changed title from [BUG]: Query vector must have non-zero length to [GH-ISSUE #1806] [BUG]: Query vector must have non-zero length 2026-06-05 14:39:23 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1179