software-mansion/react-native-executorch-lfm2.5-embedding-350m
07k
lfm2.5-embedding-350m
This repository hosts the lfm2.5-embedding-350m models exported for the React Native ExecuTorch library as ExecuTorch .pte programs, ready to run on device.
Upstream model: LFM2.5-Embedding-350M
Variants
Unshipped backends
A backend directory carrying a NOTES.md and no .pte was exported and not published. Its note records what went wrong.
coreml(why)
Repository structure
config.json 43 B
coreml/NOTES.md 1.6 kB
mlx/config.json 1015 B
mlx/lfm_2_5_embedding_350m_mlx_int4.pte 180 MB
tokenizer.json 4.5 MB
tokenizer_config.json 89.9 kB
xnnpack/config.json 1.0 kB
xnnpack/lfm_2_5_embedding_350m_xnnpack_8da4w.pte 548 MBCompatibility
These files are published for the ExecuTorch v1.4.1 runtime. ExecuTorch gives no forward compatibility guarantee, so an older runtime may fail to load them.
To use them in React Native ExecuTorch, pass the model constant shipped in the library's model registry to the corresponding task pipeline. See the documentation.
To load these files in your own ExecuTorch runtime, read the compatibility note first.
Model details
- Architecture: LFM2.5-350M bidirectional backbone (hybrid conv + attention, hidden size 1024) + CLS pooling + L2 normalize. The exported graph bakes in CLS pooling and L2 normalization, so the runner consumes
(input_ids, attention_mask)and receives the final unit-norm embedding directly. - Output dimension: 1024.
- Similarity metric: cosine (embeddings are L2-normalized, so a dot product equals cosine).
- Prompts: the model is trained with asymmetric
query:/document:text prefixes. Prependquery:to search queries anddocument:to indexed passages for best retrieval quality.
