← All models

feature-extraction · text (~50 languages) · WASM · ~310 MB · Apache-2.0

Arctic-embed-m-v2.0 — one multilingual meaning space, with Matryoshka vectors

Snowflake's second-generation retrieval embedder. Where the built arctic-embed-s is a small English BERT (384-d), arctic-embed-m-v2.0 is built on the GTE-multilingual backbone: one 768-dimensional space across roughly 50 languages, up to 8192 tokens of context, and Matryoshka training so you can truncate the vector (e.g. to 256 dims) and it still works. Paste passages in any mix of languages, build a cross-language cosine matrix, and search long documents by meaning. It's Apache-2.0. Nothing leaves your device.

At a glance

ModelSnowflake/snowflake-arctic-embed-m-v2.0 (official ONNX)
Task / pipelinefeature-extraction (dense retrieval head)
ArchitectureGTE-multilingual backbone (model_type gte, ~305M params) → 768-dimensional dense embedding
Languages~50 — one shared multilingual retrieval space (XLM-R vocabulary)
Contextup to 8192 tokens (RoPE) — embeds long passages / documents, not just sentences
Matryoshka (MRL)the 768-d vector is trained so a truncated prefix (e.g. first 256 dims) is still a usable embedding — trade a little accuracy for smaller vectors
Pooling[CLS] pooling, then L2-normalize. Retrieval adds a "query: " prefix to the query only; documents get no prefix
vs. arctic-embed-s (built)the built one is v1, English, BERT, 384-d; this is v2.0, multilingual, GTE backbone, 768-d + Matryoshka
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~310 MB (q8), cached after first load
LicenseApache-2.0
Web APIsWebAssembly, Web Workers — all Baseline widely available

Run it

Put one passage per line — mix languages freely, and make some lines long (arctic-embed reads up to 8192 tokens). The matrix shows the cosine similarity between every pair (1.00 = identical direction). The 2D map is a PCA projection coloured by language — if the model works, points cluster by meaning, not by colour.

Cross-language cosine matrix

2D map (PCA), coloured by language

Green badge = a hit in a different language from your query. An English query surfaces its French or Japanese answer above an unrelated English line. (The query is embedded with the model's "query: " retrieval prefix.)

See inside — the 768-d vector, the 8192-token window, and Matryoshka

Arctic-embed takes the [CLS] token's 768-number hidden state as the document vector, then L2-normalizes it so every passage becomes a unit-length arrow and cosine similarity is a plain dot product. Pick a passage to see its real vector, its pre-normalization magnitude, and how much of the 8192-token context window it used. The Matryoshka slider truncates the vector to its first N dims and re-normalizes — watch how much cosine agreement survives at 256 or 128 dims.

Embed some passages above to inspect a vector.

Why it matters

Arctic-embed-m-v2.0 is a modern, permissively-licensed multilingual retriever that fits in a browser. You embed questions, documents, tickets and reviews — long or short, in ~50 languages — into one 768-d space, and nearest-neighbour search works across the whole corpus. Matryoshka means you can store the full 768-d vectors for accuracy or truncated 256-d vectors to cut your index size and memory by two thirds, from the same model. It runs here with no server and no data leaving the tab.

Use cases

Basics

Do two passages mean the same thing across languages, or across a paraphrase? One cosine number.

Practical

Long-document, cross-language semantic search over a mixed-language knowledge base.

Wild

Matryoshka in action: shrink the vectors dim by dim and watch how far you can go before search breaks.

Multi-model

Retrieve cross-lingually with arctic-embed, then translate the winning passage to English with M2M100.

Contrast with the built arctic-embed-s (v1, English, 384-d), the BGE-M3 (1024-d, 100+ langs, larger) and the lighter multilingual MiniLM (384-d): this is the Apache-2.0, GTE-multilingual, Matryoshka option in the middle.

How the API works

Same feature-extraction recipe as any sentence embedder — CLS pooling, and a "query: " prefix on retrieval queries:

import { pipeline } from "@huggingface/transformers";

const extract = await pipeline(
  "feature-extraction",
  "Snowflake/snowflake-arctic-embed-m-v2.0",
); // downloads + caches ~310 MB once

// documents: no prefix. query: prefix with "query: ". CLS pooling, L2-normalized:
const docs = await extract(["このバッテリーは一日中もちます", "The refund policy allows returns."], { pooling: "cls", normalize: true });
const q = await extract(["query: How long does the battery last?"], { pooling: "cls", normalize: true });

// unit-length vectors → cosine similarity is just the dot product:
const [qv] = q.tolist(), [d0] = docs.tolist();
const sim = qv.reduce((s, x, i) => s + x * d0[i], 0); // high — same meaning, different languages

// Matryoshka: truncate + re-normalize to shrink the vector (e.g. first 256 dims) — still usable.

This page asks the worker for the un-normalized CLS vectors so "See inside" can show the real pre-normalization magnitude (and demonstrate Matryoshka truncation), then normalizes them in JS. Inference runs in a Web Worker so the matrix, projection and search never jank the page.

References