Skip to content

Commit

Permalink
Fixed a whoopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Saltywan committed Apr 26, 2024
1 parent 30da1d7 commit 3a33895
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions binoculars/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel, PeftConfig
from peft import AutoPeftModelForCausalLM
from config import huggingface_config
from .utils import assert_tokenizer_consistency
from .metrics import perplexity, entropy

torch.set_grad_enabled(False)

huggingface_config = {"TOKEN": None}
# selected using Falcon-7B and Falcon-7B-Instruct at bfloat16
BINOCULARS_ACCURACY_THRESHOLD = 0.9015310749276843 # optimized for f1-score
BINOCULARS_FPR_THRESHOLD = 0.8536432310785527 # optimized for low-fpr [chosen at 0.01%]
Expand Down

0 comments on commit 3a33895

Please sign in to comment.