wisent 0.7.701__py3-none-any.whl → 0.7.901__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wisent/__init__.py +1 -1
- wisent/core/activations/activation_cache.py +393 -0
- wisent/core/activations/activations.py +3 -3
- wisent/core/activations/activations_collector.py +9 -5
- wisent/core/activations/classifier_inference_strategy.py +12 -11
- wisent/core/activations/extraction_strategy.py +256 -84
- wisent/core/classifiers/classifiers/core/atoms.py +3 -2
- wisent/core/cli/__init__.py +2 -1
- wisent/core/cli/agent/apply_steering.py +5 -7
- wisent/core/cli/agent/train_classifier.py +19 -7
- wisent/core/cli/check_linearity.py +35 -3
- wisent/core/cli/cluster_benchmarks.py +4 -6
- wisent/core/cli/create_steering_vector.py +6 -4
- wisent/core/cli/diagnose_vectors.py +7 -4
- wisent/core/cli/estimate_unified_goodness_time.py +6 -4
- wisent/core/cli/generate_pairs_from_task.py +9 -56
- wisent/core/cli/geometry_search.py +137 -0
- wisent/core/cli/get_activations.py +1 -1
- wisent/core/cli/method_optimizer.py +4 -3
- wisent/core/cli/modify_weights.py +3 -2
- wisent/core/cli/optimize_sample_size.py +1 -1
- wisent/core/cli/optimize_steering.py +14 -16
- wisent/core/cli/optimize_weights.py +2 -1
- wisent/core/cli/preview_pairs.py +203 -0
- wisent/core/cli/steering_method_trainer.py +3 -3
- wisent/core/cli/tasks.py +19 -76
- wisent/core/cli/train_unified_goodness.py +3 -3
- wisent/core/contrastive_pairs/diagnostics/control_vectors.py +4 -4
- wisent/core/contrastive_pairs/diagnostics/linearity.py +7 -0
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/agentic_search.py +37 -347
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/aider_polyglot.py +113 -136
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/codeforces.py +2 -12
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/coding_benchmarks.py +124 -504
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/faithbench.py +40 -63
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/flames.py +46 -89
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/flores.py +15 -4
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/frames.py +36 -20
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/hallucinations_leaderboard.py +3 -45
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/livemathbench.py +42 -4
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/longform_writing.py +2 -112
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/math500.py +39 -4
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/medium_priority_benchmarks.py +475 -525
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/mercury.py +65 -42
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/olympiadbench.py +2 -12
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/planbench.py +78 -219
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/polymath.py +37 -4
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/recode.py +84 -69
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/refusalbench.py +168 -160
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/simpleqa.py +44 -25
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/tau_bench.py +3 -103
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/toolbench.py +3 -97
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/toolemu.py +48 -182
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_manifest.py +3 -0
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_registry.py +19 -1
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/aclue.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/acp_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/acp_bench_hard.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/advanced.py +2 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/aexams.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/afrimmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/afrixnli.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabculture.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabic.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabic_exams.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabic_leaderboard_complete.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabic_leaderboard_light.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arabicmmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/aradice.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arc.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arc_challenge.py +1 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arc_easy.py +1 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/arithmetic.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/asdiv.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/babi.py +36 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/basque_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/bbq.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/belebele.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/benchmarks.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/bertaqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/bhs.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/bhtc.py +3 -5
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/blimp.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/blimp_nl.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/boolq.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/c4.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cabbq.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/careqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/catalan_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/catalanqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/catcola.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cb.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/ceval.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/ceval_valid.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/chain.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/chartqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/claim.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/click.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cmmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cnn.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cocoteros.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/coedit.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/commonsense.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/commonsense_qa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/copa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/copal_id.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/coqa.py +3 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/csatqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/cycle.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/darija_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/darijahellaswag.py +2 -6
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/darijammlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/dbpedia.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/discrim_eval.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/doc.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/drop.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/epec.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eq.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eq_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eq_bench_ca.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eq_bench_es.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/esbbq.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/ethics.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eus.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eus_exams.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eus_proficiency.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eus_reading.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/eus_trivia.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/evalita_llm.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/financial.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/flan.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/french_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/galician_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/gaokao.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/glianorex.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/global_mmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/global_piqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/gpt3.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/groundcocoa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/haerae.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/headqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/hellaswag.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/hendrycks_ethics.py +5 -9
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/hendrycks_math.py +63 -16
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/histoires_morales.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/hrm8k.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/humaneval_infilling.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/icelandic_winogrande.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/inverse.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/inverse_scaling.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/ja.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/japanese_leaderboard.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/japanese_leaderboard_mc.py +1 -1
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/kmmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/kobest.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/kormedmcqa.py +5 -17
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/lambada_cloze.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/lambada_multilingual.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/law.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/leaderboard.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/lingoly.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/llama3.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/lm_syneval.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/logiqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/logiqa2.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/longbench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/longbenchv2.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mastermind.py +2 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mc-taco.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/med_concepts_qa.py +2 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/meddialog.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/medical.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/medmcqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/medqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mela.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/metabench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/minerva_math.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mmlusr.py +3 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mrpc.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/multiblimp.py +2 -5
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/multirc.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/mutual.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/non.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/noreval.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/noreval_exact.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/noreval_gen_exact.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/noreval_mc.py +4 -8
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/noreval_mc_log_likelihoods.py +4 -8
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/nq_open.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/okapi_arc_multilingual.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/okapi_hellaswag_multilingual.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/okapi_mmlu_multilingual.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/okapi_truthfulqa_multilingual.py +2 -5
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/olaph.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/openbookqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/option.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/parafraseja.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/parafrases.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/paws.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/paws_x.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/pawsx.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/persona.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/phrases.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/pile.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/piqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/portuguese_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/prompt.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/prost.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/pubmedqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qa4mre.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qasper.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qasper_bool.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qnli.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qnlieu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/qqp.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/race.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/random.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/record.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/reversed.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/rte.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/ruler.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/sciq.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/score.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/scrolls.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/scrolls_mc.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/self.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/sglue.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/sglue_rte.py +2 -1
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/siqa.py +4 -7
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/social_iqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/spanish_bench.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/storycloze.py +2 -6
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/summarization.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/super.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/super_glue.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/swag.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/swde.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/sycophancy.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/t0.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/teca.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinyarc.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinybenchmarks.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinygsm8k.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinyhellaswag.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinymmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinytruthfulqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tinywinogrande.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/tmmluplus.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/triviaqa.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/truthfulqa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/truthfulqa_mc1.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/truthfulqa_mc2.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/turblimp_core.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/turkishmmlu.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/turkishmmlu_mc.py +0 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/unscramble.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/vaxx.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/webqs.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/wic.py +3 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/winogrande.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/wmdp.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/wnli.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/wsc.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/wsc273.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xcopa.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xlsum.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xnli.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xquad.py +2 -4
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xstorycloze.py +2 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/xwinograd.py +2 -2
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/zhoblimp.py +1 -3
- wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_pairs_generation.py +173 -6
- wisent/core/data_loaders/loaders/lm_loader.py +12 -1
- wisent/core/geometry_runner.py +995 -0
- wisent/core/geometry_search_space.py +237 -0
- wisent/core/hyperparameter_optimizer.py +1 -1
- wisent/core/main.py +3 -0
- wisent/core/models/core/atoms.py +5 -3
- wisent/core/models/wisent_model.py +1 -1
- wisent/core/optuna/classifier/optuna_classifier_optimizer.py +2 -2
- wisent/core/parser_arguments/check_linearity_parser.py +12 -2
- wisent/core/parser_arguments/generate_vector_from_synthetic_parser.py +2 -2
- wisent/core/parser_arguments/generate_vector_from_task_parser.py +2 -2
- wisent/core/parser_arguments/geometry_search_parser.py +61 -0
- wisent/core/parser_arguments/main_parser.py +8 -0
- wisent/core/parser_arguments/train_unified_goodness_parser.py +2 -2
- wisent/core/steering.py +5 -3
- wisent/core/steering_methods/methods/hyperplane.py +2 -1
- wisent/core/synthetic/generators/nonsense_generator.py +30 -18
- wisent/core/trainers/steering_trainer.py +2 -2
- wisent/core/utils/device.py +27 -27
- wisent/core/utils/layer_combinations.py +70 -0
- wisent/examples/__init__.py +1 -0
- wisent/examples/scripts/__init__.py +1 -0
- wisent/examples/scripts/count_all_benchmarks.py +121 -0
- wisent/examples/scripts/discover_directions.py +469 -0
- wisent/examples/scripts/extract_benchmark_info.py +71 -0
- wisent/examples/scripts/generate_paper_data.py +384 -0
- wisent/examples/scripts/intervention_validation.py +626 -0
- wisent/examples/scripts/results/test_AraDiCE_ArabicMMLU_lev_evaluation.json +324 -0
- wisent/examples/scripts/results/test_AraDiCE_ArabicMMLU_lev_pairs.json +92 -0
- wisent/examples/scripts/results/test_aexams_IslamicStudies_evaluation.json +324 -0
- wisent/examples/scripts/results/test_aexams_IslamicStudies_pairs.json +92 -0
- wisent/examples/scripts/results/test_afrimgsm_pairs.json +92 -0
- wisent/examples/scripts/results/test_afrimmlu_evaluation.json +324 -0
- wisent/examples/scripts/results/test_afrimmlu_pairs.json +92 -0
- wisent/examples/scripts/search_all_short_names.py +31 -0
- wisent/examples/scripts/test_all_benchmarks.py +138 -0
- wisent/examples/scripts/test_all_benchmarks_new.py +28 -0
- wisent/examples/scripts/test_contrastive_pairs_all_supported.py +230 -0
- wisent/examples/scripts/test_nonsense_baseline.py +261 -0
- wisent/examples/scripts/test_one_benchmark.py +324 -0
- wisent/examples/scripts/test_one_coding_benchmark.py +293 -0
- wisent/examples/scripts/threshold_analysis.py +434 -0
- wisent/examples/scripts/visualization_gallery.py +582 -0
- wisent/parameters/lm_eval/broken_in_lm_eval.json +179 -2
- wisent/parameters/lm_eval/category_directions.json +137 -0
- wisent/parameters/lm_eval/repair_plan.json +282 -0
- wisent/parameters/lm_eval/weak_contrastive_pairs.json +38 -0
- wisent/parameters/lm_eval/working_benchmarks.json +206 -0
- wisent/parameters/lm_eval/working_benchmarks_categorized.json +236 -0
- wisent/tests/test_detector_accuracy.py +1 -1
- wisent/tests/visualize_geometry.py +1 -1
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/METADATA +1 -1
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/RECORD +329 -295
- wisent/core/contrastive_pairs/huggingface_pairs/hf_task_extractors/browsecomp.py +0 -245
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/WHEEL +0 -0
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/entry_points.txt +0 -0
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/licenses/LICENSE +0 -0
- {wisent-0.7.701.dist-info → wisent-0.7.901.dist-info}/top_level.txt +0 -0
|
@@ -124,15 +124,14 @@ class SIQAExtractor(LMEvalBenchmarkExtractor):
|
|
|
124
124
|
incorrect_idx = (label_idx + 1) % len(choices)
|
|
125
125
|
incorrect = choices[incorrect_idx]
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
formatted_question = f"{full_question}\nA. {incorrect}\nB. {correct}"
|
|
127
|
+
prompt = f"Context: {context}\nQuestion: {question}"
|
|
129
128
|
|
|
130
129
|
metadata = {
|
|
131
130
|
"label": "siqa",
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
return self._build_pair(
|
|
135
|
-
question=
|
|
134
|
+
question=prompt,
|
|
136
135
|
correct=correct,
|
|
137
136
|
incorrect=incorrect,
|
|
138
137
|
metadata=metadata,
|
|
@@ -171,16 +170,14 @@ class SIQAExtractor(LMEvalBenchmarkExtractor):
|
|
|
171
170
|
for line in inputs.split('\n'):
|
|
172
171
|
if line.strip() and not line.strip().startswith('choice:'):
|
|
173
172
|
question_lines.append(line.strip())
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
formatted_question = f"{question}\nA. {incorrect}\nB. {correct}"
|
|
173
|
+
prompt = '\n'.join(question_lines)
|
|
177
174
|
|
|
178
175
|
metadata = {
|
|
179
176
|
"label": "siqa",
|
|
180
177
|
}
|
|
181
178
|
|
|
182
179
|
return self._build_pair(
|
|
183
|
-
question=
|
|
180
|
+
question=prompt,
|
|
184
181
|
correct=correct,
|
|
185
182
|
incorrect=incorrect,
|
|
186
183
|
metadata=metadata,
|
|
@@ -85,14 +85,14 @@ class SocialIQAExtractor(LMEvalBenchmarkExtractor):
|
|
|
85
85
|
correct = answers[label]
|
|
86
86
|
incorrect = answers[(label+1)%len(answers)]
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
prompt = f"Q: {context} {question}\nA:"
|
|
89
89
|
|
|
90
90
|
metadata = {
|
|
91
91
|
"label": "social_iqa",
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
return self._build_pair(
|
|
95
|
-
question=
|
|
95
|
+
question=prompt,
|
|
96
96
|
correct=correct,
|
|
97
97
|
incorrect=incorrect,
|
|
98
98
|
metadata=metadata,
|
|
@@ -126,14 +126,12 @@ class SpanishBenchExtractor(LMEvalBenchmarkExtractor):
|
|
|
126
126
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
127
127
|
incorrect = choices[incorrect_idx]
|
|
128
128
|
|
|
129
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
130
|
-
|
|
131
129
|
metadata = {
|
|
132
130
|
"label": "spanish_bench",
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
return self._build_pair(
|
|
136
|
-
question=
|
|
134
|
+
question=question,
|
|
137
135
|
correct=correct,
|
|
138
136
|
incorrect=incorrect,
|
|
139
137
|
metadata=metadata,
|
|
@@ -162,14 +162,12 @@ class StoryclozeExtractor(LMEvalBenchmarkExtractor):
|
|
|
162
162
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
163
163
|
incorrect = choices[incorrect_idx]
|
|
164
164
|
|
|
165
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
166
|
-
|
|
167
165
|
metadata = {
|
|
168
166
|
"label": "storycloze",
|
|
169
167
|
}
|
|
170
168
|
|
|
171
169
|
return self._build_pair(
|
|
172
|
-
question=
|
|
170
|
+
question=question,
|
|
173
171
|
correct=correct,
|
|
174
172
|
incorrect=incorrect,
|
|
175
173
|
metadata=metadata,
|
|
@@ -199,14 +197,12 @@ class StoryclozeExtractor(LMEvalBenchmarkExtractor):
|
|
|
199
197
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
200
198
|
incorrect = choices[incorrect_idx]
|
|
201
199
|
|
|
202
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
203
|
-
|
|
204
200
|
metadata = {
|
|
205
201
|
"label": "storycloze",
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
return self._build_pair(
|
|
209
|
-
question=
|
|
205
|
+
question=question,
|
|
210
206
|
correct=correct,
|
|
211
207
|
incorrect=incorrect,
|
|
212
208
|
metadata=metadata,
|
|
@@ -80,12 +80,10 @@ class SummarizationExtractor(LMEvalBenchmarkExtractor):
|
|
|
80
80
|
correct = str(choices[answer_idx]).strip()
|
|
81
81
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
82
82
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
83
|
-
|
|
84
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
85
83
|
metadata = {"label": "summarization"}
|
|
86
84
|
|
|
87
85
|
return self._build_pair(
|
|
88
|
-
question=
|
|
86
|
+
question=question,
|
|
89
87
|
correct=correct,
|
|
90
88
|
incorrect=incorrect,
|
|
91
89
|
metadata=metadata,
|
|
@@ -80,12 +80,10 @@ class SuperExtractor(LMEvalBenchmarkExtractor):
|
|
|
80
80
|
correct = str(choices[answer_idx]).strip()
|
|
81
81
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
82
82
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
83
|
-
|
|
84
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
85
83
|
metadata = {"label": "super"}
|
|
86
84
|
|
|
87
85
|
return self._build_pair(
|
|
88
|
-
question=
|
|
86
|
+
question=question,
|
|
89
87
|
correct=correct,
|
|
90
88
|
incorrect=incorrect,
|
|
91
89
|
metadata=metadata,
|
|
@@ -125,14 +125,12 @@ class SuperGlueExtractor(LMEvalBenchmarkExtractor):
|
|
|
125
125
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
126
126
|
incorrect = choices[incorrect_idx]
|
|
127
127
|
|
|
128
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
129
|
-
|
|
130
128
|
metadata = {
|
|
131
129
|
"label": "super_glue",
|
|
132
130
|
}
|
|
133
131
|
|
|
134
132
|
return self._build_pair(
|
|
135
|
-
question=
|
|
133
|
+
question=question,
|
|
136
134
|
correct=correct,
|
|
137
135
|
incorrect=incorrect,
|
|
138
136
|
metadata=metadata,
|
|
@@ -86,14 +86,14 @@ class SwagExtractor(LMEvalBenchmarkExtractor):
|
|
|
86
86
|
incorrect = endings[(label+1)%len(endings)]
|
|
87
87
|
|
|
88
88
|
question = f"{startphrase}"
|
|
89
|
-
|
|
89
|
+
prompt = f"{question}"
|
|
90
90
|
|
|
91
91
|
metadata = {
|
|
92
92
|
"label": "swag",
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
return self._build_pair(
|
|
96
|
-
question=
|
|
96
|
+
question=prompt,
|
|
97
97
|
correct=correct,
|
|
98
98
|
incorrect=incorrect,
|
|
99
99
|
metadata=metadata,
|
|
@@ -150,14 +150,12 @@ class SwdeExtractor(LMEvalBenchmarkExtractor):
|
|
|
150
150
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
151
151
|
incorrect = choices[incorrect_idx]
|
|
152
152
|
|
|
153
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
154
|
-
|
|
155
153
|
metadata = {
|
|
156
154
|
"label": "swde",
|
|
157
155
|
}
|
|
158
156
|
|
|
159
157
|
return self._build_pair(
|
|
160
|
-
question=
|
|
158
|
+
question=question,
|
|
161
159
|
correct=correct,
|
|
162
160
|
incorrect=incorrect,
|
|
163
161
|
metadata=metadata,
|
|
@@ -90,12 +90,10 @@ class SycophancyExtractor(LMEvalBenchmarkExtractor):
|
|
|
90
90
|
correct = answer_not_matching
|
|
91
91
|
# The sycophantic answer is the incorrect (negative) response
|
|
92
92
|
incorrect = answer_matching
|
|
93
|
-
|
|
94
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
95
93
|
metadata = {"label": "sycophancy"}
|
|
96
94
|
|
|
97
95
|
return self._build_pair(
|
|
98
|
-
question=
|
|
96
|
+
question=question,
|
|
99
97
|
correct=correct,
|
|
100
98
|
incorrect=incorrect,
|
|
101
99
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class T0Extractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "t0"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class TecaExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "teca"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class TinyarcExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "tinyarc"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -126,14 +126,12 @@ class TinybenchmarksExtractor(LMEvalBenchmarkExtractor):
|
|
|
126
126
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
127
127
|
incorrect = choices[incorrect_idx]
|
|
128
128
|
|
|
129
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
130
|
-
|
|
131
129
|
metadata = {
|
|
132
130
|
"label": "tinybenchmarks",
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
return self._build_pair(
|
|
136
|
-
question=
|
|
134
|
+
question=question,
|
|
137
135
|
correct=correct,
|
|
138
136
|
incorrect=incorrect,
|
|
139
137
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class Tinygsm8kExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "tinygsm8k"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class TinyhellaswagExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "tinyhellaswag"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class TinymmluExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "tinymmlu"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -86,12 +86,10 @@ class TinytruthfulqaExtractor(LMEvalBenchmarkExtractor):
|
|
|
86
86
|
correct = str(choices[answer_idx]).strip()
|
|
87
87
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
88
88
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
89
|
-
|
|
90
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
91
89
|
metadata = {"label": "tinytruthfulqa"}
|
|
92
90
|
|
|
93
91
|
return self._build_pair(
|
|
94
|
-
question=
|
|
92
|
+
question=question,
|
|
95
93
|
correct=correct,
|
|
96
94
|
incorrect=incorrect,
|
|
97
95
|
metadata=metadata,
|
|
@@ -83,12 +83,10 @@ class TinywinograndeExtractor(LMEvalBenchmarkExtractor):
|
|
|
83
83
|
correct = str(choices[answer_idx]).strip()
|
|
84
84
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
85
85
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
86
|
-
|
|
87
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
88
86
|
metadata = {"label": "tinywinogrande"}
|
|
89
87
|
|
|
90
88
|
return self._build_pair(
|
|
91
|
-
question=
|
|
89
|
+
question=question,
|
|
92
90
|
correct=correct,
|
|
93
91
|
incorrect=incorrect,
|
|
94
92
|
metadata=metadata,
|
|
@@ -152,14 +152,12 @@ class TmmluplusExtractor(LMEvalBenchmarkExtractor):
|
|
|
152
152
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
153
153
|
incorrect = choices[incorrect_idx]
|
|
154
154
|
|
|
155
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
156
|
-
|
|
157
155
|
metadata = {
|
|
158
156
|
"label": "tmmluplus",
|
|
159
157
|
}
|
|
160
158
|
|
|
161
159
|
return self._build_pair(
|
|
162
|
-
question=
|
|
160
|
+
question=question,
|
|
163
161
|
correct=correct,
|
|
164
162
|
incorrect=incorrect,
|
|
165
163
|
metadata=metadata,
|
|
@@ -101,14 +101,14 @@ class TriviaQAExtractor(LMEvalBenchmarkExtractor):
|
|
|
101
101
|
if incorrect == correct:
|
|
102
102
|
incorrect += "k"
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
prompt = f"Question: {question}\nAnswer:"
|
|
105
105
|
|
|
106
106
|
metadata = {
|
|
107
107
|
"label": "triviaqa",
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
return self._build_pair(
|
|
111
|
-
question=
|
|
111
|
+
question=prompt,
|
|
112
112
|
correct=correct,
|
|
113
113
|
incorrect=incorrect,
|
|
114
114
|
metadata=metadata,
|
|
@@ -85,12 +85,10 @@ class TruthfulqaExtractor(LMEvalBenchmarkExtractor):
|
|
|
85
85
|
correct = str(choices[answer_idx]).strip()
|
|
86
86
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
87
87
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
88
|
-
|
|
89
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
90
88
|
metadata = {"label": "truthfulqa"}
|
|
91
89
|
|
|
92
90
|
return self._build_pair(
|
|
93
|
-
question=
|
|
91
|
+
question=question,
|
|
94
92
|
correct=correct,
|
|
95
93
|
incorrect=incorrect,
|
|
96
94
|
metadata=metadata,
|
|
@@ -91,14 +91,12 @@ class TruthfulQAMC1Extractor(LMEvalBenchmarkExtractor):
|
|
|
91
91
|
correct = options[answer_idx]
|
|
92
92
|
incorrect = options[(answer_idx+1)%len(options)]
|
|
93
93
|
|
|
94
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
95
|
-
|
|
96
94
|
metadata = {
|
|
97
95
|
"label": "truthfulqa_mc1",
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
return self._build_pair(
|
|
101
|
-
question=
|
|
99
|
+
question=question,
|
|
102
100
|
correct=correct,
|
|
103
101
|
incorrect=incorrect,
|
|
104
102
|
metadata=metadata,
|
|
@@ -111,14 +111,12 @@ class TruthfulQAMC2Extractor(LMEvalBenchmarkExtractor):
|
|
|
111
111
|
correct = min(correct_answers, key=len)
|
|
112
112
|
incorrect = max(incorrect_answers, key=len)
|
|
113
113
|
|
|
114
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
115
|
-
|
|
116
114
|
metadata = {
|
|
117
115
|
"label": "truthfulqa_mc2",
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
return self._build_pair(
|
|
121
|
-
question=
|
|
119
|
+
question=question,
|
|
122
120
|
correct=correct,
|
|
123
121
|
incorrect=incorrect,
|
|
124
122
|
metadata=metadata,
|
|
@@ -123,14 +123,12 @@ class TurblimpCoreExtractor(LMEvalBenchmarkExtractor):
|
|
|
123
123
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
124
124
|
incorrect = choices[incorrect_idx]
|
|
125
125
|
|
|
126
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
127
|
-
|
|
128
126
|
metadata = {
|
|
129
127
|
"label": "turblimp_core",
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
return self._build_pair(
|
|
133
|
-
question=
|
|
131
|
+
question=question,
|
|
134
132
|
correct=correct,
|
|
135
133
|
incorrect=incorrect,
|
|
136
134
|
metadata=metadata,
|
|
@@ -132,14 +132,12 @@ class TurkishmmluExtractor(LMEvalBenchmarkExtractor):
|
|
|
132
132
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
133
133
|
incorrect = choices[incorrect_idx]
|
|
134
134
|
|
|
135
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
136
|
-
|
|
137
135
|
metadata = {
|
|
138
136
|
"label": "turkishmmlu",
|
|
139
137
|
}
|
|
140
138
|
|
|
141
139
|
return self._build_pair(
|
|
142
|
-
question=
|
|
140
|
+
question=question,
|
|
143
141
|
correct=correct,
|
|
144
142
|
incorrect=incorrect,
|
|
145
143
|
metadata=metadata,
|
|
@@ -85,8 +85,6 @@ class TurkishmmluMultipleChoiceExtractor(LMEvalBenchmarkExtractor):
|
|
|
85
85
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
86
86
|
incorrect = str(choices[incorrect_idx]).strip()
|
|
87
87
|
|
|
88
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
89
|
-
|
|
90
88
|
positive_response = PositiveResponse(model_response=correct)
|
|
91
89
|
negative_response = NegativeResponse(model_response=incorrect)
|
|
92
90
|
|
|
@@ -126,14 +126,12 @@ class UnscrambleExtractor(LMEvalBenchmarkExtractor):
|
|
|
126
126
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
127
127
|
incorrect = choices[incorrect_idx]
|
|
128
128
|
|
|
129
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
130
|
-
|
|
131
129
|
metadata = {
|
|
132
130
|
"label": "unscramble",
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
return self._build_pair(
|
|
136
|
-
question=
|
|
134
|
+
question=question,
|
|
137
135
|
correct=correct,
|
|
138
136
|
incorrect=incorrect,
|
|
139
137
|
metadata=metadata,
|
|
@@ -69,11 +69,11 @@ class VaxxExtractor(LMEvalBenchmarkExtractor):
|
|
|
69
69
|
incorrect = stance_choices[incorrect_idx]
|
|
70
70
|
|
|
71
71
|
# Format as a classification task
|
|
72
|
-
|
|
72
|
+
prompt = f"Text: {text}\n\nWhat is the stance towards COVID-19 vaccination?"
|
|
73
73
|
metadata = {"label": "vaxx"}
|
|
74
74
|
|
|
75
75
|
return self._build_pair(
|
|
76
|
-
question=
|
|
76
|
+
question=prompt,
|
|
77
77
|
correct=correct,
|
|
78
78
|
incorrect=incorrect,
|
|
79
79
|
metadata=metadata,
|
|
@@ -101,14 +101,14 @@ class WebQSExtractor(LMEvalBenchmarkExtractor):
|
|
|
101
101
|
if incorrect == correct:
|
|
102
102
|
incorrect += "k"
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
prompt = f"Question: {question}\nAnswer:"
|
|
105
105
|
|
|
106
106
|
metadata = {
|
|
107
107
|
"label": "webquestions",
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
return self._build_pair(
|
|
111
|
-
question=
|
|
111
|
+
question=prompt,
|
|
112
112
|
correct=correct,
|
|
113
113
|
incorrect=incorrect,
|
|
114
114
|
metadata=metadata,
|
|
@@ -85,11 +85,10 @@ class WiCExtractor(LMEvalBenchmarkExtractor):
|
|
|
85
85
|
)
|
|
86
86
|
return None
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
prompt = (
|
|
89
89
|
f"Sentence 1: {sentence1}\n"
|
|
90
90
|
f"Sentence 2: {sentence2}\n"
|
|
91
|
-
f"Question: Is the word '{word}' used in the same way in the two sentences above
|
|
92
|
-
"Answer:\nA. Yes\nB. No"
|
|
91
|
+
f"Question: Is the word '{word}' used in the same way in the two sentences above?"
|
|
93
92
|
)
|
|
94
93
|
|
|
95
94
|
correct = "Yes" if label == 1 else "No"
|
|
@@ -100,7 +99,7 @@ class WiCExtractor(LMEvalBenchmarkExtractor):
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
return self._build_pair(
|
|
103
|
-
question=
|
|
102
|
+
question=prompt,
|
|
104
103
|
correct=correct,
|
|
105
104
|
incorrect=incorrect,
|
|
106
105
|
metadata=metadata,
|
|
@@ -86,7 +86,7 @@ class WinograndeExtractor(LMEvalBenchmarkExtractor):
|
|
|
86
86
|
return None
|
|
87
87
|
|
|
88
88
|
question = f"Complete the sentence: {sentence}"
|
|
89
|
-
|
|
89
|
+
prompt = f"{question}"
|
|
90
90
|
|
|
91
91
|
correct = option1 if answer == "1" else option2
|
|
92
92
|
incorrect = option2 if answer == "1" else option1
|
|
@@ -96,7 +96,7 @@ class WinograndeExtractor(LMEvalBenchmarkExtractor):
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
return self._build_pair(
|
|
99
|
-
question=
|
|
99
|
+
question=prompt,
|
|
100
100
|
correct=correct,
|
|
101
101
|
incorrect=incorrect,
|
|
102
102
|
metadata=metadata,
|
|
@@ -126,14 +126,12 @@ class WmdpExtractor(LMEvalBenchmarkExtractor):
|
|
|
126
126
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
127
127
|
incorrect = choices[incorrect_idx]
|
|
128
128
|
|
|
129
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
130
|
-
|
|
131
129
|
metadata = {
|
|
132
130
|
"label": "wmdp",
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
return self._build_pair(
|
|
136
|
-
question=
|
|
134
|
+
question=question,
|
|
137
135
|
correct=correct,
|
|
138
136
|
incorrect=incorrect,
|
|
139
137
|
metadata=metadata,
|
|
@@ -82,7 +82,7 @@ class WNLIExtractor(LMEvalBenchmarkExtractor):
|
|
|
82
82
|
)
|
|
83
83
|
return None
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
prompt = f"{sentence1}\nQuestion: {sentence2} True or False?"
|
|
86
86
|
|
|
87
87
|
correct = "True" if label == 1 else "False"
|
|
88
88
|
incorrect = "False" if label == 1 else "True"
|
|
@@ -92,7 +92,7 @@ class WNLIExtractor(LMEvalBenchmarkExtractor):
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
return self._build_pair(
|
|
95
|
-
question=
|
|
95
|
+
question=prompt,
|
|
96
96
|
correct=correct,
|
|
97
97
|
incorrect=incorrect,
|
|
98
98
|
metadata=metadata,
|
|
@@ -85,7 +85,7 @@ class WSCExtractor(LMEvalBenchmarkExtractor):
|
|
|
85
85
|
)
|
|
86
86
|
return None
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
prompt = f"Passage: {text}\nQuestion: In the passage above, does the pronoun \"{span2_text}\" refer to \"{span1_text}\"?"
|
|
89
89
|
|
|
90
90
|
correct = "Yes" if label == 1 else "No"
|
|
91
91
|
incorrect = "No" if label == 1 else "Yes"
|
|
@@ -95,7 +95,7 @@ class WSCExtractor(LMEvalBenchmarkExtractor):
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
return self._build_pair(
|
|
98
|
-
question=
|
|
98
|
+
question=prompt,
|
|
99
99
|
correct=correct,
|
|
100
100
|
incorrect=incorrect,
|
|
101
101
|
metadata=metadata,
|
|
@@ -151,14 +151,12 @@ class Wsc273Extractor(LMEvalBenchmarkExtractor):
|
|
|
151
151
|
incorrect_idx = (answer_idx + 1) % len(choices)
|
|
152
152
|
incorrect = choices[incorrect_idx]
|
|
153
153
|
|
|
154
|
-
formatted_question = f"Question: {question}\nA. {incorrect}\nB. {correct}"
|
|
155
|
-
|
|
156
154
|
metadata = {
|
|
157
155
|
"label": "wsc273",
|
|
158
156
|
}
|
|
159
157
|
|
|
160
158
|
return self._build_pair(
|
|
161
|
-
question=
|
|
159
|
+
question=question,
|
|
162
160
|
correct=correct,
|
|
163
161
|
incorrect=incorrect,
|
|
164
162
|
metadata=metadata,
|