huggingface / huggingface/evaluate
[FR] Binoculars as a new metric
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Description
Binocular is a metric similar to perplexity [[read about binocular](https://huggingface.co/blog/dmicz/binoculars-text-detection#:~:text=By%20comparing%20actual%20perplexity%20to,the%20same%20prompt%20and%20context.)]. Binocular uses two language models with same tokenization to detect the LLM generated text (or data contamination).
Currently the evaluate library doesn't include binocular in its long list of metrics. Something like the following could help the library be more useful
```
from evaluate import load
binocular = load("binocular", module_type="metric")
results = binocular.compute(predictions=predictions, observer_model='tiiuae/falcon-7b-instruct', performer_model='tiiuae/falcon-7b')
```
Contributor guide
Assessment
This issue has not been assessed yet.