File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,6 @@ class Llama {
38
38
/// Cursor position in the token list. Default is 0.
39
39
int cursor = 0 ;
40
40
41
- /// Counter for decoding operations. Default is 0.
42
- int decode = 0 ;
43
-
44
41
/// set llama.cpp library path
45
42
static String ? libraryPath;
46
43
@@ -186,7 +183,7 @@ class Llama {
186
183
final int nVocab = lib.llama_n_vocab (model);
187
184
188
185
// Get the logits for the last token generated.
189
- final logits = lib.llama_get_logits_ith (context, batch.n_tokens - 1 );
186
+ final logits = lib.llama_get_logits (context);
190
187
191
188
// Prepare candidates array to hold token data for all vocabulary items.
192
189
final Pointer <llama_token_data> candidates = calloc <llama_token_data>(nVocab);
@@ -239,7 +236,6 @@ class Llama {
239
236
lastTokens.add (newTokenId.value);
240
237
241
238
// Increment the counters.
242
- decode++ ;
243
239
cursor++ ;
244
240
245
241
// Process the next token.
@@ -282,7 +278,6 @@ class Llama {
282
278
lib.llama_kv_cache_clear (context);
283
279
batch.n_tokens = 0 ;
284
280
cursor = 0 ;
285
- decode = 0 ;
286
281
}
287
282
288
283
// Utility methods
You can’t perform that action at this time.
0 commit comments