Browse Source
Merge pull request #434 from martindevans/stateless_eos_check
Added a check for EOS token in LLamaStatelessExecutor
tags/v0.10.0
Martin Evans
GitHub
1 year ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
LLama/LLamaStatelessExecutor.cs
|
|
|
@@ -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(); |
|
|
|
|