Skip to content

Commit 8efade0

Browse files
committed
Fixed KM tests
1 parent a74314c commit 8efade0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

LLama.KernelMemory/LLamaSharpTextEmbeddingGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ public LLamaSharpTextEmbeddingGenerator(LLamaSharpConfig config)
3333
{
3434
ContextSize = config.ContextSize,
3535
GpuLayerCount = config.GpuLayerCount ?? 20,
36-
Embeddings = true,
36+
3737
PoolingType = LLamaPoolingType.Mean,
3838
};
39+
3940
_weights = LLamaWeights.LoadFromFile(@params);
4041
_embedder = new LLamaEmbedder(_weights, @params);
4142
_ownsWeights = true;

LLama.Unittest/KernelMemory/ITextTokenizerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public ITextTokenizerTests(ITestOutputHelper testOutputHelper)
2222
_testOutputHelper = testOutputHelper;
2323

2424
_infParams = new() { AntiPrompts = ["\n\n"] };
25-
_lsConfig = new(Constants.GenerativeModelPath) { DefaultInferenceParams = _infParams };
25+
_lsConfig = new(Constants.GenerativeModelPath) { DefaultInferenceParams = _infParams, ContextSize = 512 };
2626

2727
testOutputHelper.WriteLine($"Using model {Path.GetFileName(_lsConfig.ModelPath)}");
2828
}

0 commit comments

Comments
 (0)