Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CrowS-Pairs task #70

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

oskarvanderwal
Copy link

@oskarvanderwal oskarvanderwal commented Nov 10, 2021

  • Evaluated on: GPT-2
  • Time evaluating on GPU: 00:48

Here is my attempt at implementing CrowS-Pairs and making it suitable for autoregressive models (closes #37).
Originally, CrowS-Pairs is designed for Masked Language Models, so I had to adapt their sentence scoring function (based on masking tokens). I am using perplexity instead to compare the sentences.

I have tested the task on GPT-2, and get the following results:

{
    "crowspairs_bias": 0.593501326259947,
    "crowspairs_bias_age": 0.5287356321839081,
    "crowspairs_bias_disability": 0.6,
    "crowspairs_bias_gender": 0.583969465648855,
    "crowspairs_bias_nationality": 0.44654088050314467,
    "crowspairs_bias_physical-appearance": 0.6349206349206349,
    "crowspairs_bias_race-color": 0.5775193798449613,
    "crowspairs_bias_religion": 0.6761904761904762,
    "crowspairs_bias_sexual-orientation": 0.7738095238095238,
    "crowspairs_bias_socioeconomic": 0.6686046511627907
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CrowS-Pairs to Full Benchmark
3 participants