Skip to content

Misc. bug: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed #13359

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

Closed
Sv-Dmitry opened this issue May 7, 2025 · 5 comments · Fixed by #13547
Labels
bug Something isn't working

Comments

@Sv-Dmitry
Copy link

Name and Version

ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
Device 0: NVIDIA GeForce RTX 3080 Laptop GPU, compute capability 8.6, VMM: yes
load_backend: loaded CUDA backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-cuda.dll
load_backend: loaded RPC backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-rpc.dll
load_backend: loaded CPU backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-cpu-haswell.dll
version: 5293 (1e333d5)
built with MSVC 19.29.30159.0 for Windows AMD64

Operating systems

Windows

Which llama.cpp modules do you know to be affected?

llama-server

Command line

llama-server.exe --jinja -fa -m .\LLM\Qwen3-1.7B-UD-Q8_K_XL.gguf -c 4096 -ngl 100 -t 8 --host 192.168.1.64 --port 5000 --log-timestamps -b 2048 -ub 2048 --temp 0.0

Problem description & steps to reproduce

It seems that when the total number of tokens (parsing + generation) exceeds or approaches the limit n_ctx_slot - llama-server instead of interrupting the response, it crashes with the following error:

ggml\src\ggml.c:1554: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed

First Bad Commit

No response

Relevant log output

.\llama-b5293-bin-win-cuda-cu12.4-x64\llama-server.exe --jinja -fa -m .\LLM\Qwen3-1.7B-UD-Q8_K_XL.gguf -c 4096 -ngl 100 -t 8 --host 192.168.1.64 --port 5000 --log-timestamps -b 2048 -ub 2048 --temp 0.0
ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 3080 Laptop GPU, compute capability 8.6, VMM: yes
load_backend: loaded CUDA backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-cuda.dll
load_backend: loaded RPC backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-rpc.dll
load_backend: loaded CPU backend from c:\D_Drive\Copies\ML_MODELS\llama-b5293-bin-win-cuda-cu12.4-x64\ggml-cpu-haswell.dll
build: 5293 (1e333d5b) with MSVC 19.29.30159.0 for Windows AMD64
system info: n_threads = 8, n_threads_batch = 8, total_threads = 16

system_info: n_threads = 8 (n_threads_batch = 8) / 16 | CUDA : ARCHS = 500,610,700,750,800 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | AARCH64_REPACK = 1 |

