Browse Source

Not asserting the answer, just that it didn't change

tags/v0.5.1
Martin Evans 2 years ago
parent
commit
6f2ab8e039
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      LLama.Unittest/StatelessExecutorTest.cs

+ 1
- 4
LLama.Unittest/StatelessExecutorTest.cs View File

@@ -30,15 +30,12 @@ namespace LLama.Unittest
var executor = new StatelessExecutor(_weights.CreateContext(_params, Encoding.UTF8));

const string question = "Question. what is a cat?\nAnswer: ";
const string expected = " a domestic or wild animal that is typically small to medium-sized, has fur, four legs, and sharp retractable claws.";
var @params = new InferenceParams { MaxTokens = 32, AntiPrompts = new[] { "." } };

var result1 = string.Join("", executor.Infer(question, @params));
Assert.Equal(expected, result1);

var result2 = string.Join("", executor.Infer(question, @params));
Assert.Equal(expected, result2);

// Check that it produced the exact same result both times
Assert.Equal(result1, result2);
}



Loading…
Cancel
Save