BpeTrainer 构造函数

定义

重载

BpeTrainer()

使用默认值构造新的 BpeTrainer 对象。

BpeTrainer(IEnumerable<AddedToken>, Int32, Int32, ReportProgress, Nullable<Int32>, HashSet<Char>, String, String)

构造新的 BpeTrainer 对象。

BpeTrainer()

使用默认值构造新的 BpeTrainer 对象。

public BpeTrainer ();
Public Sub New ()

适用于

BpeTrainer(IEnumerable<AddedToken>, Int32, Int32, ReportProgress, Nullable<Int32>, HashSet<Char>, String, String)

构造新的 BpeTrainer 对象。

public BpeTrainer (System.Collections.Generic.IEnumerable<Microsoft.ML.Tokenizers.AddedToken>? specialTokens, int minFrequency = 0, int vocabSize = 30000, Microsoft.ML.Tokenizers.ReportProgress? progress = default, int? limitAlphabet = default, System.Collections.Generic.HashSet<char>? initialAlphabet = default, string? continuingSubwordPrefix = default, string? endOfWordSuffix = default);
new Microsoft.ML.Tokenizers.BpeTrainer : seq<Microsoft.ML.Tokenizers.AddedToken> * int * int * Microsoft.ML.Tokenizers.ReportProgress * Nullable<int> * System.Collections.Generic.HashSet<char> * string * string -> Microsoft.ML.Tokenizers.BpeTrainer
Public Sub New (specialTokens As IEnumerable(Of AddedToken), Optional minFrequency As Integer = 0, Optional vocabSize As Integer = 30000, Optional progress As ReportProgress = Nothing, Optional limitAlphabet As Nullable(Of Integer) = Nothing, Optional initialAlphabet As HashSet(Of Char) = Nothing, Optional continuingSubwordPrefix As String = Nothing, Optional endOfWordSuffix As String = Nothing)

参数

specialTokens
IEnumerable<AddedToken>

模型应知道的特殊标记的列表。

minFrequency
Int32

一对为了合并而应具有的最小频率。

vocabSize
Int32

最终词汇的大小,包括所有标记和字母表。

progress
ReportProgress

训练进度更新的回调。

limitAlphabet
Nullable<Int32>

要包含在初始字母表中的字符列表。

initialAlphabet
HashSet<Char>

包含字符串键字典及其 ID 的 JSON 文件路径

continuingSubwordPrefix
String

要用于不是词首的每个子词的前缀。

endOfWordSuffix
String

要用于作为词尾的每个子词的后缀。

适用于