Instructions to use gbnam8/jp-music-title-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use gbnam8/jp-music-title-encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("gbnam8/jp-music-title-encoder") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use gbnam8/jp-music-title-encoder with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf gbnam8/jp-music-title-encoder:F16 --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf gbnam8/jp-music-title-encoder:F16 --embeddings
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible embeddings server: ./llama-server -hf gbnam8/jp-music-title-encoder:F16 --embeddings
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible embeddings server: ./build/bin/llama-server -hf gbnam8/jp-music-title-encoder:F16 --embeddings
- LM Studio
- Jan
- Ollama
How to use gbnam8/jp-music-title-encoder with Ollama:
ollama run hf.co/gbnam8/jp-music-title-encoder:F16
- Unsloth Desktop
- Docker Model Runner
How to use gbnam8/jp-music-title-encoder with Docker Model Runner:
docker model run hf.co/gbnam8/jp-music-title-encoder:F16
- Lemonade
How to use gbnam8/jp-music-title-encoder with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gbnam8/jp-music-title-encoder:F16
Run and chat with the model
lemonade run user.jp-music-title-encoder-F16
List all available models
lemonade list
- Atomic Chat
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.
- Downloads last month
- 217
Model tree for gbnam8/jp-music-title-encoder
Base model
intfloat/multilingual-e5-small