mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/input
IncrementalEncoder
Class IncrementalEncoder
Index
Constructors
constructor
Properties
stats
Methods
encode
seed
Constructors
constructor
new
IncrementalEncoder
(
tok
:
RawTokenizer
,
prefixOnlySpecials
:
boolean
,
)
:
IncrementalEncoder
Parameters
tok
:
RawTokenizer
prefixOnlySpecials
:
boolean
Returns
IncrementalEncoder
Properties
Readonly
stats
stats
:
EncodeStats
= ...
Methods
encode
encode
(
text
:
string
,
special
:
boolean
)
:
number
[]
Parameters
text
:
string
special
:
boolean
Returns
number
[]
seed
seed
(
text
:
string
,
ids
:
number
[]
,
addSpecialTokens
:
boolean
)
:
void
Test hook: inject a memo entry as if
ids
were the encode of
text
.
Parameters
text
:
string
ids
:
number
[]
addSpecialTokens
:
boolean
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
stats
Methods
encode
seed
Documentation
mlx-bun library API
Loading...
Test hook: inject a memo entry as if
idswere the encode oftext.