Jasper-Token-Compression-600M Technical Report
TL;DR. Jasper-Token-Compression-600M starts from Qwen3-Embedding-0.6B and is distilled from two larger embedders, Qwen3-Embedding-8B and QZhou-Embedding (7B), on 12M English and Chinese paragraphs. Its new piece is a token-compression module: after the embedding layer, a small MLP and adaptive average pooling shrink any input over 80 tokens before the transformer runs. A four-stage schedule teaches the model to work at many compression ratios. It reports MTEB English 74.75 and Chinese 73.51 Mean(Task), close to Qwen3-Embedding-8B, while encoding long texts 2× to 7× faster than the uncompressed 0.6B model.
Why it matters now. Embedding cost matters every time a corpus is re-indexed, and RAG and deep-research corpora are large. Most efficiency work shrinks the model or the vector. Jasper shrinks the input sequence, a third lever, and it measures the latency it saves. It is also a compact case study in multi-teacher embedding distillation from open models, with distillation run on four consumer RTX 4090 GPUs.
Key idea
Section titled “Key idea”Distil into a wider student. The teacher vector concatenates two normalised 1024-d parts: the first 1024 dims of Qwen3-Embedding-8B (valid because it was Matryoshka-trained) and QZhou’s first 3072 dims folded into 1024 by summing three segments:
The student switches Qwen3-0.6B from last-token to mean pooling and adds a linear map from 1024 to 2048 dims. Stage 1 trains with (scaled by 10).
Compress the tokens before attention. After the embedding layer, a new SwiGLU MLP transforms each token vector and AdaptiveAvgPool1d averages contiguous windows down to a target length:
Only the MLP is trainable; the pooling has no weights. Short texts pass through untouched, long ones are shortened, and all transformer layers then run on positions.
Four stages.
- Distil with the cosine loss (lr 1e-4, 2 epochs, max 1,030 tokens).
- Distil with compression at fixed (lr 7e-5, 2 epochs).
- Dynamic compression for 800 steps: each batch samples (0.33 with probability 0.4; otherwise uniform on 0.1–0.33, 0.33–0.66 or 0.66–1.0). A second loss matches the batch similarity matrices of student and teacher: .
- Retrieval contrastive learning for 5,000 steps on QZhou’s retrieval data: InfoNCE with hard negatives and in-batch negatives (, ), plus a KL term matching the student’s and teacher’s softmaxed similarity scores (), plus the cosine term: .
Key results
Section titled “Key results”MTEB, English and Chinese leaderboard portions, evaluated at threshold 80 and ρ = 0.5 (paper Tables 1 and 2).
| Model | Size | Dim | English Mean(Task) | Chinese Mean(Task) |
|---|---|---|---|---|
| Qwen3-Embedding-0.6B (initial student) | 595M | 1024 | 70.70 | 66.33 |
| Jasper-Token-Compression-600M | 600M | 2048 | 74.75 | 73.51 |
| Qwen3-Embedding-4B | 4B | 2560 | 74.60 | 72.27 |
| Qwen3-Embedding-8B (teacher) | 8B | 4096 | 75.22 | 73.84 |
| QZhou-Embedding (teacher) | 7B | 3584 | 75.97 | 76.99 |
Encoding latency per text in ms (Table 4; 1,600 fixed-length texts, batch 32, GPU not stated):
| Model | MTEB Mean(Task) | 128 tok | 512 tok | 2048 tok |
|---|---|---|---|---|
| Qwen3-Embedding-0.6B | 70.70 | 3.22 | 12.20 | 49.99 |
| Jasper, ρ = 0.5 | 74.75 | 2.62 | 7.39 | 25.07 |
| Jasper, ρ = 0.33 | 74.70 | 2.52 | 5.41 | 17.52 |
| Jasper, ρ = 0.1 | 74.21 | 2.09 | 3.18 | 6.95 |
- English Retrieval: stage 3 65.53, stage 4 66.19, teacher Qwen3-8B 69.44 (Table 3).
Limitations and open questions
Section titled “Limitations and open questions”- Measured cost is partial. Encoding latency is measured; index size (2048-d), search latency and the GPU are not reported, and there is no matched-latency truncation baseline.
- Retrieval is the weak spot. The authors say their contrastive stage is insufficient to close the gap to the teacher.
- Short training length. Distillation used at most 1,030 tokens, so quality on longer inputs is untested, even though long inputs are where compression helps most.
- Simple pooling. Fixed window averaging ignores content; the authors suggest adaptive, trainable compression as future work.
- Evaluation hygiene. No zero-shot percentage or training-overlap statement; stage-4 data comes from QZhou’s retrieval set. Table 3 and the text disagree on stage-3 Retrieval (65.53 vs 65.33).
Connections
Section titled “Connections”- Teachers: Qwen3 Embedding; distillation background in knowledge distillation.
- Other cost axes: Matryoshka representation learning (dimensions), ColBERT and PLAID (vectors per document).
- Long inputs: late chunking for documents beyond the training length.
- Same leaderboard: Llama-Embed-Nemotron-8B, MTEB / MMTEB, Embedding recipes.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
The compression rule keeps inputs of at most 80 tokens unchanged and otherwise pools a length-L input to 80 + ρ(L − 80) positions. (a) Compute the compressed length and the fraction L_tgt / L for L = 128 and L = 2048 at ρ = 0.5 and ρ = 0.1. (b) Table 4 reports per-text encoding latency of 3.22 ms and 49.99 ms for uncompressed Qwen3-Embedding-0.6B at 128 and 2048 tokens, and 2.62 / 25.07 ms (ρ = 0.5) and 2.09 / 6.95 ms (ρ = 0.1) for Jasper. Compute the measured latency ratios and compare them with a linear-in-length and a quadratic-in-length cost model. What does the comparison say about where a 0.6B encoder spends its time at these lengths?
What a strong answer covers
- (a) L = 128: ρ = 0.5 gives 80 + 24 = 104 (0.81); ρ = 0.1 gives 80 + 4.8 ≈ 85 (0.66). L = 2048: ρ = 0.5 gives 80 + 984 = 1064 (0.52); ρ = 0.1 gives 80 + 196.8 ≈ 277 (0.135).
- (b) Measured ratios: 2.62 / 3.22 = 0.81 and 25.07 / 49.99 = 0.50 at ρ = 0.5; 2.09 / 3.22 = 0.65 and 6.95 / 49.99 = 0.14 at ρ = 0.1. They match the length fractions almost exactly.
- A quadratic model would predict 0.52² ≈ 0.27 and 0.135² ≈ 0.018 at L = 2048, far below what is measured. Latency is close to linear in the number of positions.
- Interpretation: for a 0.6B model with FlashAttention up to 2048 tokens, the per-token MLP and projection work dominates, so the saving comes from processing fewer positions, not from avoiding quadratic attention. The paper's "quadratic" motivation matters only at longer lengths.
- The 80-token floor means short inputs, such as most queries, gain little: at 128 tokens the best case is about 35% faster.
- Mechanism
Explain the compression module and the teacher construction. (a) What does AdaptiveAvgPool1d do to a sequence of length L_in with target L_out, and why does the paper insert a new SwiGLU MLP before it rather than pooling raw token embeddings? (b) Why must the model be trained with compression, rather than switching pooling on at inference? (c) The 2048-d teacher concatenates Qwen3-8B's first 1024 dims with QZhou's first 3072 dims summed in three 1024-d segments. Why is the Qwen3 truncation principled while the QZhou fold is an approximation, and what does the fold do to inner products?
What a strong answer covers
- (a) It splits the L_in positions into L_out contiguous windows of about L_in / L_out tokens and replaces each window by its mean, so kernel and stride are set automatically. It has no weights; the paper calls it 1D-convolution-based, but it is a fixed averaging filter.
- The MLP is the only trainable part of the module. It maps token embeddings into a space where averaging neighbours keeps useful information, instead of blurring raw lexical embeddings that were never meant to be summed.
- (b) The pretrained transformer has only seen one embedding per token at consecutive positions. Pooled vectors are off-distribution inputs, and positional encoding now indexes windows, not tokens. Stages 2 and 3 adapt all weights to that input; stage 3 samples ρ per batch (40% at 0.33, otherwise uniform in 0.1–0.33, 0.33–0.66 or 0.66–1.0) so one model works across ratios.
- (c) Qwen3-8B was trained with Matryoshka representation learning, so its first 1024 dims form a trained embedding. QZhou was not, so the authors apply a fixed linear map (sum of three segments). The inner product of folded vectors equals the sum of matching-segment products plus cross-segment terms, which act as noise unless segments are uncorrelated; each part is normalised before concatenation so both teachers count equally.
- What if…
Using Tables 3 and 4, what do the stage-4 contrastive step and the choice of inference compression ratio each contribute? Give the numbers, and say what the reported Mean(Task) changes cannot tell you about the compression mechanism.
What a strong answer covers
- Stage 4 (InfoNCE with K = 3 hard negatives, N = 16, plus soft KL distillation and the cosine term) lifts Retrieval from 65.53 to 66.19 (Table 3; the text says 65.33). Mean(Task) moves 74.65 → 74.75; other types change by less than 0.3.
- Retrieval still trails the Qwen3-8B teacher by about 3.3 points (66.19 vs 69.44), the gap the authors list as the main limitation, while Classification, Clustering and STS match or beat the teacher.
- Compression ratio at inference (Table 4): Mean(Task) 74.75 at 0.5, 74.70 at 0.33, 74.58 at 0.2, 74.21 at 0.1, while latency at 2048 tokens falls from 25.07 to 6.95 ms.
- Limits: many MTEB classification, STS and pair-classification inputs are under 80 tokens and are never compressed, so the mean over all tasks dilutes the effect. A per-task or per-length breakdown, and retrieval-only numbers by ratio, would isolate what compression costs.
- There is no ablation that removes compression from the final recipe, so the cost of compression to quality versus the gain from distillation is not separated.
- Critique
The abstract says the model is "higher efficiency than a traditional 0.6B model while achieving performance comparable to that of an 8B model". As a reviewer focused on retrieval, write three concerns about this claim, covering the efficiency baseline, the storage cost and the evaluation data, and say what experiment would address each.
What a strong answer covers
- Efficiency baseline: compare against simple truncation at matched latency. Uncompressed Qwen3-0.6B at 1024 tokens takes 24.24 ms, about the same as Jasper at ρ = 0.5 on 2048 tokens (25.07 ms); the paper does not test truncation, nor give the GPU type.
- Storage: the output is 2048-d versus 1024-d for Qwen3-0.6B, so the index doubles (8 KB vs 4 KB per fp32 vector). Encoding latency is measured; index size and search latency are not.
- "Comparable to 8B": English Mean(Task) 74.75 vs 75.22, but Retrieval 66.19 vs 69.44; on Chinese, QZhou-Embedding-Zh (78.52) and Seed models score higher. Averages hide the weakest task type for RAG.
- Data: stage 4 uses QZhou's retrieval training data and the teachers' training mixes are inherited; the report gives no zero-shot percentage or overlap check against MTEB retrieval sets such as HotpotQA or FEVER.
- Experiments: matched-latency truncation baseline; Matryoshka or PCA truncation of the 2048-d output; retrieval evaluation on held-out long-document sets, since distillation used at most 1,030 tokens.
- Design
You index a 10M-document English web corpus (median 900 tokens) for a deep-research agent, re-embedding weekly on one GPU, and queries are short. Decide how to use Jasper's compression: which ρ for documents and for queries, whether to use it at all for documents over 1,030 tokens, and how you would validate the choice.
What a strong answer covers
- Queries are usually under 80 tokens, so they are never compressed regardless of ρ; the decision only affects documents.
- At 900 tokens: ρ = 0.33 gives 80 + 0.33 · 820 ≈ 351 positions (≈ 0.39 of the cost under the near-linear scaling in Table 4); ρ = 0.1 gives ≈ 162 (≈ 0.18). Weekly re-embedding of 10M documents scales by the same factor.
- Documents over 1,030 tokens are outside the distillation length; chunk them (or test late chunking) before compressing, rather than relying on compression to fit long inputs.
- Storage: 10M · 2048 · 4 B ≈ 82 GB in fp32; consider fp16 or int8 quantisation, since the model has no Matryoshka training for its 2048-d output.
- Validation: build a held-out query set with relevance labels on this corpus; compare nDCG@10 and Recall@100 for ρ in 0.1 to 0.5 against an uncompressed Qwen3-0.6B and a truncation baseline at the same latency; check per-length buckets for degradation on long documents.
- Connect
An embedding pipeline has three separate cost axes: encoder compute per document, number of vectors per document, and dimensions per vector. Place Jasper's token compression, Matryoshka representation learning and ColBERT-style late interaction on these axes, and explain why Jasper's idea comes from DeepSeek-OCR's vision-token compression.
What a strong answer covers
- Jasper reduces encoder compute (fewer positions through the transformer) while still producing one vector; it increases dimensions (2048).
- Matryoshka reduces dimensions per vector after encoding and leaves encoder compute unchanged; Jasper uses it only on the teacher side (Qwen3-8B's first 1024 dims).
- ColBERT increases vectors per document (one per token) for finer matching; token pooling or PLAID-style compression then cuts storage, not encoder compute.
- DeepSeek-OCR shows that a model can read text from far fewer vision tokens than text tokens; Jasper applies the same bet to text, that many adjacent token embeddings are redundant for a pooled document vector.
- The axes compose: a compressed encoder with a Matryoshka-trained head and int8 vectors would attack all three, which the report leaves to future work.