TextTokenDataset class
Constructors
- TextTokenDataset.fromFile(String path, {required dynamic tokenizer, required int blockSize, Device device = Device.CPU})
-
Tokenize the contents of a UTF-8 text file. Convenience wrapper
over TextTokenDataset.fromText.
factory
- TextTokenDataset.fromText(String text, {required dynamic tokenizer, required int blockSize, Device device = Device.CPU})
-
Tokenize
textand expose sliding-window LM examples.factory -
TextTokenDataset.fromTokens(List<
int> tokens, {required int blockSize, Device device = Device.CPU}) -
Build directly from a pre-tokenized id list — bypasses the
tokenizer requirement, useful when tokens live in a compact
binary file.
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → LmSample -
override