Skip to content

Commit 55a7aeb

Browse files
committed
fix : check-properties tests
1 parent ba5ca33 commit 55a7aeb

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

LLama.Unittest/LLamaContextTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void Dispose()
3232
[Fact]
3333
public void CheckProperties()
3434
{
35-
Assert.Equal(512u, _context.ContextSize);
35+
Assert.Equal(_context.NativeHandle.MaxSeq * 256, _context.ContextSize);
3636
Assert.Equal(960, _context.EmbeddingSize);
3737
Assert.Equal(49152, _context.Vocab.Count);
3838
}

LLama.Unittest/LLamaContextWithCustomLoggerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void Dispose()
5555
[Fact]
5656
public void CheckProperties()
5757
{
58-
Assert.Equal(512u, _context.ContextSize);
58+
Assert.Equal(_context.NativeHandle.MaxSeq * 256, _context.ContextSize);
5959
Assert.Equal(960, _context.EmbeddingSize);
6060
Assert.Equal(49152, _context.Vocab.Count);
6161
}

LLama/Native/SafeLLamaContextHandle.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ public sealed class SafeLLamaContextHandle
3333
/// Get the physical maximum batch size for this context
3434
/// </summary>
3535
public uint UBatchSize => llama_n_ubatch(this);
36+
37+
/// <summary>
38+
/// Get the number of maximum sequences allowed
39+
/// </summary>
40+
public uint MaxSeq => NativeApi.llama_n_seq_max(this);
3641

3742
/// <summary>
3843
/// Get or set the number of threads used for generation of a single token.

0 commit comments

Comments
 (0)