Hugging Face Zero-Shot Evaluation on the Hub
Hugging Face has enabled zero-shot evaluation for causal language models via the "Evaluation on the Hub" tool. This update allows researchers and developers to measure model performance on classification tasks without requiring labeled training data or custom GPU infrastructure, democratizing access to the benchmarking of very large language models (LLMs).
Zero-Shot Evaluation Infrastructure
Evaluation on the Hub, powered by AutoTrain, now supports zero-shot classification for any causal language model hosted on the Hub. This system removes the technical and financial barriers associated with evaluating large-scale models, such as the significant time and hardware costs required to load and compile models with tens of billions of parameters.
Key technical details of the infrastructure include:
- Model Capacity: The tool currently supports models up to 66 billion parameters, with plans to support larger models in the future.
- Performance: Evaluating a 66-billion parameter model on a zero-shot classification task with 2,000 sentence-length examples takes approximately 3.5 hours.
- Mechanism: The zero-shot text classification task functions by concatenating possible completions to a prompt and summing the log-probabilities for each token. These values are then normalized and compared against the correct completion to determine accuracy.
Case Study: Gender Bias in WinoBias
To demonstrate the tool's capabilities, Hugging Face evaluated various OPT models using the WinoBias dataset, which measures gender bias related to occupations. In this task, the model must select the correct pronoun (stereotypical or anti-stereotypical) to complete a sentence mentioning a specific occupation.
The evaluation revealed an "inverse scaling" trend: smaller models were more likely to select the anti-stereotypical pronoun, whereas larger models were more likely to rely on stereotypical associations between gender and occupation. This finding aligns with other benchmarks, such as BIG-Bench, and prior research indicating that larger, more capable models are more prone to generating toxic text or exhibiting biases related to race, ethnicity, and nationality.
Implications for AI Research and Inverse Scaling
Evaluation on the Hub is designed as a low-code tool to help researchers analyze model behavior across different axes, such as model size or FLOPS. Because the zero-shot text classification task is flexible, any dataset that can be formatted as a Winograd schema—where examples differ only by a few words—can be used for benchmarking.
This accessibility is particularly useful for studying the "inverse scaling problem," where larger models perform worse than smaller models on specific tasks. Hugging Face encourages the community to use these tools to identify such trends and contribute to initiatives like the Inverse Scaling Prize, which challenges researchers to find tasks where model size does not correlate with improved performance.