pcDEQ Transformers. - #3
Open
mandar2812 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a complete implementation of pcDEQ (Positively Constrained Deep Equilibrium) Transformers, which includes fixed-point solvers, neural network blocks, layers, and complete network architectures for different configurations.
Key changes:
- Implementation of fixed-point iteration solver with convergence monitoring
- Creation of pcDEQ blocks and layers for linear, convolutional, and transformer architectures
- Development of complete network classes supporting different pcDEQ variants
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/gpt2/modeling/deq/solvers.py | Implements fixed-point iteration solver with error tracking and convergence criteria |
| src/gpt2/modeling/deq/networks.py | Provides complete network architectures for linear, convolutional, and transformer pcDEQ models |
| src/gpt2/modeling/deq/layers.py | Defines base and specialized pcDEQ layers with weight initialization and activation functions |
| src/gpt2/modeling/deq/blocks.py | Implements DEQ fixed-point blocks with custom gradient computation and weight clamping |
- Added type hints. - Using softsign activation - Clamp on `weight`, no weight norm used.
mandar2812
force-pushed
the
pcdeq-transformers
branch
from
August 13, 2025 10:06
24753c1 to
a6b07f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.