From 55eb7ed8246f25c568c7d7f82d58eac4d7a27334 Mon Sep 17 00:00:00 2001 From: Gabriele Oliaro Date: Fri, 19 Jul 2024 23:48:42 +0000 Subject: [PATCH] fix --- src/ops/lora_linear.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ops/lora_linear.cc b/src/ops/lora_linear.cc index d20dd5b415..e412963ac3 100644 --- a/src/ops/lora_linear.cc +++ b/src/ops/lora_linear.cc @@ -125,7 +125,7 @@ PEFTModelID *FFModel::add_lora_layer(LoraLinearConfig const peft_config) { 0, true /*create_grad*/); } - layers.insert(it + 1, peft_layer); + it = layers.insert(it + 1, peft_layer); ++it; base_layer_to_peft_layer[target_module] = peft_layer; peft_layer_to_peft_id[peft_layer] = std::vector();