main: binding port with default address family
main: HTTP server is listening, hostname: 192.168.1.64, port: 5000, http threads: 15
main: loading model
srv    load_model: loading model '.\LLM\Qwen3-1.7B-UD-Q8_K_XL.gguf'
llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 3080 Laptop GPU) - 15253 MiB free
llama_model_loader: loaded meta data with 32 key-value pairs and 310 tensors from .\LLM\Qwen3-1.7B-UD-Q8_K_XL.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = qwen3
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = Qwen3-1.7B
llama_model_loader: - kv   3:                           general.basename str              = Qwen3-1.7B
llama_model_loader: - kv   4:                       general.quantized_by str              = Unsloth
llama_model_loader: - kv   5:                         general.size_label str              = 1.7B
llama_model_loader: - kv   6:                           general.repo_url str              = https://huggingface.co/unsloth
llama_model_loader: - kv   7:                          qwen3.block_count u32              = 28
llama_model_loader: - kv   8:                       qwen3.context_length u32              = 40960
llama_model_loader: - kv   9:                     qwen3.embedding_length u32              = 2048
llama_model_loader: - kv  10:                  qwen3.feed_forward_length u32              = 6144
llama_model_loader: - kv  11:                 qwen3.attention.head_count u32              = 16
llama_model_loader: - kv  12:              qwen3.attention.head_count_kv u32              = 8
llama_model_loader: - kv  13:                       qwen3.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv  14:     qwen3.attention.layer_norm_rms_epsilon f32              = 0.000001
llama_model_loader: - kv  15:                 qwen3.attention.key_length u32              = 128
llama_model_loader: - kv  16:               qwen3.attention.value_length u32              = 128
llama_model_loader: - kv  17:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  18:                         tokenizer.ggml.pre str              = qwen2
llama_model_loader: - kv  19:                      tokenizer.ggml.tokens arr[str,151936]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  20:                  tokenizer.ggml.token_type arr[i32,151936]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  21:                      tokenizer.ggml.merges arr[str,151387]  = ["─а ─а", "─а─а ─а─а", "i n", "─а t",...
llama_model_loader: - kv  22:                tokenizer.ggml.eos_token_id u32              = 151645
llama_model_loader: - kv  23:            tokenizer.ggml.padding_token_id u32              = 151654
llama_model_loader: - kv  24:               tokenizer.ggml.add_bos_token bool             = false
llama_model_loader: - kv  25:                    tokenizer.chat_template str              = {%- if tools %}\n    {{- '<|im_start|>...
llama_model_loader: - kv  26:               general.quantization_version u32              = 2
llama_model_loader: - kv  27:                          general.file_type u32              = 7
llama_model_loader: - kv  28:                      quantize.imatrix.file str              = Qwen3-1.7B-GGUF/imatrix_unsloth.dat
llama_model_loader: - kv  29:                   quantize.imatrix.dataset str              = unsloth_calibration_Qwen3-1.7B.txt
llama_model_loader: - kv  30:             quantize.imatrix.entries_count i32              = 196
llama_model_loader: - kv  31:              quantize.imatrix.chunks_count i32              = 32
llama_model_loader: - type  f32:  113 tensors
llama_model_loader: - type q8_0:  171 tensors
llama_model_loader: - type bf16:   26 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q8_0
print_info: file size   = 2.17 GiB (10.82 BPW)
load: special tokens cache size = 26
load: token to piece cache size = 0.9311 MB
print_info: arch             = qwen3
print_info: vocab_only       = 0
print_info: n_ctx_train      = 40960
print_info: n_embd           = 2048
print_info: n_layer          = 28
print_info: n_head           = 16
print_info: n_head_kv        = 8
print_info: n_rot            = 128
print_info: n_swa            = 0
print_info: n_swa_pattern    = 1
print_info: n_embd_head_k    = 128
print_info: n_embd_head_v    = 128
print_info: n_gqa            = 2
print_info: n_embd_k_gqa     = 1024
print_info: n_embd_v_gqa     = 1024
print_info: f_norm_eps       = 0.0e+00
print_info: f_norm_rms_eps   = 1.0e-06
print_info: f_clamp_kqv      = 0.0e+00
print_info: f_max_alibi_bias = 0.0e+00
print_info: f_logit_scale    = 0.0e+00
print_info: f_attn_scale     = 0.0e+00
print_info: n_ff             = 6144
print_info: n_expert         = 0
print_info: n_expert_used    = 0
print_info: causal attn      = 1
print_info: pooling type     = 0
print_info: rope type        = 2
print_info: rope scaling     = linear
print_info: freq_base_train  = 1000000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn  = 40960
print_info: rope_finetuned   = unknown
print_info: ssm_d_conv       = 0
print_info: ssm_d_inner      = 0
print_info: ssm_d_state      = 0
print_info: ssm_dt_rank      = 0
print_info: ssm_dt_b_c_rms   = 0
print_info: model type       = 1.7B
print_info: model params     = 1.72 B
print_info: general.name     = Qwen3-1.7B
print_info: vocab type       = BPE
print_info: n_vocab          = 151936
print_info: n_merges         = 151387
print_info: BOS token        = 11 ','
print_info: EOS token        = 151645 '<|im_end|>'
print_info: EOT token        = 151645 '<|im_end|>'
print_info: PAD token        = 151654 '<|vision_pad|>'
print_info: LF token         = 198 '─К'
print_info: FIM PRE token    = 151659 '<|fim_prefix|>'
print_info: FIM SUF token    = 151661 '<|fim_suffix|>'
print_info: FIM MID token    = 151660 '<|fim_middle|>'
print_info: FIM PAD token    = 151662 '<|fim_pad|>'
print_info: FIM REP token    = 151663 '<|repo_name|>'
print_info: FIM SEP token    = 151664 '<|file_sep|>'
print_info: EOG token        = 151643 '<|endoftext|>'
print_info: EOG token        = 151645 '<|im_end|>'
print_info: EOG token        = 151662 '<|fim_pad|>'
print_info: EOG token        = 151663 '<|repo_name|>'
print_info: EOG token        = 151664 '<|file_sep|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = true)
load_tensors: offloading 28 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 29/29 layers to GPU
load_tensors:        CUDA0 model buffer size =  2218.85 MiB
load_tensors:   CPU_Mapped model buffer size =   593.50 MiB
...........................................................
llama_context: constructing llama_context
llama_context: n_seq_max     = 1
llama_context: n_ctx         = 4096
llama_context: n_ctx_per_seq = 4096
llama_context: n_batch       = 2048
llama_context: n_ubatch      = 2048
llama_context: causal_attn   = 1
llama_context: flash_attn    = 1
llama_context: freq_base     = 1000000.0
llama_context: freq_scale    = 1
llama_context: n_ctx_per_seq (4096) < n_ctx_train (40960) -- the full capacity of the model will not be utilized
llama_context:  CUDA_Host  output buffer size =     0.58 MiB
llama_kv_cache_unified: kv_size = 4096, type_k = 'f16', type_v = 'f16', n_layer = 28, can_shift = 1, padding = 256
llama_kv_cache_unified:      CUDA0 KV buffer size =   448.00 MiB
llama_kv_cache_unified: KV self size  =  448.00 MiB, K (f16):  224.00 MiB, V (f16):  224.00 MiB
llama_context:      CUDA0 compute buffer size =  1203.00 MiB
llama_context:  CUDA_Host compute buffer size =    48.02 MiB
llama_context: graph nodes  = 959
llama_context: graph splits = 2
common_init_from_params: setting dry_penalty_last_n to ctx_size = 4096
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
srv          init: initializing slots, n_slots = 1
slot         init: id  0 | task -1 | new slot n_ctx_slot = 4096
main: model loaded
main: chat template, chat_template: {%- if tools %}
    {{- '<|im_start|>system\n' }}
    {%- if messages[0].role == 'system' %}
        {{- messages[0].content + '\n\n' }}
    {%- endif %}
    {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
    {%- for tool in tools %}
        {{- "\n" }}
        {{- tool | tojson }}
    {%- endfor %}
    {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
{%- else %}
    {%- if messages[0].role == 'system' %}
        {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
    {%- endif %}
{%- endif %}
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
{%- for forward_message in messages %}
    {%- set index = (messages|length - 1) - loop.index0 %}
    {%- set message = messages[index] %}
    {%- set tool_start = '<tool_response>' %}
    {%- set tool_start_length = tool_start|length %}
    {%- set start_of_message = message.content[:tool_start_length] %}
    {%- set tool_end = '</tool_response>' %}
    {%- set tool_end_length = tool_end|length %}
    {%- set start_pos = (message.content|length) - tool_end_length %}
    {%- if start_pos < 0 %}
        {%- set start_pos = 0 %}
    {%- endif %}
    {%- set end_of_message = message.content[start_pos:] %}
    {%- if ns.multi_step_tool and message.role == "user" and not(start_of_message == tool_start and end_of_message == tool_end) %}
        {%- set ns.multi_step_tool = false %}
        {%- set ns.last_query_index = index %}
    {%- endif %}
{%- endfor %}
{%- for message in messages %}
    {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
        {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
    {%- elif message.role == "assistant" %}
        {%- set content = message.content %}
        {%- set reasoning_content = '' %}
        {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
            {%- set reasoning_content = message.reasoning_content %}
        {%- else %}
            {%- if '</think>' in message.content %}
                {%- set content = (message.content.split('</think>')|last).lstrip('\n') %}
                {%- set reasoning_content = (message.content.split('</think>')|first).rstrip('\n') %}
                {%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\n') %}
            {%- endif %}
        {%- endif %}
        {%- if loop.index0 > ns.last_query_index %}
            {%- if loop.last or (not loop.last and reasoning_content) %}
                {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
            {%- else %}
                {{- '<|im_start|>' + message.role + '\n' + content }}
            {%- endif %}
        {%- else %}
            {{- '<|im_start|>' + message.role + '\n' + content }}
        {%- endif %}
        {%- if message.tool_calls %}
            {%- for tool_call in message.tool_calls %}
                {%- if (loop.first and content) or (not loop.first) %}
                    {{- '\n' }}
                {%- endif %}
                {%- if tool_call.function %}
                    {%- set tool_call = tool_call.function %}
                {%- endif %}
                {{- '<tool_call>\n{"name": "' }}
                {{- tool_call.name }}
                {{- '", "arguments": ' }}
                {%- if tool_call.arguments is string %}
                    {{- tool_call.arguments }}
                {%- else %}
                    {{- tool_call.arguments | tojson }}
                {%- endif %}
                {{- '}\n</tool_call>' }}
            {%- endfor %}
        {%- endif %}
        {{- '<|im_end|>\n' }}
    {%- elif message.role == "tool" %}
        {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
            {{- '<|im_start|>user' }}
        {%- endif %}
        {{- '\n<tool_response>\n' }}
        {{- message.content }}
        {{- '\n</tool_response>' }}
        {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
            {{- '<|im_end|>\n' }}
        {%- endif %}
    {%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
    {{- '<|im_start|>assistant\n' }}
    {%- if enable_thinking is defined and enable_thinking is false %}
        {{- '<think>\n\n</think>\n\n' }}
    {%- endif %}
{%- endif %}, example_format: '<|im_start|>system
You are a helpful assistant<|im_end|>
<|im_start|>user
Hello<|im_end|>
<|im_start|>assistant
Hi there<|im_end|>
<|im_start|>user
How are you?<|im_end|>
<|im_start|>assistant
'
main: server is listening on http://192.168.1.64:5000 - starting the main loop
srv  update_slots: all slots are idle
srv  params_from_: Chat format: Content-only
slot launch_slot_: id  0 | task 0 | processing task
slot update_slots: id  0 | task 0 | new prompt, n_ctx_slot = 4096, n_keep = 0, n_prompt_tokens = 543
slot update_slots: id  0 | task 0 | kv cache rm [0, end)
slot update_slots: id  0 | task 0 | prompt processing progress, n_past = 543, n_tokens = 543, progress = 1.000000
slot update_slots: id  0 | task 0 | prompt done, n_past = 543, n_tokens = 543
slot      release: id  0 | task 0 | stop processing: n_past = 2660, truncated = 0
slot print_timing: id  0 | task 0 |
prompt eval time =      96.55 ms /   543 tokens (    0.18 ms per token,  5624.15 tokens per second)
       eval time =   19154.37 ms /  2118 tokens (    9.04 ms per token,   110.58 tokens per second)
      total time =   19250.91 ms /  2661 tokens
srv  update_slots: all slots are idle
srv  log_server_r: request: POST /v1/chat/completions 192.168.1.64 200
srv  params_from_: Chat format: Content-only
slot launch_slot_: id  0 | task 2119 | processing task
slot update_slots: id  0 | task 2119 | new prompt, n_ctx_slot = 4096, n_keep = 0, n_prompt_tokens = 547
slot update_slots: id  0 | task 2119 | kv cache rm [538, end)
slot update_slots: id  0 | task 2119 | prompt processing progress, n_past = 547, n_tokens = 9, progress = 0.016453
slot update_slots: id  0 | task 2119 | prompt done, n_past = 547, n_tokens = 9
slot      release: id  0 | task 2119 | stop processing: n_past = 1161, truncated = 0
slot print_timing: id  0 | task 2119 |
prompt eval time =     188.43 ms /     9 tokens (   20.94 ms per token,    47.76 tokens per second)
       eval time =    5479.40 ms /   615 tokens (    8.91 ms per token,   112.24 tokens per second)
      total time =    5667.83 ms /   624 tokens
srv  update_slots: all slots are idle
srv  log_server_r: request: POST /v1/chat/completions 192.168.1.64 200
srv  params_from_: Chat format: Content-only
slot launch_slot_: id  0 | task 2735 | processing task
slot update_slots: id  0 | task 2735 | new prompt, n_ctx_slot = 4096, n_keep = 0, n_prompt_tokens = 547
slot update_slots: id  0 | task 2735 | need to evaluate at least 1 token to generate logits, n_past = 547, n_prompt_tokens = 547
slot update_slots: id  0 | task 2735 | kv cache rm [546, end)
slot update_slots: id  0 | task 2735 | prompt processing progress, n_past = 547, n_tokens = 1, progress = 0.001828
slot update_slots: id  0 | task 2735 | prompt done, n_past = 547, n_tokens = 1
slot      release: id  0 | task 2735 | stop processing: n_past = 2656, truncated = 0
slot print_timing: id  0 | task 2735 |
prompt eval time =     152.14 ms /     1 tokens (  152.14 ms per token,     6.57 tokens per second)
       eval time =   19106.85 ms /  2110 tokens (    9.06 ms per token,   110.43 tokens per second)
      total time =   19258.99 ms /  2111 tokens
srv  update_slots: all slots are idle
srv  log_server_r: request: POST /v1/chat/completions 192.168.1.64 200
srv  params_from_: Chat format: Content-only
slot launch_slot_: id  0 | task 4846 | processing task
slot update_slots: id  0 | task 4846 | new prompt, n_ctx_slot = 4096, n_keep = 0, n_prompt_tokens = 87
slot update_slots: id  0 | task 4846 | kv cache rm [1, end)
slot update_slots: id  0 | task 4846 | prompt processing progress, n_past = 87, n_tokens = 86, progress = 0.988506
slot update_slots: id  0 | task 4846 | prompt done, n_past = 87, n_tokens = 86
slot update_slots: id  0 | task 4846 | slot context shift, n_keep = 0, n_left = 4095, n_discard = 2047
D:\a\llama.cpp\llama.cpp\ggml\src\ggml.c:1554: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed
@Sv-Dmitry
Copy link
Author

Sv-Dmitry commented May 7, 2025

.\llama-b5293-bin-win-cuda-cu12.4-x64\llama-server.exe --jinja -fa -m .\LLM\Qwen3-1.7B-UD-Q8_K_XL.gguf -c 4096 -ngl 100 -t 8 --host 192.168.1.64 --port 5000 --log-timestamps -b 2048 -ub 2048 --temp 0.0

slot launch_slot_: id 0 | task 4846 | processing task
slot update_slots: id 0 | task 4846 | new prompt, n_ctx_slot = 4096, n_keep = 0, n_prompt_tokens = 87
slot update_slots: id 0 | task 4846 | kv cache rm [1, end)
slot update_slots: id 0 | task 4846 | prompt processing progress, n_past = 87, n_tokens = 86, progress = 0.988506
slot update_slots: id 0 | task 4846 | prompt done, n_past = 87, n_tokens = 86
slot update_slots: id 0 | task 4846 | slot context shift, n_keep = 0, n_left = 4095, n_discard = 2047
D:\a\llama.cpp\llama.cpp\ggml\src\ggml.c:1554: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed

I tried several models (old ones and "thinking") - the same results.

@Sv-Dmitry Sv-Dmitry changed the title Misc. bug: Misc. bug: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed May 7, 2025
@slaren slaren added bug Something isn't working and removed bug-unconfirmed labels May 14, 2025
@slaren
Copy link
Member

slaren commented May 14, 2025

@ggerganov I have tracked this to kv_self_update when reserving a worst-case graph after a shift. It fails when creating the k_l view, kv_head = 2049 and n_tokens = 2048, but the context size is only 4096, so it results in an overflow. Not sure what would be the best way to handle this.
It can be reproduced with:
llama-cli -m models/Qwen3-1.7B-UD-Q8_K_XL.gguf -c 4096 -n 99999 --ignore-eos -ngl 100 -ub 2048 -fa --jinja --temp 0 -no-cnv -p 1
Model is from https://huggingface.co/unsloth/Qwen3-1.7B-GGUF

@ggerganov
Copy link
Member

I think that this should be enough:

diff --git a/src/llama-kv-cache.cpp b/src/llama-kv-cache.cpp
index 3dcad65bb..8e160a193 100644
--- a/src/llama-kv-cache.cpp
+++ b/src/llama-kv-cache.cpp
@@ -441,6 +441,7 @@ void llama_kv_cache_unified::defrag_sched(float thold) {
 
 void llama_kv_cache_unified::set_full() {
     n = size;
+    head = 0;
 }
 
 llama_sbatch llama_kv_cache_unified::sbatch_init(

Haven't tested, just a guess atm. Will look into this further.

@slaren
Copy link
Member

slaren commented May 14, 2025

For more context, it happens after a shift + defrag, a shift alone is not enough, so it requires at least 2048 context to trigger this, and a batch size of at least half the context size. The proposed change fixes it from what I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants