Pre-trained linear projection layer that maps
Qwen3-8B text embeddings into the
LLM2Vec embedding space used by the
Kimodo motion diffusion model.
Kimodo's denoiser was trained with LLM2Vec (Llama-3-8B based) embeddings. Qwen3-8B produces embeddings of the same dimension (4096), but in a completely different semantic space. Directly substituting encoders produces poor motion quality. This projection layer bridges the gap by learning a linear transformation from one space to the other.
Kimodo 的 denoiser 是用 LLM2Vec(基于 Llama-3-8B)的 embedding 训练的。Qwen3-8B 虽然输出相同维度(4096)的 embedding,但语义空间完全不同。直接替换编码器会导致生成质量很差。此投影层通过学习两个空间之间的线性变换来弥合这一差距。
The projection was trained by encoding ~1000 diverse motion descriptions with both LLM2Vec (teacher) and Qwen3-8B (student), then minimizing MSE loss between the projected Qwen3 embeddings and LLM2Vec target embeddings.
投影层的训练方法:用 LLM2Vec(teacher)和 Qwen3-8B(student)分别对约 1000 条多样化的动作描述编码,然后最小化投影后的 Qwen3 embedding 与 LLM2Vec 目标 embedding 之间的 MSE 损失。
1# Linux / macOS
2TEXT_ENCODER=qwen3 TEXT_ENCODER_MODE=local TEXT_ENCODER_DEVICE=cpu kimodo_gen "A person walks forward" --bvh
1# Windows PowerShell
2& {
3 $env:TEXT_ENCODER="qwen3"
4 $env:TEXT_ENCODER_MODE="local"
5 $env:TEXT_ENCODER_DEVICE="cpu"
6 kimodo_gen "A person walks forward" --bvh
7}
1from huggingface_hub import hf_hub_download
2
3path = hf_hub_download(
4 repo_id="Qian2501/kimodo-qwen3-projection",
5 filename="qwen3_8b_projection.pt",
6)
1python -m kimodo.scripts.train_text_projection \
2 --base-model /path/to/Meta-Llama-3-8B-Instruct \
3 --mntp-adapter /path/to/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp \
4 --sup-adapter /path/to/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp-supervised \
5 --output qwen3_8b_projection.pt --device cpu