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
parent
commit
3c6af909dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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