From 20b9bc1093c6bbf8911ba48a7863a8ca78ef29b7 Mon Sep 17 00:00:00 2001 From: b4rtaz Date: Sun, 28 Apr 2024 20:15:02 +0200 Subject: [PATCH] fix. --- src/transformer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformer.cpp b/src/transformer.cpp index a34dd7b..ca922bd 100644 --- a/src/transformer.cpp +++ b/src/transformer.cpp @@ -289,7 +289,7 @@ Transformer::Transformer(TransformerSpec* spec, uint8_t sliceIndex) { // TODO: cache should be for all architectures if (spec->archType == LLAMA2 || spec->archType == MIXTRAL) { - ropeCache = (float*)NEW_BUFFER(spec->vocabSize * spec->dim * sizeof(float)); + ropeCache = (float*)NEW_BUFFER(spec->seqLen * spec->dim * sizeof(float)); initRope(ropeCache, spec); } }