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

Implement arithmetic evaluations #25

Closed
2 tasks done
StellaAthena opened this issue Sep 16, 2020 · 7 comments
Closed
2 tasks done

Implement arithmetic evaluations #25

StellaAthena opened this issue Sep 16, 2020 · 7 comments
Assignees
Labels
feature request A feature that isn't implemented yet. good first issue Good for newcomers

Comments

@StellaAthena
Copy link
Member

StellaAthena commented Sep 16, 2020

From the GPT-3 paper:

To test GPT-3’s ability to perform simple arithmetic operations without task-specific training, we developed a small
battery of 10 tests that involve asking GPT-3 a simple arithmetic problem in natural language:
• 2 digit addition (2D+) – The model is asked to add two integers sampled uniformly from [0, 100), phrased in
the form of a question, e.g. “Q: What is 48 plus 76? A: 124.”
• 2 digit subtraction (2D-) – The model is asked to subtract two integers sampled uniformly from [0, 100); the
answer may be negative. Example: “Q: What is 34 minus 53? A: -19”.
• 3 digit addition (3D+) – Same as 2 digit addition, except numbers are uniformly sampled from [0, 1000)
• 4 digit addition (4D+) – Same as 3 digit addition, except uniformly sampled from [0, 10000).
• 4 digit subtraction (4D-) – Same as 3 digit subtraction, except uniformly sampled from [0, 10000).
• 5 digit addition (5D+) – Same as 3 digit addition, except uniformly sampled from [0, 100000).
• 5 digit subtraction (5D-) – Same as 3 digit subtraction, except uniformly sampled from [0, 100000).
• 2 digit multiplication (2Dx) – The model is asked to multiply two integers sampled uniformly from [0, 100),
e.g. “Q: What is 24 times 42? A: 1008”.
• One-digit composite (1DC) – The model is asked to perform a composite operation on three 1 digit numbers,
with parentheses around the last two. For example, “Q: What is 6+(4*8)? A: 38”. The three 1 digit numbers
are selected uniformly on [0, 10) and the operations are selected uniformly from {+,-,*}.

In all 10 tasks the model must generate the correct answer exactly. For each task we generate a dataset of 2,000 random
instances of the task and evaluate all models on those instances. To spot-check whether the model is simply memorizing specific arithmetic problems, we took the 3-digit arithmetic problems in our test set and searched for them in our training data in both the forms " + =" and " plus ". Out of 2,000 addition problems we found only 17 matches (0.8%) and out of 2,000 subtraction problems we found only 2 matches (0.1%), suggesting that only a trivial fraction of the correct answers could have been memorized. In addition, inspection of incorrect answers reveals that the model often makes mistakes such as not carrying a “1”, suggesting it is actually attempting to perform the relevant computation rather than
memorizing a table

  • Data processing code implemented
  • Evaluation implemented

This should be modeled after the BoolQ task in lm_eval/tasks/suerglue.py

@StellaAthena StellaAthena added the feature request A feature that isn't implemented yet. label Sep 16, 2020
@StellaAthena StellaAthena added this to To do in Implementing Evaluations via automation Sep 16, 2020
@VitamintK
Copy link
Collaborator

I'll take this!

@StellaAthena StellaAthena moved this from To do to Review in progress in Implementing Evaluations Sep 20, 2020
@StellaAthena StellaAthena moved this from Review in progress to In progress in Implementing Evaluations Sep 20, 2020
@StellaAthena StellaAthena added Eval Set and removed feature request A feature that isn't implemented yet. labels Oct 23, 2020
@StellaAthena
Copy link
Member Author

@VitamintK Hey Kevin, how's this coming? Still planning on doing it?

@VitamintK
Copy link
Collaborator

I am, but I've been putting it off and haven't started yet.

@StellaAthena
Copy link
Member Author

No worries! Just wanted to check in and make sure it was on your radar. Do you think you'll be able to get it done in the next week or two? Finishing implementing the eval datasets is currently the major project blocker; we need to finish this before we can dedupe and we need to do that before we can start training models.

@VitamintK
Copy link
Collaborator

Yup, I'll try to get it done soon!

@StellaAthena
Copy link
Member Author

@VitamintK What's happened? Is this something you have done? Should I assign it to someone else?

@StellaAthena StellaAthena added feature request A feature that isn't implemented yet. good first issue Good for newcomers labels Jan 5, 2021
@VitamintK
Copy link
Collaborator

@StellaAthena hey, sorry for not following up with this until now, I am the worst. Finally got around to it, though!

@leogao2 leogao2 added this to To do in Implementing Evaluations via automation Jan 28, 2021
@leogao2 leogao2 moved this from To do to Done in Implementing Evaluations Jan 28, 2021
@leogao2 leogao2 closed this as completed Jan 28, 2021
StellaAthena added a commit that referenced this issue Apr 29, 2022
Adding CrowsPairs task for English and French
qmdnls pushed a commit to qmdnls/lm-evaluation-harness that referenced this issue Aug 17, 2023
Adding CrowsPairs task for English and French
LZY-the-boys pushed a commit to LZY-the-boys/lm-evaluation-harness-fast that referenced this issue Sep 12, 2023
Adding CrowsPairs task for English and French
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature that isn't implemented yet. good first issue Good for newcomers
Projects
No open projects
Implementing Evaluations
  
Done, evaluations
Development

No branches or pull requests

3 participants