Multi-Model Bioacoustic Captioning Evaluation Framework
A generalized framework for evaluating audio-language models on bioacoustic captioning tasks. Extends the Gemini evaluation pipeline to open-weights models (Qwen2-Audio, NatureLM).
| Model | Status | Configs | Samples | Total Predictions |
|---|---|---|---|---|
| Qwen2-Audio-7B | Complete | 12 | 500 | 6,000 |
| NatureLM-audio | Complete | 12 | 500 | 6,000 |
| SALMONN | Future Work | - | - | - |
Total: 24,000 predictions across 24 configurations (2 models x 4 prompts x 3 shots)
AcousticLLMevalGeneralized/
├── base_model.py # Abstract interface for model wrappers
├── qwen_wrapper.py # Qwen2-Audio-7B-Instruct wrapper
├── naturelm_wrapper.py # NatureLM-audio wrapper
├── prompt_config.py # 4 prompt roles + 3 shot configurations
├── run_full_evaluation.py # Main evaluation runner
├── colab_orchestrator.ipynb # Google Colab notebook for evaluation
├── compute_spider_colab.ipynb # SPIDEr score computation (multi-model)
├── animalspeak_spider_benchmark.jsonl # Benchmark dataset (500 samples)
├── requirements_eval_env.txt # Tested dependencies (Lambda H100)
├── outputs/
│ └── lambda_full_eval/ # Evaluation results (24 JSON files)
└── salmonn_future_work/ # SALMONN implementation (future work)
salmonn_future_work/SALMONN_FIX_DOCUMENTATION.md| Role | Description |
|---|---|
baseline | Standard captioning prompt |
ornithologist | Expert birder persona |
skeptical | Conservative, uncertainty-aware |
multi-taxa | Multi-species detection focus |
# Install dependencies
pip install -r requirements_eval_env.txt
# Run evaluation (both models, all configs)
python run_full_evaluation.py --models qwen naturelm --output-dir ./outputs/eval
# Run specific configuration
python run_full_evaluation.py --models qwen --prompts baseline --shots 3 --max-samples 100
colab_orchestrator.ipynb to Google Colabcompute_spider_colab.ipynb to Google Colaboutputs/lambda_full_eval/Each evaluation produces a JSON file:
{
"model": "qwen",
"prompt_version": "baseline",
"n_shots": 3,
"samples_tested": 500,
"successful": 500,
"avg_latency": 0.97,
"results": [
{
"id": 15107,
"species": "Squirrel Treefrog",
"reference": "a chorus of squirrel treefrogs...",
"prediction": "Frogs calling near water...",
"latency": 0.74,
"success": true
}
]
}
| Model | 0-shot | 3-shot | 5-shot |
|---|---|---|---|
| Qwen2-Audio | 0.74s | 0.97s | 1.50s |
| NatureLM | 0.97s | 1.23s | 1.35s |
All configurations achieved 100% success rate (500/500 samples).
from base_model import AudioCaptioningModel
class MyModelWrapper(AudioCaptioningModel):
def load_model(self) -> None:
"""Load model weights onto GPU."""
pass
def generate_caption(self, audio_path: str, prompt: str) -> str:
"""Generate caption for audio file."""
pass
def get_memory_requirements(self) -> dict:
"""Return VRAM requirements."""
return {"min_vram_gb": 10.0, "peak_vram_gb": 12.0}
def unload(self) -> None:
"""Free GPU memory."""
pass
NatureLM outputs include timestamp annotations for longer audio:
American Woodcock calling...
#10.00s - 20.00s#: American Woodcock
#20.00s - 30.00s#: American Woodcock calling...
The SPIDEr notebook automatically preprocesses these before scoring.
See colab_orchestrator.ipynb Step 2-3 for automatic fixes.
This project is part of the AcousticLLMEval research initiative.
18 commits
Python
64.0%
Jupyter Notebook
36.0%
Multi-Model Bioacoustic Captioning Evaluation Framework
A generalized framework for evaluating audio-language models on bioacoustic captioning tasks. Extends the Gemini evaluation pipeline to open-weights models (Qwen2-Audio, NatureLM).
| Model | Status | Configs | Samples | Total Predictions |
|---|---|---|---|---|
| Qwen2-Audio-7B | Complete | 12 | 500 | 6,000 |
| NatureLM-audio | Complete | 12 | 500 | 6,000 |
| SALMONN | Future Work | - | - | - |
Total: 24,000 predictions across 24 configurations (2 models x 4 prompts x 3 shots)
AcousticLLMevalGeneralized/
├── base_model.py # Abstract interface for model wrappers
├── qwen_wrapper.py # Qwen2-Audio-7B-Instruct wrapper
├── naturelm_wrapper.py # NatureLM-audio wrapper
├── prompt_config.py # 4 prompt roles + 3 shot configurations
├── run_full_evaluation.py # Main evaluation runner
├── colab_orchestrator.ipynb # Google Colab notebook for evaluation
├── compute_spider_colab.ipynb # SPIDEr score computation (multi-model)
├── animalspeak_spider_benchmark.jsonl # Benchmark dataset (500 samples)
├── requirements_eval_env.txt # Tested dependencies (Lambda H100)
├── outputs/
│ └── lambda_full_eval/ # Evaluation results (24 JSON files)
└── salmonn_future_work/ # SALMONN implementation (future work)
salmonn_future_work/SALMONN_FIX_DOCUMENTATION.md| Role | Description |
|---|---|
baseline | Standard captioning prompt |
ornithologist | Expert birder persona |
skeptical | Conservative, uncertainty-aware |
multi-taxa | Multi-species detection focus |
# Install dependencies
pip install -r requirements_eval_env.txt
# Run evaluation (both models, all configs)
python run_full_evaluation.py --models qwen naturelm --output-dir ./outputs/eval
# Run specific configuration
python run_full_evaluation.py --models qwen --prompts baseline --shots 3 --max-samples 100
colab_orchestrator.ipynb to Google Colabcompute_spider_colab.ipynb to Google Colaboutputs/lambda_full_eval/Each evaluation produces a JSON file:
{
"model": "qwen",
"prompt_version": "baseline",
"n_shots": 3,
"samples_tested": 500,
"successful": 500,
"avg_latency": 0.97,
"results": [
{
"id": 15107,
"species": "Squirrel Treefrog",
"reference": "a chorus of squirrel treefrogs...",
"prediction": "Frogs calling near water...",
"latency": 0.74,
"success": true
}
]
}
| Model | 0-shot | 3-shot | 5-shot |
|---|---|---|---|
| Qwen2-Audio | 0.74s | 0.97s | 1.50s |
| NatureLM | 0.97s | 1.23s | 1.35s |
All configurations achieved 100% success rate (500/500 samples).
from base_model import AudioCaptioningModel
class MyModelWrapper(AudioCaptioningModel):
def load_model(self) -> None:
"""Load model weights onto GPU."""
pass
def generate_caption(self, audio_path: str, prompt: str) -> str:
"""Generate caption for audio file."""
pass
def get_memory_requirements(self) -> dict:
"""Return VRAM requirements."""
return {"min_vram_gb": 10.0, "peak_vram_gb": 12.0}
def unload(self) -> None:
"""Free GPU memory."""
pass
NatureLM outputs include timestamp annotations for longer audio:
American Woodcock calling...
#10.00s - 20.00s#: American Woodcock
#20.00s - 30.00s#: American Woodcock calling...
The SPIDEr notebook automatically preprocesses these before scoring.
See colab_orchestrator.ipynb Step 2-3 for automatic fixes.
This project is part of the AcousticLLMEval research initiative.
18 commits
Python
64.0%
Jupyter Notebook
36.0%