From b5070b854a69e4f8d93990ac8694d1903b095b98 Mon Sep 17 00:00:00 2001 From: DeProgrammer Date: Mon, 10 Feb 2025 16:05:02 -0600 Subject: [PATCH] InteractiveExecutor now stops at EOS tokens again --- LLama/LLamaInteractExecutor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LLama/LLamaInteractExecutor.cs b/LLama/LLamaInteractExecutor.cs index 250218132..d1f6833a1 100644 --- a/LLama/LLamaInteractExecutor.cs +++ b/LLama/LLamaInteractExecutor.cs @@ -213,9 +213,9 @@ private Task PreprocessLlava(string text, InferStateArgs args, bool addBos = tru return (true, Array.Empty()); } - if (_embeds.Count > 0 && _embeds.Last() == Context.Vocab.EOS) + if (_embeds.Count > 0 && _embeds.Last().IsEndOfGeneration(Context.Vocab)) { - return (true, new[] { " [end of text]\n" }); + return (true, Array.Empty()); } if (args.RemainedTokens <= 0 && inferenceParams.MaxTokens != -1)