Feature Extraction
PEFT
Safetensors
clap
audio-retrieval
music-information-retrieval
lora
contrastive
Instructions to use jahnaviym/crate-clap-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jahnaviym/crate-clap-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| license: mit | |
| base_model: laion/clap-htsat-unfused | |
| library_name: peft | |
| tags: | |
| - clap | |
| - audio-retrieval | |
| - music-information-retrieval | |
| - lora | |
| - contrastive | |
| pipeline_tag: feature-extraction | |
| # Crate β CLAP LoRA for producer vocabulary | |
| LoRA adapter over [`laion/clap-htsat-unfused`](https://huggingface.co/laion/clap-htsat-unfused) fine-tuned so producer terms base CLAP | |
| barely knows β *boom-bap, tape-saturated, rimshot, reese bass* β pull the right | |
| audio. Part of [Crate](https://github.com/jahnavi-yelamanchi/crate), sound-native | |
| search for music producers (hum / drop a track / describe it β one embedding space). | |
| ## Results β producer-vocab retrieval (held-out) | |
| | metric | base CLAP | fine-tuned | | |
| |---|---|---| | |
| | recall@1 | 0.210 | 0.405 | | |
| | recall@10 | 0.746 | 0.951 | | |
| | recall@5 | 0.580 | 0.868 | | |
| ## Usage | |
| ```python | |
| from transformers import ClapModel, ClapProcessor | |
| from peft import PeftModel | |
| base = "laion/clap-htsat-unfused" | |
| model = PeftModel.from_pretrained(ClapModel.from_pretrained(base), "jahnaviym/crate-clap-lora").merge_and_unload() | |
| proc = ClapProcessor.from_pretrained(base) | |
| # proc(text=[...]) / proc(audios=[...], sampling_rate=48000) β get_text/audio_features | |
| ``` | |
| ## Training | |
| - Symmetric InfoNCE on (audio, text) pairs from Freesound (CC0/CC-BY) + free packs. | |
| - LoRA on the audio/text projection heads (r=16, alpha=32). | |
| - Label-preserving augmentation (pitch/stretch/noise/EQ) for positive pairs. | |
| See the repo for the full pipeline and eval. | |