From 82d84afaeafe816fc45464d8d9792895a9528078 Mon Sep 17 00:00:00 2001 From: Martin Evans Date: Sat, 16 Dec 2023 14:48:40 +0000 Subject: [PATCH] Resetting the custom sampling pipeline in the stateless executor --- LLama/LLamaStatelessExecutor.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LLama/LLamaStatelessExecutor.cs b/LLama/LLamaStatelessExecutor.cs index 831aceb2..7922db2b 100644 --- a/LLama/LLamaStatelessExecutor.cs +++ b/LLama/LLamaStatelessExecutor.cs @@ -57,6 +57,9 @@ namespace LLama using var context = _weights.CreateContext(_params, _logger); Context = context; + // Reset the sampling pipeline (if there is one) + inferenceParams?.SamplingPipeline?.Reset(); + // Sanity check inference params inferenceParams ??= new InferenceParams(); if (inferenceParams.TokensKeep > Context.ContextSize)