Browse Source

Merge pull request #372 from martindevans/custom_pipeline_stateless_reset

Reset Custom Sampling Pipeline
tags/0.9.1
Martin Evans GitHub 1 year ago
parent
commit
a0232a8534
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      LLama/LLamaStatelessExecutor.cs

+ 3
- 0
LLama/LLamaStatelessExecutor.cs View File

@@ -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)


Loading…
Cancel
Save