TokenizeToEmbedding Class Reference

TokenizeToEmbedding Class Reference#

Mobilint SDK qb Compiler: TokenizeToEmbedding Class Reference
Mobilint SDK qb Compiler v1.2
MCS002-EN
TokenizeToEmbedding Class Reference

Convert tokenized text into embeddings using a Hugging Face model. More...

Detailed Description

Convert tokenized text into embeddings using a Hugging Face model.

Parameters
tokenizer_dirDirectory containing tokenizer resources.
model_dirOptional directory for the model weights; defaults to tokenizer_dir.
deviceDevice string determining where inference runs.
trust_remote_codeWhether to load custom code from the model repo.
min_seqlenMinimum token length required for a sample.
max_seqlenMaximum token length; longer sequences are truncated.
pad_to_maxWhen true, pad sequences up to max_seqlen with zeros.
dtypeNumPy dtype used for exported embeddings.

Definition at line 321 of file preprocess.py.


The documentation for this class was generated from the following file: