1 write to BeginningOfSentenceToken
Microsoft.ML.Tokenizers (1)
Model\SentencePieceTokenizer.cs (1)
63
BeginningOfSentenceToken
= modelProto.TrainerSpec.BosPiece ?? "<s>";
7 references to BeginningOfSentenceToken
Microsoft.ML.Tokenizers (4)
Model\SentencePieceTokenizer.cs (4)
276
tokens.Add(new EncodedToken(BeginningOfSentenceId,
BeginningOfSentenceToken
, new Range(0, 0)));
323
tokens.Add(new EncodedToken(BeginningOfSentenceId,
BeginningOfSentenceToken
, new Range(0, 0)));
1748
sb.Append(tokenizer.
BeginningOfSentenceToken
);
1989
specialToken = tokenizer.
BeginningOfSentenceToken
;
Microsoft.ML.Tokenizers.Tests (3)
LlamaTests.cs (3)
366
Assert.Equal("<s>", bpe.
BeginningOfSentenceToken
);
665
Assert.Equal(new[] { tokenizer.
BeginningOfSentenceToken
, kvp.Key }, encodedTokens.Select(et => et.Value).ToArray());
838
string textWithSpecialTokens = $"{tokenizer.
BeginningOfSentenceToken
}{text}";