1 write to UnknownToken
Microsoft.ML.Tokenizers (1)
Model\CodeGenTokenizer.cs (1)
138
UnknownToken
= unknownToken;
10 references to UnknownToken
Microsoft.ML.Tokenizers (9)
Model\CodeGenTokenizer.cs (9)
146
if (!string.IsNullOrEmpty(
UnknownToken
))
148
if (!_vocab.TryGetValue(
UnknownToken
!, out (int unknownId, string token) value))
150
throw new ArgumentException($"The Unknown token '{
UnknownToken
}' is not found in the vocabulary.");
1281
AppendToBytesArray(
UnknownToken
!.AsSpan(), ref bytes, ref bytesIndex);
1422
if (
UnknownToken
!.Length > buffer.Length)
1427
UnknownToken
.AsSpan().CopyTo(buffer);
1428
buffer = buffer.Slice(
UnknownToken
.Length);
1429
charsWritten +=
UnknownToken
.Length;
1687
result.Add(GetToken(UnknownTokenId.Value,
UnknownToken
!, symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length, originalText, mapping));
Microsoft.ML.Tokenizers.Tests (1)
CodeGenTests.cs (1)
980
Assert.Equal(DefaultSpecialToken, codeGenTokenizer.
UnknownToken
);