huggingface / huggingface/evaluate

[FR] Binoculars as a new metric

Open
#644 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.