Sentence Similarity
sentence-transformers
Safetensors
English
embedding_gemma2
audio
music
music-information-retrieval
text-to-audio-retrieval
embeddings
Instructions to use jaisawhney/SonicEmbed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jaisawhney/SonicEmbed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jaisawhney/SonicEmbed") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download eval/pyproject.toml from jaisawhney/SonicEmbed: direct link, hf CLI and curl.
- Browser
- Download file 923 Bytes
-
https://huggingface.co/jaisawhney/SonicEmbed/resolve/main/eval/pyproject.toml
- Command line
-
hf download hf://jaisawhney/SonicEmbed/eval/pyproject.toml
-
curl -L -o pyproject.toml https://huggingface.co/jaisawhney/SonicEmbed/resolve/main/eval/pyproject.toml
923 Bytes
| [project] | |
| name = "sonicembed-eval" | |
| version = "0.1.0" | |
| description = "Song Describer, CLAP and MTEB evaluation for SonicEmbed" | |
| requires-python = ">=3.11,<3.13" | |
| dependencies = [ | |
| "torch>=2.8", | |
| "transformers>=5.20", | |
| "sentence-transformers>=6.1", | |
| "huggingface-hub>=1.0", | |
| "librosa>=0.11", | |
| "soundfile>=0.13", | |
| "pyarrow>=20", | |
| "numpy>=2", | |
| "tqdm", | |
| "mteb>=2.26", | |
| "pillow>=11", | |
| "torchvision>=0.23", | |
| "laion-clap>=1.1.7", | |
| ] | |
| # laion-clap's own numpy pin is older than the rest of these need. | |
| [tool.uv] | |
| override-dependencies = ["numpy>=2"] | |
| # PyPI's torch is CPU-only on Windows; Linux wheels already include CUDA. | |
| [tool.uv.sources] | |
| torch = { index = "pytorch-cu128", marker = "sys_platform == 'win32'" } | |
| torchvision = { index = "pytorch-cu128", marker = "sys_platform == 'win32'" } | |
| [[tool.uv.index]] | |
| name = "pytorch-cu128" | |
| url = "https://download.pytorch.org/whl/cu128" | |
| explicit = true | |