Skip to content
Edit this page

Changelog

Versions follow MAJOR.MINOR.PATCH. While the major version is 0, a change to the public interface raises the minor version and an addition or a fix raises the patch version. The public interface is what the documentation and the docstrings describe: the muscari command, the packages muscari, muscari.data, muscari.encoding, muscari.sae, muscari.analysis, muscari.heads, muscari.training and muscari.evaluation, the format of an exported SAE, and the options of the scripts and recipe files in examples.

0.1.2 (2026-12-04)

  • examples/train_retriever --sae-masked-latents trains an SAE head with the listed latents left out of every vector.
  • muscari eval-retriever --retrieval reads retrieval sets whose id column is named _id, as BEIR and older MTEB uploads name it.
  • Measurements, each with three seeds on a 310M encoder: the 101 latents of the published SAE that are active in more than half of the training documents carry two fifths of the FLOPS of a trained retriever and none of its accuracy; a 30M query encoder next to a 310M document encoder costs a vocabulary head 0.05 nDCG@10 for a fifth of the CPU time per query, and the stitched SAE head did not converge in the same short run; an SAE with twice the latents reconstructs better and is no better as a head; and one encoder, ruri-v3-pt-310m, trained as a dense retriever, with a frozen SAE head and with a grafted vocabulary head, next to the published ruri-v3-310m.
  • Documentation: a "Concepts" section with an introduction to learned sparse retrieval, the supported methods side by side, a page for readers who come from dense models and a glossary; a page that leads from a task to the guide for it.

0.1.1 (2026-12-03)

  • muscari.analysis.shared_latents lists the latents two texts share, each with its share of their score and the token of either text on which it is strongest; token_latents returns one text's tokens with their activations. examples/use_sae.py prints the shared latents under each document, and the guide on evaluating an SAE reads such an output from the published SAE.
  • muscari probe-sae --masked-latents leaves latents out of the sparse vectors of queries and documents, as masked_latents does in an SAE head. Every probe result now holds sparse.flops and sparse.masked_latents. probe_collection, pool_collection, without, text_frequencies and flops in muscari.analysis.probe compare several maskings after pooling once.
  • Measurements: on the published SAE, one latent is active in every text of a JQaRA sample and does not rank, and the 72 latents active in more than half of the documents carry half of the FLOPS.
  • Documentation: loading an SAE from the Hugging Face Hub is now verified against the Hub.

0.1.0 (2026-12-03)

The first version. It is not on PyPI; install it from the repository.

  • SAE training for text encoders. muscari train-sae with two trainers on one activation stream and one file format; eval-sae, inspect-sae and probe-sae; content tokens only, streamed activations, a sparse backward pass, optional unit-length inputs. load_sae and every command read an SAE from a directory or a Hugging Face Hub repository. muscari import-sae wraps SAEs trained elsewhere.
  • Heads for Sentence Transformers' sparse encoder. SAEPooling (per-token k, log1p or raw activations, frozen or trained, a gate per latent, a load-balance term, masked latents) and VocabularyPooling (logit shift, a limit per position, folding of spellings, masked entries; experimental: a probability threshold and a cap on the share of texts an entry appears in); rescale_head, graft_head and suppress_tokens for a language-model head; DecoderTransformer for an inner layer of a decoder language model, with bidirectional attention.
  • Separate encoders for queries and documents. combine_encoders for heads on the language model and build_asymmetric_sae_encoder for SAE heads, whose query side starts from a linear map between the two encoders. Run on randomly initialised encoders only.
  • Losses and schedules. ContrastiveWithDistillation (contrastive, KL, MarginMSE and soft-label terms), MatryoshkaCaps, TokenPenalty, L1Regularizer, LoadBalancedSpladeLoss, LossScaleSchedule and WeightWarmup.
  • Evaluation. muscari eval-retriever at several caps on the vector size, muscari compare-runs with intervals over runs and queries, and diagnostics that measure a head before training.
  • Examples and recipes. Short scripts for using an SAE on its own, loading a retriever and training each kind of head; examples/train_retriever with every option and nine option files with the published settings of SlideOn, SAE-SPLADE, SPLARE, SPARSEUP, a rescaled head and two Japanese SPLADE models.
  • One vocabulary of names, taken from Sentence Transformers where it has one: prompt, query, document, max_seq_length, include_prompt, model_name_or_path, in the Python API, the command line and the saved files.
  • Measurements. One SAE at full size, 65,536 latents on modernbert-ja-310m for one billion tokens, published as tkhshtsh0917/modernbert-ja-310m-sae-65k and level with the published SAE of that encoder; and small runs on Japanese encoders with their conditions and limits. None of them is a result about the methods in general.