Downloads · 30 days
0
adriandj3/LFM2.5-to-Llama8B-LLM2Vec-Kimodo
LFM2.5-to-Llama8B-LLM2Vec-Kimodo is a feature extraction model from adriandj3. Use it when you need embeddings to search or compare text. It is set up for numpy. The card lists the license as apache-2.0.
Downloads · 30 days
0
Access
Public
Updated Oct 28, 2026
Repo size
92.4 MB
Likes
3
Trending 1
Click a slice to open those files.
.npz58.8 MB · 63%
From the Hugging Face model README
Run NVIDIA Kimodo text-to-motion with a 350M encoder instead of the 16 GB Llama-3-8B one. LFM2.5-Embedding-350M + a 59 MB NumPy mapper produce vectors in the LLM2Vec space Kimodo expects. Italian prompts too.
By Adrian Ciprian Iancu · GitHub · Hugging Face · LinkedIn
</div> <p align="center"><img src="https://huggingface.co/adriandj3/LFM2.5-to-Llama8B-LLM2Vec-Kimodo/resolve/main/assets/hero.png" alt="0.7 GB encoder instead of 16 GB, 48x faster encoding in my runs, 0.85 cosine to the real Llama vector, Italian prompts supported" width="100%"></p>NVIDIA Kimodo turns a sentence into a 3D motion, but it conditions on LLM2Vec Llama-3-8B embeddings: about 16 GB of encoder for one 4096-dim vector per prompt. On my machine that encoder alone dominated memory and time. I trained a bridge so a small multilingual encoder can stand in for it:
Because LFM2.5 is multilingual, an Italian prompt lands near the Llama embedding of its English original, which the English-centric original pipeline cannot do.
| held-out captions | ridge only (first stage) | v2 bridge | gain | 95% interval of the gain |
|---|---|---|---|---|
| English test (999) | 0.823 | 0.853 | +0.029 | [0.028, 0.030] |
| Italian test (200) | 0.705 | 0.730 | +0.024 | [0.021, 0.027] |
| measured locally | LFM2.5 + bridge | LLM2Vec Llama-3-8B |
|---|---|---|
| encoder weights | about 0.7 GB | about 16 GB |
| sentences per second, my extraction runs | 190.2 | 4.0 |
| peak GPU memory in those runs | 4,970 MiB | 6,197 MiB (layer-at-a-time loader) |
| bridge alone, CPU, 2 threads | 1.8 ms (batch 1), 14.6 ms (batch 32) |
The cosine is between the bridged vector and the real Llama vector of the same caption, after centering. It measures how close the conditioning is, not motion quality: v1 side-by-side Kimodo generations kept the type of motion reliably, while fine details (which hand, for example) could drift. No new motion test was run for v2.
from pathlib import Path
import importlib.util
import numpy as np
from huggingface_hub import snapshot_download
root = Path(snapshot_download("adriandj3/LFM2.5-to-Llama8B-LLM2Vec-Kimodo", allow_patterns=["v2/*"]))
spec = importlib.util.spec_from_file_location("kimodo_bridge", root / "v2" / "bridge.py")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
mapper = module.Bridge(root / "v2")
x = np.load("lfm_document_embeddings.npy", allow_pickle=False) # (N, 1024) float32 from LFM2.5
y = mapper.transform(x, batch_size=128) # (N, 4096) float32, Llama LLM2Vec space
For Kimodo, shape one vector as (1, 1, 4096) with length 1 and pass it in place of the text-encoder output. Pin a
commit in snapshot_download(..., revision=...) for reproducibility.
Source embeddings must follow the frozen recipe: LFM2.5-Embedding-350M, float32, document prompt document: , CLS
pooling, max length 512, no extra normalization, plus the padding behavior recorded in
docs/ENCODER_RECIPE.json. Generic SentenceTransformers batches can give slightly different
vectors. examples/encode_and_map.py does the whole path and checks the checkpoint identity.
| path | what it is |
|---|---|
v2/bridge.npz + v2/bridge.py + v2/config.json | the v2 mapper (ridge + RBF residual, 2,048 anchors), NumPy only |
v2/SHA256SUMS, v2/provenance.json | checksums of the package and the numerical provenance of the fit |
examples/encode_and_map.py, tools/bridge_v2/ | encode with LFM2.5 and map, guarded runner |
docs/ | encoder recipe, inference guide, full experiment report, Kimodo optimization notes, the v1 card |
map_W_ridge.npy, map_mu_x.npy, map_mu_y.npy, map_config.json | v1 linear map, unchanged for existing users |
| candidate | validation EN | validation IT | macro |
|---|---|---|---|
| default | 0.8637 | 0.6664 | 0.7650 |
| Italian-weighted (selected) | 0.8584 | 0.7146 | 0.7865 |
0c0774a90349c77642f85564a315b5cc8b2eed5025a37b5a354967ab4a1ee8ca; every other hash, batch plan and
guard summary is in v2/provenance.json. The detailed v2 card is v2/README.md,
the full report docs/REPORT_FULL_CORPUS.md.The root map_W_ridge.npy, map_mu_x.npy, map_mu_y.npy and map_config.json are the v1 linear map and stay
unchanged, so filename-based downloads keep working. The original v1 card is archived in
docs/V1_README.md, and revision a43f1c659576
pins the original release. v1 numbers used an earlier protocol and are not directly comparable with the tables above.
The bridge code and fitted parameters: Apache-2.0 (v2/LICENSE). This does not relicense the upstream models or data, whose own terms apply: LiquidAI LFM2.5-Embedding-350M (source encoder), McGill-NLP LLM2Vec and Meta Llama 3 (target space), NVIDIA Kimodo (target application), HumanML3D (captions). Not affiliated with LiquidAI, McGill-NLP, Meta or NVIDIA.
@misc{iancu2026lfmllm2vecbridge,
author = {Iancu, Adrian Ciprian},
title = {LFM2.5 to Llama-3-8B LLM2Vec bridge for Kimodo text-to-motion},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/adriandj3/LFM2.5-to-Llama8B-LLM2Vec-Kimodo}}
}
If you use it with Kimodo or another LLM2Vec consumer, I would love to hear how it goes: open a discussion here or find me on GitHub.
Keywords: Kimodo, text-to-motion, motion generation, LLM2Vec, Llama-3-8B, LFM2.5, embedding bridge, embedding alignment, cross-lingual, Italian, HumanML3D, low VRAM, local AI, NumPy