9 references to CountTokens
Microsoft.ML.Tokenizers.Tests (9)
BpeTests.cs (1)
458Assert.Equal(expectedIds.Length, tokenizer.CountTokens(text.AsSpan()));
CodeGenTests.cs (4)
429Assert.Equal(ids.Length, codeGenTokenizer.CountTokens(text.AsSpan())); 631count = codeGenTokenizer.CountTokens(text.AsSpan()); 764count = codeGenTokenizer.CountTokens(text.AsSpan()); 919count = codeGenTokenizer.CountTokens(text.AsSpan());
EnglishRobertaTests.cs (1)
210Assert.Equal(expectedIds.Length, tokenizer.CountTokens(text.AsSpan()));
LlamaTests.cs (2)
345Assert.Equal(0, llamaTokenizer.CountTokens(Span<char>.Empty)); 633Assert.Equal(expectedIds.Length, tokenizer.CountTokens(text.AsSpan()));
TiktokenTests.cs (1)
597Assert.Equal(expectedIds.Length, tokenizer.CountTokens(text.AsSpan()));