Skip to content

Dropout fix [PyTorch]: Move dropout_rate from model init to model fwd pass #873

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

Merged

Conversation

Niccolo-Ajroldi
Copy link
Member

We introduce dropout_rate in the model call (fwd pass), and modify model implementations to support a dynamic dropout_rate value. Consequently, we remove dropout_rate from the model initialization, and adapt the workloads to support this new paradigm.

More details in this discussion: #753 (comment)

Tests for model equivalence are available at: https://github.com/Niccolo-Ajroldi/algorithmic-efficiency/tree/dropout_pytorch/tests/dropout_fix

@Niccolo-Ajroldi Niccolo-Ajroldi requested a review from a team as a code owner June 15, 2025 15:35
Copy link

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@Niccolo-Ajroldi Niccolo-Ajroldi changed the title Dropout fix [PyTorch]: Move dropout_rate from model init to model fwd pass Dropout fix [PyTorch]: Move dropout_rate from model init to model fwd pass Jun 15, 2025
@priyakasimbeg priyakasimbeg merged commit 6b6f2a6 into mlcommons:dropout_support Jun 18, 2025
6 of 16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants