Tutorial — Multi-modal AI
Embed text with Qwen3-Embedding
Qwen3-Embedding 0.6B is the default permissive-licensed text embedder on Tenzro. EmbeddingGemma-300M adds Matryoshka truncation (768/512/256/128) when you want compact vectors with controlled quality loss.
- Level
- Beginner
- Time
- ~10 min
- Prerequisites
- Tenzro CLI installed
- Stack
- CLI · JSON-RPC
01
Load a text embedding model
Pick a model from the catalog. Qwen3-Embedding 0.6B is fast and permissive. Passing a catalog id as model_id with no path makes the node fetch the ONNX graph and tokenizer from HuggingFace onto its models directory, then register the encoder under that same id.
tenzro embed-text catalog
tenzro embed-text load --model qwen3-embedding-0.6b02
Embed a string
The runtime returns an L2-normalized vector ready for cosine similarity.
tenzro embed-text run \
--model qwen3-embedding-0.6b \
--input "the open network for autonomous AI" \
--normalize03
Use Matryoshka truncation
EmbeddingGemma supports compact dims with on-the-fly re-normalization — useful when you store millions of vectors.
tenzro embed-text run \
--model embeddinggemma-300m \
--input "compact vector for retrieval" \
--requested-dim 256 \
--normalize04
Call from JSON-RPC
The same shape is available over RPC for integration into your own indexers. inputs is an array, so one call embeds a whole batch.
curl -s https://rpc.tenzro.xyz -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tenzro_textEmbed","params":{"model_id":"qwen3-embedding-0.6b","inputs":["hello","world"],"normalize":true}}'Related