Browse Source

llama : fix not enough space in buffer with Qwen (#5086)

slaren 2 years ago
parent
commit
011e8ec577
1 changed files with 1 additions and 1 deletions
  1. 1 1
      llama.cpp

+ 1 - 1
llama.cpp

@@ -4440,9 +4440,9 @@ static struct ggml_tensor * llm_build_kv(
 
 
     // these nodes are added to the graph together so that they are not reordered
     // these nodes are added to the graph together so that they are not reordered
     // by doing so, the number of splits in the graph is reduced
     // by doing so, the number of splits in the graph is reduced
+    ggml_build_forward_expand(graph, q_cur);
     ggml_build_forward_expand(graph, k_cur);
     ggml_build_forward_expand(graph, k_cur);
     ggml_build_forward_expand(graph, v_cur);
     ggml_build_forward_expand(graph, v_cur);
-    ggml_build_forward_expand(graph, q_cur);
 
 
     llm_build_kv_store(ctx, hparams, kv, graph, k_cur, v_cur, n_ctx, n_tokens, kv_head, cb, il);
     llm_build_kv_store(ctx, hparams, kv, graph, k_cur, v_cur, n_ctx, n_tokens, kv_head, cb, il);