Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Microsoft.ML.Tokenizers/Model/BpeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ public BpeOptions(string vocabFile, string? mergesFile = null)
/// if true, the input text will be converted to UTF-8 bytes before encoding it.
/// Additionally, some ASCII characters will be transformed to different characters (e.g Space character will be transformed to 'Ġ' character).
/// </summary>
/// <remarks>
/// When this property is set to <see langword="true"/> and no pre-tokenizer is specified, the tokenizer falls
/// back to <c>PreTokenizer.CreateWordOrNonWord</c>, whose pattern does not cover whitespace characters. As
/// only the segments returned by the pre-tokenizer are encoded, whitespace is not preserved during
/// pre-tokenization and cannot be recovered by decoding.
/// To keep whitespace, set <see cref="PreTokenizer"/> to a pre-tokenizer whose pattern covers it, for example
/// a <see cref="RegexPreTokenizer"/> built from the GPT-2 pattern.
/// </remarks>
public bool ByteLevel { get; set; }

/// <summary>
Expand Down
Loading