Browse Source

Added a check for EOS token in LLamaStatelessExecutor

tags/v0.10.0
Martin Evans 2 years ago
parent
commit
f160fbd6d1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      LLama/LLamaStatelessExecutor.cs

+ 4
- 0
LLama/LLamaStatelessExecutor.cs View File

@@ -106,6 +106,10 @@ namespace LLama
);
}

// Check if this is the EOS token
if (id == _weights.EndOfSentenceToken)
break;

// Decode this token into text
decoder.Add(id);
var decoded = decoder.Read();


Loading…
Cancel
Save