AntonDergunov's picture
Interim F1@all-kd-final encoder (fp16 and int8 ONNX) and bundles
ccf900b verified
|
Raw History Blame Contribute Delete
2.83 kB
metadata
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. It picks a Material Symbols 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):

  • 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 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).