--- license: mit pipeline_tag: text-classification library_name: transformers base_model: answerdotai/ModernBERT-large tags: - science - reasoning - verification - weaver - cross-encoder language: - en --- # Weaver Distilled for GPQA This is a distilled cross-encoder model based on ModernBERT-large, trained to predict the correctness of answers on GPQA. This specialized verifier was trained on Weaver scores aggregated over 35 different verifiers and reward models. ## Model Details - **Base Model**: [answerdotai/ModernBERT-large](https://huggingface.co/answerdotai/ModernBERT-large) (395M parameters) - **Architecture**: Cross-encoder with MLP head (1024 → 512 → 256 → 1) - **Max Sequence Length**: 4096 tokens - **Training Data**: GPQA problems with Weaver scores from 35 LM judges and reward models - **Task**: Binary classification for answer correctness prediction ## Quick Start ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch # Load model and tokenizer model_name = "hazyresearch/Weaver_Distilled_for_GPQA" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained(model_name) # Example usage instruction = "Which of the following best describes photosynthesis? A) Converting light to chemical energy B) Breaking down glucose C) Cellular respiration D) Protein synthesis" response = "The answer is A) Converting light to chemical energy. Photosynthesis is the process by which plants convert light energy into chemical energy..." # Tokenize input pair inputs = tokenizer( instruction, response, truncation=True, max_length=4096, padding=True, return_tensors="pt" ) # Get correctness score with torch.no_grad(): outputs = model(**inputs) score = torch.sigmoid(outputs.logits).item() print(f"Correctness score: {score:.3f}") print(f"Prediction: {'Correct' if score > 0.5 else 'Incorrect'}") ``` ## Citation ```bibtex @misc{saadfalcon2025shrinkinggenerationverificationgapweak, title={Shrinking the Generation-Verification Gap with Weak Verifiers}, author={Jon Saad-Falcon and E. Kelly Buchanan and Mayee F. Chen and Tzu-Heng Huang and Brendan McLaughlin and Tanvir Bhathal and Shang Zhu and Ben Athiwaratkun and Frederic Sala and Scott Linderman and Azalia Mirhoseini and Christopher Ré}, year={2025}, eprint={2506.18203}, archivePrefix={arXiv}, primaryClass={cs.CR}, url={https://arxiv.org/abs/2506.18203}, } ```