Models for lmlite¶
This file lists browser-friendly models that are good candidates for lmlite (Transformers.js v4 runtime), which of them were actually run for each task, and their licences. Bare .onnx files that Transformers.js cannot load are covered at the end of the task pipelines.
lmlite accepts either:
full model IDs (for example:
Xenova/gpt2,my-org/my-model)short names (for example:
gpt2), which default toXenova/<name>
Semantic similarity (embeddings)¶
Xenova/all-MiniLM-L6-v2
Lightweight English sentence embeddings for semantic search, similarity ranking, and grouping short texts. A good starting point for browser demos where download size and latency matter. It represents meaning rather than generating answers; long documents should be split into shorter passages.Xenova/all-mpnet-base-v2
English sentence embeddings for semantic retrieval and similarity ranking when quality matters more than model size. It generally offers stronger embeddings than MiniLM at the cost of a larger download, more memory, and slower inference. Compare retrieval results on your own data before choosing it; it is not a multilingual default. Avoid its q8 weights: they average0.1cosine error against fp32 (see NATIVE.md); pindtype="fp16"inEmbedder.create().
Embedding dtype selection¶
Embedder.create(model, dtype="q8") selects that embedding dtype only, without
retrying another variant if loading fails. When dtype is omitted or None,
Transformers.js chooses its default dtype. Use backend="wasm" or "webgpu" to
select the embedding device. The default, None, retains Transformers.js’s
default device selection. Unsupported device/model/dtype combinations fail
initialization, except that "webgpu" falls back to "wasm" when the browser has no WebGPU adapter or the load fails for a WebGPU-specific reason (see WebGPU fallback); pass backend_fallback=False to fail instead.
from lmlite import Embedder
embedder = await Embedder.create("Xenova/all-MiniLM-L6-v2", dtype="q8")
vector = await embedder.embed("A short sentence to compare.")
Choose a dtype actually supported by the model’s ONNX export and runtime. For
hosted models, include the matching weights and any external data files in the
bundle; dtype="q8" typically selects onnx/model_quantized.onnx,
while "fp32" typically selects onnx/model.onnx. Missing required files fail
loading rather than falling back to a different dtype or Hub copy.
embed() uses attention-mask-weighted mean pooling and L2 normalization to return
a flat sentence vector. When comparing browser embeddings against precomputed
vectors, match the model snapshot, weights/dtype, tokenizer, input preparation,
pooling, and normalization. Follow model-card requirements for prefixes such as
E5’s query: and passage: ; lmLite does not add these automatically.
Pinning dtype reduces one source of drift, but does not guarantee bit-identical
results across runtimes. Regenerate stored vectors and recalibrate thresholds
when changing these settings.
Text classification¶
Xenova/distilbert-base-uncased-finetuned-sst-2-english
English sentiment classifier withPOSITIVEandNEGATIVElabels, useful for quick demos on reviews or short feedback. Its training is based on movie-review sentiment, so performance may differ on other domains. It has no neutral label and should not be used as a general-purpose topic classifier.Xenova/bert-base-multilingual-uncased-sentiment
Product-review sentiment classifier that predicts one to five stars for English, Dutch, German, French, Spanish, and Italian text. Useful for multilingual review-rating demos rather than binary sentiment. It is heavier than DistilBERT; star ratings should not be treated as reliable measures for unrelated domains or unsupported languages.Xenova/toxic-bert
English comment classifier for toxicity-related labels such as toxic, obscene, threat, insult, and identity hate. Useful for exploring moderation signals, not for automatically deciding whether a person or comment is harmful. Labels can overlap, and predictions can be biased or miss context; use human review for consequential decisions.
Use these with:
classifier = await Classifier.create("toxic-bert")
labels = await classifier.classify("example text", top_k=2)
Task pipelines (for pipeline(task, model=...))¶
Transformers.js only runs models with ONNX weights and a browser-supported architecture. Models in the Xenova and onnx-community namespaces usually work, but a model’s task and architecture decide, not its namespace: an unsupported architecture fails at load with Unsupported model type. model_task(model) returns the Hub’s task for a model, and model_info(model, task=...) lists its files and download size before you load it.
Each task below was run with the model in the table, in a real browser, by the opt-in tests named in the last column (see DEVELOPMENT.md). “Tested” means that and nothing more: other models of the same task are likely to work but have not been tried here. Licences are the ones the Hub lists for the Xenova repository or its base model, as of November 2026; read the model card before shipping.
Task |
Tested model |
Licence |
Tests |
|---|---|---|---|
|
none stated on the Hub |
|
|
|
Apache-2.0 |
|
|
|
Apache-2.0 |
|
|
|
|
MIT |
|
|
CC-BY-NC-4.0: non-commercial use only |
|
|
|
Apache-2.0 |
|
|
|
MIT |
|
|
|
Apache-2.0 |
|
|
|
Apache-2.0 |
|
|
|
|
Apache-2.0 |
|
|
|
Apache-2.0 |
|
|
|
Apache-2.0 |
|
|
|
Apache-2.0 |
|
Notes on the tested models¶
onnx-community/Musical-Instrument-Classification-ONNX: a wav2vec2 classifier for nine sounds (acoustic guitar, bass guitar, drum set, electric guitar, flute, hi-hats, keyboard, trumpet, violin) on 16 kHz audio. The tests only check the bridge and the result format, with a synthetic tone. By hand, on four short Wikimedia Commons clips (guitar, trumpet, violin and a flute) with the defaultq8, the top answer was right for the guitar, the trumpet and the violin and wrong for the flute (trumpet), and the best score was only 0.26 to 0.33, so show the top three and not just the first.fp32(379 MB) was no more confident and put the guitar second behind the violin;fp16failed to load in the same setup, and I did not look into why. Four clips are a spot check, not an evaluation.Xenova/mobilebert-uncased-mnli: small English NLI model that scores arbitrary candidate labels. It is fast enough for interactive demos. Short, distinct labels work best, and scores are relative to the labels you supply, not calibrated probabilities. For better accuracy, use larger NLI models such asXenova/distilbert-base-uncased-mnliorXenova/nli-deberta-v3-xsmall.Xenova/opus-mt-en-fr: compact Marian model for one language pair. Other pairs use the same naming (Xenova/opus-mt-<src>-<tgt>). Multilingual models such asXenova/nllb-200-distilled-600Mtakesrc_lang/tgt_langarguments, but they are much larger.Xenova/whisper-tiny.en: English-only Whisper, about 40 MB quantized.Xenova/whisper-tinyandXenova/whisper-baseare multilingual and acceptlanguageandtask="translate"arguments. Larger Whisper models are more accurate, but slow and memory-heavy in a browser. It transcribes a file or URL. The microphone notebook feeds it a recording fromlmlite.audio.AudioRecorder(a 16 kHz WAV), but no test transcribes a real recording.Xenova/mms-tts-eng: a VITS model with one English voice and 16 kHz output, withmodel.onnx,model_fp16.onnxandmodel_quantized.onnxfiles. A hosted copy (hosted_models_url, see hosted models) needsconfig.json,tokenizer.json,tokenizer_config.json,vocab.json,special_tokens_map.json,added_tokens.json,quantize_config.jsonandonnx/model_quantized.onnx(38 MB); thespeech-smoketests load exactly that from a local server, with no request to the Hub. Other MMS languages follow the same naming (Xenova/mms-tts-<language>) and carry the same non-commercial licence.Xenova/vit-base-patch16-224: the 1,000 ImageNet classes.Xenova/detr-resnet-50names the 80 COCO object classes (people, cats, dogs, bicycles, buses, chairs, and so on); anything else in a photo is not detected.Xenova/dinov2-smallreturns one vector per image (the first, CLS, token), because its export has no pooler layer.Xenova/clip-vit-base-patch32ranks labels you choose at call time.Xenova/modnetreturns a cut-out with an alpha channel, Depth Anything V2 small a depth image plus raw values,Xenova/detr-resnet-50-panopticone mask per segment: on the two-cats photo, withfp32, twocats, tworemotes and acouch; with the defaultq8it returns onecatcovering 97% of the photo, andfp16fails withstd::bad_allocunless an earlier run has grown the WebAssembly memory, and its config names only the object classes, so background segments come back asLABEL_<id>, and Swin2SR a 2x upscale padded to its window, so slightly wider than twice the input.
Untested, and known not to work¶
Expected to work, not tried here:
Xenova/siglip-base-patch16-224(zero-shot image classification, Apache-2.0) andXenova/yolos-tiny(object detection, Apache-2.0).Xenova/speecht5_tts(MIT) does not run in Transformers.js 4.3.2: the first call fails with “Missing the following inputs: speaker_embeddings, encoder_hidden_states, output_sequence”, withfp32andq8, and with the speaker embeddings given as a URL or aFloat32Array.Kokoro (
onnx-community/Kokoro-82M-v1.0-ONNX, Apache-2.0) is not supported by the pipeline: “Unsupported model type style_text_to_speech_2”. It needs the separatekokoro-jspackage, which lmlite does not wrap.MusicGen and other sound generation (
text-to-audiowith music models) were not tried. The Xenova MusicGen models are CC-BY-NC-4.0.Other image-output models:
briaai/RMBG-1.4(background removal) has a licence ofotheron the Hub,Xenova/segformer-b0-finetuned-ade-512-512derives from NVIDIA’s segformer, alsoother, andXenova/dpt-hybrid-midasis 533 MB: none was tried. Mask generation (SAM) is a different task and is not supported.Native backend: no pipeline task runs there.
pipeline()raisesNotImplementedError.
Bare ONNX models (for OnnxModel.load(...))¶
OnnxModel runs a single .onnx file with onnxruntime-web (WASM or WebGPU) or, outside a browser, onnxruntime. It does not need a Hugging Face repository, a config.json or a tokenizer, so the Transformers.js limits above do not apply: a model runs if onnxruntime-web (or onnxruntime) supports its operators, and you write the pre- and post-processing in NumPy. These were run:
Model |
What it is |
Licence |
Where |
|---|---|---|---|
1.2 MB face detector, |
MIT |
|
|
|
30 MB static embedding model: token ids and offsets in, 256-number unit vectors out |
MIT |
Run a bare ONNX model; run by hand, not in a test |
|
150-byte |
repository licence |
|
Limits: a model with external data files (.onnx_data) is not supported, and the whole file must fit in browser memory (a single file over 2 GB cannot load at all). float16 models run on WASM, and on WebGPU only where the adapter has shader-f16. The licence of a bare .onnx file is often missing: pass licence="..." to OnnxModel.load() and read it back from model_info(). Some popular detector weights are for non-commercial research only, so check before you ship one.
To host a bare model with a site, put it at files/models/<namespace>/<model>/model.onnx and list <namespace>/<model> in the site’s files/models/manifest.json; OnnxModel.load("<namespace>/<model>") then loads it. See Run a bare ONNX model.
Text to image: a recipe, not a pipeline task¶
Transformers.js 4.3.2 has no text-to-image task, so pipeline() cannot offer one. ch20_text-to-image.ipynb runs a diffusion model with OnnxModel instead: the CLIP tokenizer through tokenizer(), three ONNX models on WebGPU, and the scheduler in NumPy.
Model |
Licence |
Files |
|---|---|---|
|
Stability AI Non-Commercial Research Community License: research and non-commercial use only, no production use, no offering it through a hosted service |
|
The licence text says that merely distributing the weights for download (as the Hub does) is not a violation, and that offering them through your own hosted service is. Do not bundle them into a site you publish (jupyterlite -m); the notebook downloads them from the Hub into the reader’s browser. I am not a lawyer: read the licence before you use it.
Two things about the licences, read from the licence texts. The original stabilityai/sd-turbo repository now carries the newer Stability AI Community License (July 2024), which also allows commercial use below US $1,000,000 of annual revenue, with registration. The files this notebook downloads are a conversion (schmuell/sd-turbo-ort-web), and the LICENSE that ships with them is the Non-Commercial Research one (November 2023), which is why the table above names it. Neither licence counts a model’s output as a Derivative Work, so the images the model generates are not under the model’s terms: the 2024 licence adds that you own them to the extent the law permits, that they must follow Stability’s Acceptable Use Policy and the law, and that they may not be used to create or improve a foundation model.
Measured¶
Apple M-series Mac with 18 GB, Chromium on the Metal GPU (shader-f16, 4 GB buffers), Pyodide 0.29, onnxruntime-web 1.31 dev, weights served from the same machine, 512 x 512 output, one denoising step. Memory is the sum of the resident memory of every browser process, sampled twice a second. Each figure is a range over three runs on one machine.
Download from the Hub |
2.4 GB, 7 minutes on the test network |
Load |
text encoder 2.1 to 2.6 s, UNet 7.0 to 8.2 s, decoder 0.4 to 0.5 s |
First image |
2.8 to 4.3 s over three runs (shader compilation included); in the run with the stages split out: text encoder 0.2, UNet 1.8, decoder 1.8 |
Next images |
2.5 to 3.4 s |
Peak browser memory |
6.6 to 7.2 GB: the renderer 6.2 to 6.6 GB, the GPU process about 1 GB (GPU memory on Apple silicon is shared and mostly not in these figures) |
JavaScript heap |
1.8 to 1.9 GB used, of a 3.8 GB limit |
WebAssembly backend |
fails to load the UNet: |
Software WebGPU adapter (default headless Chromium) |
fails: |
|
nothing was stored in the Cache API of the test browser’s profile (an incognito-like profile with a small quota), so the file is downloaded again on each new kernel; a normal profile was not tested |
Decision¶
Keep it as a documented recipe. Do not add a text-to-image task to pipeline(), and do not drop it. It works well where the hardware allows it, but a task would promise what lmlite cannot check:
It needs a hardware GPU with float16 shaders and 1.7 GB buffers, and about 7 GB of browser memory: a recent laptop, not most phones, tablets or machines without such a GPU. The same notebook would fail on WebAssembly and on a software adapter.
The 2.4 GB download repeats on every kernel unless the browser stores it; a 1.7 GB file did not fit the Cache API in the test profile.
The model shown is licensed for non-commercial research only, which rules out lmlite shipping or hosting it.
Every model family has its own tokenizer padding, scheduler and decoder scaling (here: pad token
!, Euler withtrailingspacing, latents scaled by 0.18215), so a task would need one implementation per family.
Revisit it if a model with a permissive licence and a smaller footprint appears, or if Transformers.js adds a text-to-image pipeline. Not tried: danyalmalik/bk-sdm-small-2m-ONNX-WebGPU (OpenRAIL-M, 1.4 GB, but about 25 steps with guidance); lwanming/sd-turbo-ort-web, which the Hub tags openrail but which holds the same SD-Turbo weights (a repackaged copy’s tag does not change the licence); and stabilityai/sdxl-turbo (other).
Text generation (for LLM.create(generator_model=...))¶
Xenova/gpt2
English text-completion model for continuing a supplied passage, exploring sampling settings, and demonstrating browser inference. It is not instruction-tuned: a question or command may be continued rather than answered. Expect repetition and invented facts; it is a baseline for generation demos, not a reliable assistant.Xenova/distilgpt2
Smaller, distilled GPT-2 variant for lightweight English text-completion demos where download size and inference cost matter. It trades generation quality for a smaller model and shares GPT-2’s lack of instruction tuning. Prefer it for simple continuation experiments, not factual question answering or structured extraction.Xenova/TinyLlama-1.1B-Chat-v1.0
Compact LLaMA-family chat model for conversational responses and simple instruction-following experiments. At 1.1 billion parameters it still needs substantially more browser memory than GPT-2 or SmolLM2-360M; download size depends on the chosen ONNX dtype. Use the model’s intended chat format for best results, and expect limitations in reasoning and factual accuracy.HuggingFaceTB/SmolLM2-360M-Instruct
Compact instruction-tuned model for lightweight English tasks such as short responses, simple rewriting, and basic extraction or classification through prompts. Its small size makes it a candidate for browser demos with limited memory. Themodel_q4.onnxvariant shown below is the fastest on WebGPU but slow on WASM; see Generation dtype selection. Do not rely on it for complex reasoning, factual accuracy, or consistently valid structured output; validate generated results.
Generation dtype selection¶
The fastest dtype depends on the backend, and the two backends want opposite choices:
WebGPU: use
q4. It is the fastest variant on every model measured (q4f16, where available, was as fast), 10 to 15× faster thanq8.q8is the slowest WebGPU choice, slower thanq8on WASM, yet it is first in the default fallback order: passdtype="q4"withbackend="webgpu". Firefox cannot run 4-bit models on WebGPU (its 9-storage-buffer limit is one short of what the kernels need); usefp16there.WASM: avoid
q4. WASM 4-bit kernels are 4 to 8× slower thanq8and 7 to 11× slower thanfp16. Usefp16when the model’s fp16 file is under 2 GB (it runs as fast as fp32 at half the download), otherwiseq8, which is first in the default fallback order. A single file over 2 GB cannot load in a browser at all (ArrayBuffer size exceeds the supported range).
The chart is regenerated with uv run scripts/plot_generation_dtypes.py. The same data:
Seconds to generate 32 greedy tokens in Chrome 156 on an Apple M-series Mac (WASM single-threaded, models served locally, so download time is excluded). Sizes in parentheses are the q4 / q8 / fp16 / fp32 files:
model |
backend |
|
|
|
|
|---|---|---|---|---|---|
SmolLM2-135M-Instruct (182 / 137 / 270 / 540 MB) |
WASM |
4.35 |
0.98 |
0.59 |
0.57 |
WebGPU |
0.20 |
2.39 |
0.45 |
0.55 |
|
SmolLM2-360M-Instruct (388 / 365 / 725 MB) |
WASM |
12.5 |
2.25 |
1.16 |
|
WebGPU |
0.29 |
4.12 |
0.74 |
||
TinyLlama-1.1B-Chat (910 / 1101 / 2200 MB) |
WASM |
43.1 |
5.72 |
too large |
|
WebGPU |
0.49 |
7.58 |
too large |
The WASM pattern is the same in other browsers. SmolLM2-135M on WASM takes 4.9 / 1.0 / 0.69 / 0.61 s in Safari 26.6 and 4.6 / 1.2 / 0.58 / 0.56 s in Firefox 159 (q4 / q8 / fp16 / fp32). On WebGPU, Safari takes 0.58 s with q4 and 5.8 s with q8. The sizes give one more reason to skip 4-bit on WASM: these q4 files are not much smaller than q8, and for SmolLM2-360M they are larger.
Limited memory: an iPad running Safari¶
On an iPad (A16) in Safari, a shared WebAssembly memory was accepted at a 1 GB maximum and refused at 2 GB (issue #45). That is one device and one Safari version, and it differs between devices, versions and even reloads. onnxruntime-web copies the model file into that heap while it creates a session, on WebGPU as well as on WASM, so a file of about 300 MB fails there with std::bad_alloc (“Can’t create a session”). DistilGPT-2, on that iPad:
dtype |
file |
result |
|---|---|---|
|
85 MB |
WASM: loads and generates |
|
165 MB |
WebGPU: loads, 24 tokens in 1.9 s |
|
165 MB |
WebGPU: loads, 24 tokens in 1.5 s |
|
329 MB |
WebGPU: |
|
330 MB |
WebGPU: |
Pass a
dtypewhose file is small, as above. Theq4file of DistilGPT-2 is as large asfp32, so file sizes, not names, tell what fits. The default order (q8,int8,fp32) is a poor guess on WebGPU, and a memory error no longer moves on to the next, larger dtype.What lmLite does for such a browser. The site builds (the demo and the apps) patch onnxruntime-web to ask for a smaller memory maximum (4, 2, 1 GB, then 512 MB) instead of 4 GB, without which it cannot start there. When the browser refuses a 2 GB shared memory,
lmlite.jsalso creates sessions with weight packing off (disable_prepacking), which let DistilGPT-2q8load in a 1 GB heap at the same speed. A package install that loads onnxruntime-web from jsDelivr gets the second change only: its 4 GB request is not patched.Not measured: other models and other iPads,
fp16andq4f16on WASM, and whether a device with more memory accepts a larger maximum.
Downloading and bundling models¶
Use LLM.chat(messages) for conversational models. Transformers.js applies the
chat template from the loaded tokenizer configuration; lmLite returns only the
assistant response. Include the model’s tokenizer_config.json when hosting or
bundling assets. If no template is present, chat uses generic role labels rather
than a guessed model-specific format. Template errors and unsupported roles are
surfaced, not silently replaced with generic formatting.
The hf Pixi task downloads files into models/<namespace>/<model>/. Without a file selection it downloads the complete repository, including all ONNX variants, which can be much larger than necessary. Pass filenames after -- to download only the assets for the dtype you intend to use.
Minimal GPT-2 download (fp32)¶
Download the configuration, tokenizer, and one fp32 ONNX model (about 501 MB of weights):
pixi run hf Xenova/gpt2 -- \
config.json generation_config.json \
tokenizer.json tokenizer_config.json \
onnx/model.onnx
Load with generator_model="Xenova/gpt2", dtype="fp32". You do not need the older decoder_* files or other ONNX variants.
Minimal DistilGPT-2 download (fp32)¶
Download the configuration, tokenizer, and one fp32 ONNX model:
pixi run hf Xenova/distilgpt2 -- \
config.json generation_config.json \
tokenizer.json tokenizer_config.json \
onnx/model.onnx
Load with generator_model="Xenova/distilgpt2", dtype="fp32". As with GPT-2, the older decoder_* files and other ONNX variants are not needed.
Minimal TinyLlama download (q4)¶
Download the configuration, tokenizer, and one q4 ONNX model (about 910 MB of weights):
pixi run hf Xenova/TinyLlama-1.1B-Chat-v1.0 -- \
config.json generation_config.json \
tokenizer.json tokenizer_config.json \
onnx/model_q4.onnx
Load with generator_model="Xenova/TinyLlama-1.1B-Chat-v1.0", dtype="q4". This variant does not require a separate .onnx_data file. The q4 variant has not been confirmed by the earlier browser smoke run, which used the default dtype fallback order.
Minimal SmolLM2 download (q4)¶
q4 suits backend="webgpu". For WASM, download onnx/model_fp16.onnx instead and pass dtype="fp16" (see Generation dtype selection).
pixi run hf HuggingFaceTB/SmolLM2-360M-Instruct -- \
config.json generation_config.json \
tokenizer.json tokenizer_config.json \
onnx/model_q4.onnx
Load with the matching model ID and dtype:
llm = await LLM.create(
generator_model="HuggingFaceTB/SmolLM2-360M-Instruct",
dtype="q4",
)
These selections use the complete tokenizer.json, so separate vocab.json, merges.txt, and special_tokens_map.json files are not needed for these Transformers.js examples. Downloading only an ONNX file is insufficient. Other models or variants may require external ONNX data files; include those when applicable.
Bundling a single dtype requires explicitly selecting it, since the default fallback order does not include every variant. The download commands add files without removing previously downloaded variants; use a clean model directory if you want the bundle to contain only the listed files.
Build the bundled sites¶
After downloading the selected models:
pixi run jupyterlite -m
Individual model files are staged under content-xeus/models/ and content-pyodide/models/ before each JupyterLite build, which publishes them at the site’s HTTP files/models/<namespace>/<model>/ URLs. LLM.create(...) discovers files/models/manifest.json and Transformers.js fetches the selected files directly, bypassing the mounted /drive filesystem, with browser caching and download progress. To host an existing download tree elsewhere:
pixi run jupyterlite -M /path/to/models
The JupyterLite build hosts individual files only. Runtime loading of existing model ZIPs from local_models_path and portable ZIP exports through export_models() remain supported.
Model sources require <namespace>/<model>/config.json layout; ZIP-only sources are not supported by the build. Sources must remain outside workspace/, which the build recreates. Explicitly requested missing or empty sources fail the build. Bundling increases site size; it supplies model files but does not make the entire JupyterLite runtime or its CDN dependencies offline.
Configure your hosting server to apply gzip or Brotli HTTP compression if supported, preserving original model filenames and sending the correct Content-Encoding header. No .gz assets are required or generated by the build. An uncompressed static server remains supported.
If automatic site discovery is unavailable, pass the absolute models URL as hosted_models_url to LLM.create(...), Embedder.create(...) or Classifier.create(...). Hosted snapshots support unversioned model names and @main; other explicit revisions retain the existing ZIP/Hub behavior. Hosted models do not fall back to Hugging Face for missing required files, so select a dtype you actually downloaded. Clear the browser model cache after updating a hosted snapshot to fetch its new contents.
Notes¶
Tasks and licences: the tested models and their licences are in the task pipeline tables. A model that is not listed may still work, and
model_info()shows its files before you download them. A non-commercial licence (for example MMS-TTS) limits what you can ship, whatever lmlite supports.Model support depends on Transformers.js v4 runtime support, available ONNX files, selected backend (
backend), and dtype availability in the model repo.For generation and classification, the default dtype fallback order is
["q8", "int8", "fp32"]. Passdtypeto select one, ordtype_fallbacksto control retry order; a nonemptydtype_fallbackslist takes precedence overdtype.Embeddings use Transformers.js’s default dtype unless
Embedder.create(..., dtype=...)pins one. An embedding pin never falls back to another dtype.