finetune: fix no KV cache - #27199
Conversation
|
@ggerganov could you have a quick look? I'm planning to play a bit with finetuning and potentially add back the LoRA training example |
Hm, this does not sound right. When the example was working, we basically were creating the cache just to be able to reuse all the machinery of the KQ mask without changes. Basically the changes related to |
|
If the cache is not created now for some reason, it's simpler to just create it. Then you don't need the extra logic for |
|
Seems like the code hasn't been updated since the introduction of diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c
index 8dc0945084..2d5fdb7c10 100644
--- a/ggml/src/ggml.c
+++ b/ggml/src/ggml.c
@@ -7335,7 +7335,7 @@ void ggml_build_backward_expand(
}
// inplace operations are currently not supported
- GGML_ASSERT(!node->view_src || node->op == GGML_OP_CPY || node->op == GGML_OP_VIEW ||
+ GGML_ASSERT(!node->view_src || node->op == GGML_OP_CPY || node->op == GGML_OP_SET_ROWS || node->op == GGML_OP_VIEW ||
node->op == GGML_OP_RESHAPE || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_TRANSPOSE);
const size_t ihash = ggml_hash_find(&cgraph->visited_hash_set, node); |
|
thanks, confirm that it works now |
Overview
llama-finetuneis broken on master because training code doesn't use KV cache, but the graph still try to access it. This results in this error:This change makes ubatch to hold the entire seq and apply a mask over it.
Requirements