File size: 2,831 Bytes
ccf900b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: mit
base_model: intfloat/multilingual-e5-small
language: [en, es, ru]
library_name: onnx
pipeline_tag: sentence-similarity
tags: [onnx, sentence-embeddings, retrieval, material-symbols, icons, todo, distillation]
---

# Task icon encoder, e5-small (interim)

> **Interim checkpoint (2026-11-22), not final.** Research is ongoing, and these files may be replaced by a better model. Pin a revision if you depend on it.

This is the small sibling of [task-icon-encoder-e5-large-interim](https://huggingface.co/AntonDergunov/task-icon-encoder-e5-large-interim). It picks a [Material Symbols](https://fonts.google.com/icons) icon for a to-do task by meaning, and is meant for phones and tablets. It is `intfloat/multilingual-e5-small` (118M parameters), fine-tuned as a dual encoder and distilled from the e5-large model, then exported to ONNX.

## Files

| file | what |
|---|---|
| `model_fp16.onnx` (235 MB) | fp16 weights, fp32 inputs and output. It gives the same picks as the PyTorch model (99.9% of top-1s, identical scores). |
| `model_int8.onnx` (118 MB) | dynamic int8 quantization. Half the size, but it changes about 30% of top-1 picks and scores about 0.03 lower on nDCG@5. |
| `tokenizer.json` | XLM-R SentencePiece tokenizer, padding and truncation off |
| `bundle-fp16/`, `bundle-int8/` | `names.txt` (2,862 icons), `dense.npy` (icon vectors, fp16 `[2862, 384]`) and `manifest.json` for each model file |

Both ONNX files map `input_ids` and `attention_mask` (int64, `[batch, seq]`) to `last_hidden_state` (float32, `[batch, seq, 384]`).

## Use

The usage is the same as the large model's ([its card](https://huggingface.co/AntonDergunov/task-icon-encoder-e5-large-interim)):
- Encode `query: ` + the task title (optionally `"<parent heading>: <title>"`), one text per call with no padding.
- Mean-pool, then L2-normalize.
- Score against `dense.npy`.

With int8, never batch texts. Dynamic quantization scales activations over the whole input, so a text's vector would depend on its batch mates.

## Training

The training data is the large model's: about 11.9k LLM-judged tasks (synthetic personal-style tasks and [MS-LaTTE](https://github.com/microsoft/MS-LaTTE) tasks, with ES/RU translations) and graded register rewrites of them. On top of that, the large model's scores over all icons were distilled on 13.7k unlabelled task texts.

## Evaluation

The evaluation is on held-out dev tasks graded by an LLM judge ("silver" labels), with the title plus parent heading as the query:
- nDCG@5 0.534, hit@1 0.659 (fp16);
- the e5-large model scores 0.567 / 0.714.

The small model loses more to translation than the large one: nDCG@5 is 0.470–0.511 on seven machine-translated languages.

The icons are Material Symbols by Google (Apache 2.0). The base model is multilingual-e5-small by intfloat (MIT).