Skip to content

Add docstring to FFN.forward in DistilBERT#45267

Open
KetanP1618 wants to merge 1 commit intohuggingface:mainfrom
KetanP1618:docs/add-docstrings-distilbert-heads
Open

Add docstring to FFN.forward in DistilBERT#45267
KetanP1618 wants to merge 1 commit intohuggingface:mainfrom
KetanP1618:docs/add-docstrings-distilbert-heads

Conversation

@KetanP1618
Copy link
Copy Markdown

What does this PR do?

Adds a missing docstring to the FFN.forward method in DistilBERT.

The FFN.forward method in modeling_distilbert.py had no documentation
at all. This PR adds proper Args and Returns sections following the
existing Hugging Face docstring format.

Changes

  • FFN.forward - Added Args and Returns sections

Tests

Verified the class works correctly:

  • FFN output shape: torch.Size([2, 10, 768])

- Added Args and Returns sections to FFN.forward method
- FFN.forward previously had no documentation
- Improves documentation coverage for DistilBERT model
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

[For maintainers] Suggested jobs to run (before merge)

run-slow: distilbert

@Rocketknight1
Copy link
Copy Markdown
Member

Same comment as #45266

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.

2 participants