Skip to content

Conversation

jnanliu
Copy link
Contributor

@jnanliu jnanliu commented Feb 26, 2025

This PR aims to support the G-Pass@k from paper.

G-Pass@k is a generalized version of Pass@k, measuring the ability of models to generate m correct solution in k attempts, where m is controled by the parameter thresholds. When the threshold is 0, G-Pass@k will discard to G-Pass@k. G-Pass@k can measure the potential and stability of models simultaneously.

$$ \text{G-Pass@}k_{\tau} = E_{\text{Questions}} \left[ \sum_{j = \lceil \tau \cdot k \rceil}^{c} \frac{\binom{c}{j} \cdot \binom{n - c}{k - j}}{\binom{n}{k}} \right] $$

$$ \text{mG-Pass@}k_{\tau} = 2\int_{0.5}^{1.0} \text{G-Pass@}k_{\tau} d \tau = \frac{2}{k} \sum_{i= \lceil 0.5 \cdot k \rceil + 1}^{k} \text{G-Pass@}k_{\frac{i}{k}} $$

@NathanHB
Copy link
Member

NathanHB commented Mar 4, 2025

hey ! Thanks for the PR :)
Do you plan to also add the math benchmark that comes with it ?

@jnanliu
Copy link
Contributor Author

jnanliu commented Mar 5, 2025

hey, I have added some tasks in tasks/default_tasks.py that support G-Pass@16 evaluation on AIME24/25 and MATH500 benchmarks, you can check it :)

@tonysy
Copy link

tonysy commented Apr 7, 2025

@NathanHB Hi, I would like to know if this PR can be merged now? or does it need more further modification?

Copy link
Member

@NathanHB NathanHB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ! Only a verry small nit, wait for the tests and good to merge

Comment on lines 1182 to 1184
k: Union[int, List[int]],
n: int = None,
thresholds: List[float] = [0.0, 0.25, 0.5, 0.75, 1.0],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list instead of List

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have fixed it

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@jnanliu
Copy link
Contributor Author

jnanliu commented Apr 14, 2025

@NathanHB Hi, I have fixed the nit, please allow the checks :)

@NathanHB NathanHB merged commit 89ba880 into huggingface:main Apr 22, 2025
4 checks passed
hynky1999 pushed a commit that referenced this pull request May 22, 2025
* add gpassk metric

* fix pre-commit error

* fix return type check

* fix metrics

* support gpassk for aime24/25 and math_500

* fix List to list

* remove List

---------

Co-authored-by: Nathan Habib <[email protected]>
NathanHB added a commit that referenced this pull request Sep 19, 2025
* add gpassk metric

* fix pre-commit error

* fix return type check

* fix metrics

* support gpassk for aime24/25 and math_500

* fix List to list

* remove List

---------

Co-authored-by: Nathan Habib <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants