Spaces:
Sleeping
Sleeping
File size: 1,660 Bytes
e230b8f bda104d e230b8f f478cdd e230b8f bda104d 6876324 e230b8f bda104d 6876324 bda104d cbfe92b bda104d 6876324 bda104d | 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 | ---
title: Sparse Steerable Retrieval
emoji: ποΈ
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
license: mit
short_description: Build live concept sliders for dense music retrieval
---
# Sparse Steerable Retrieval β live demo
Open-vocabulary concept control for dense music retrieval. Search for a seed track
or draw one at random, make one or more free-form concept sliders, then move the
sliders together. The query embedding is edited through sparse inversion in a
trained BatchTopK SAE (MuQ-MuLan / music4all), and nearest neighbours are retrieved
live after each slider move. No audio is hosted β playback is via Spotify embeds.
Runs on **ZeroGPU**: the corpus + MuQ weights are fetched at startup; the text tower is
used on GPU only while a new slider is instantiated. Sparse inversion, slider edits,
and retrieval run on CPU from cached slider masks.
## Configuration (Space variables / secrets)
- `SSR_CHECKPOINT` β HF model repo id, e.g. `Pliploop/steerable-retrieval-sae` (variable)
- `SSR_L0` β subfolder to load, e.g. `L0-20` (variable)
- `SSR_CORPUS_REPO` β HF **dataset** repo id with `corpus.npz` + `meta.json` (variable)
- `SSR_DEVICE` β `cuda` (variable)
- `HF_TOKEN` β a read token (secret) so the Space can read the private corpus dataset
## Layout
- `app.py` β the Gradio ZeroGPU app: seed search, slider creation, live retrieval.
- `core.py` β engine: load model + corpus, combine sparse slider edits, retrieve.
- `steerable_retrieval/` β vendored package (steering API + SAE + MuQ encoder).
This Space is published by `hf/push_all.py` in the project repo.
|