Model reference · open weights
BioLingual is an open-weight embedding model from davidrrobinson. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | davidrrobinson |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 514 tokens |
| Runs with | transformers |
| Released | 2023-07-24 |
| Popularity | 7k downloads / month |
| Licence | Unknown |
About
Model card for BioLingual: Transferable Models for bioacoustics with Human Language Supervision
An audio-text model for bioacoustics based on contrastive language-audio pretraining.
You can use this model for bioacoustic zero shot audio classification, or for fine-tuning on bioacoustic tasks.
pipelinefrom datasets import load_dataset
from transformers import pipeline
dataset = load_dataset("ashraq/esc50")
audio = dataset["train"]["audio"][-1]["array"]
audio_classifier = pipeline(task="zero-shot-audio-classification", model="davidrrobinson/BioLingual")
output = audio_classifier(audio, candidate_labels=["Sound of a sperm whale", "Sound of a sea lion"])
print(output)
>>> [{"score": 0.999, "label": "Sound of a dog"}, {"score": 0.001, "label": "Sound of vaccum cleaner"}]
You can also get the audio and text embeddings using ClapModel
from datasets import load_dataset
from transformers import ClapModel, ClapProcessor
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = librispeech_dummy[0]
model = ClapModel.from_pretrained("laion/clap-htsat-unfused")
processor = ClapProcessor.from_pretrained("laion/clap-htsat-unfused")
inputs = processor(audios=audio_sample["audio"]["array"], return_tensors="pt")
audio_embed = model.get_audio_features(**inputs)
from datasets import load_dataset
from transformers import ClapModel, ClapProcessor
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = librispeech_dummy[0]
model = ClapModel.from_pretrained("laion/clap-htsat-unfused").to(0)
processor = ClapProcessor.from_pretrained("laion/clap-htsat-unfused")
inputs = processor(audios=audio_sample["audio"]["array"], return_tensors="pt").to(0)
audio_embed = model.get_audio_features(**inputs)From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys biolingual for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (biolingual below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"biolingual","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.