[!WARNING] This model was mostly vibecoded by Claude (Anthropic's AI assistant). The data pipeline, training scripts, evaluation and this card were largely written by Claude under light human direction. The numbers come from real runs, but nobody has carefully audited the code, the data or the methodology. Treat it as an experiment, not a vetted model.
JP music title encoder (v7-L6)
A small embedding model for retrieving duplicate music entities: the same song, artist or release under different titles across sources (MusicBrainz, Spotify, YouTube, Discogs, SoundCloud). Built for Japanese-domain music (J-Pop, anime, VTuber, Vocaloid, game, idol), including its English and romaji spellings, plus a smaller Western tier.
It is a candidate generator (blocking) for a dedup pipeline: retrieve top-k neighbours, then let a separate decider judge each pair.
- 6-layer BERT, hidden 384, distilled from a fine-tuned
multilingual-e5-smallteacher; XLM-R vocabulary pruned to 75,458 tokens. model.onnxincluded (mean pooling + L2 normalization inside the graph): ~1.1 ms/title on 16 CPU threads, ~3.8 ms on 1.model-f16.ggufincluded: the same encoder as an f16 llama.cpp BERT embedding model (mean pooling is set in its metadata; L2-normalize the output yourself). The f16 weights and llama.cpp's tanh GELU drift slightly from the safetensors model, so use it for retrieval, not for exact-score features.- Matryoshka: truncate to the first 256 dims and re-normalize at almost no cost.
Input format
- Tracks:
"{title} [A] {primary artist}"when the primary artist is known, else"{title}". The separator is literally[A]. With the artist, covers of the same song by different artists are kept apart. - Artists, releases: the name as stored. Platform wrappers (
X - Topic,X Official,A Ch. 名前 - Group,名前【事務所】,X (2)) are handled by the model; no parsing needed. - No
query:/passage:prefix. Max length 48 tokens.
from sentence_transformers import SentenceTransformer
m = SentenceTransformer("gbnam8/jp-music-title-encoder")
e = m.encode(["夜に駆ける [A] YOASOBI", "Yoru ni Kakeru [A] YOASOBI",
"Takane Lui - Topic", "鷹嶺ルイ"], normalize_embeddings=True)
print(e @ e.T)
Evaluation
Held-out library of ~26k entries (no library entity, credited artist, or same-named artist is in the training data). Recall@20 at pool sizes 11k → 511k (padded with MusicBrainz distractors), artist-conditioned tracks:
| tracks | artists | cross-script | all | |
|---|---|---|---|---|
| LaBSE (title only) | 0.613 → 0.456 | 0.586 → 0.454 | 0.447 → 0.310 | — |
| multilingual-e5-small | 0.806 → 0.678 | 0.726 → 0.646 | 0.360 → 0.234 | — |
| this model | 0.991 → 0.985 | 0.909 → 0.828 | 0.908 → 0.824 | 0.963 → 0.934 |
Held-out synthetic tests (@1): template-wrapped video titles 0.968, covers 0.997, artist wrappers with unseen groups 0.942; real YouTube channel titles → artist name @20 0.881.
Training
Contrastive fine-tuning (cached multiple-negatives ranking + Matryoshka) on name groups from MusicBrainz (name ↔ alias, recordings of one work, cross-script artist names, cover negatives), template-wrapped titles with same-template hard negatives, model-mined artist confusions, and platform/channel wrappers around artist names; then distillation (MSE to the teacher + contrastive replay) into 6 layers.
Limitations: legal-name ↔ stage-name pairs and very short names can't be resolved from text; the domain is Japanese/English music only.