[ARCH]Add SiameseNorm and DepthAttention architecture - #19
Open
franksfc wants to merge 4 commits into
Open
Conversation
4 tasks
Collaborator
|
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.
Architecture Proposal
#2
Implementation Details
This PR implements SiameseNorm + Depth-Attention on top of the OLMo 3 decoder architecture and includes the reproducible Ascend/MindSpeed training pipeline used for the current model artifacts.
Modified components
baseandsiamese_depthOLMo 3 model variants.[SWA, SWA, SWA, Full]attention pattern.archs/SiameseNorm-DepthAttention.reproduce/Megatron-LM.Key implementation details
l, the Post-Norm-like stream receives the depth-scaled updateΔ / sqrt(2l), while the Pre-Norm-like stream receives the full updateΔ.Compatibility considerations
Current scope and limitations
Experimental Validation
Research Question 1 — Does the implementation preserve OLMo 3 training, checkpoint, and long-context inference semantics?
Hypothesis: SiameseNorm and Depth-Attention can be integrated without breaking the four-stage OLMo 3 pipeline, checkpoint transitions, SWA/Full-Attention behavior, or 65K inference.
Results & Analysis:
The modified 1B model completed and published the following artifacts:
Checkpoint save and resume, stage transitions, long-context attention, SWA/Full-Attention RoPE separation, and native inference were exercised through the complete 1B pipeline.
Findings: The current evidence supports implementation correctness and end-to-end operability at the 1B scale.
Research Question 2 — Does SiameseNorm + Depth-Attention improve model quality?
Hypothesis: At matched model size, data order, token count, optimizer, learning-rate schedule, batch size, random seed, and evaluation protocol, the modified architecture will improve convergence and downstream evaluation without introducing instability.
Results & Analysis:
The matched 1B training curves show faster loss reduction for SiameseNorm + Depth-Attention during the earlier portion of training. This indicates a potential optimization or sample-efficiency benefit.
However, the final objective downstream evaluation is nearly tied. The modified model reaches a macro average of 36.9, compared with 36.8 for the matched OLMo 3 1B baseline, corresponding to an aggregate difference of approximately +0.1 points.
The modified model outperforms the matched OLMo 3 baseline on four tasks:
It underperforms on the remaining four tasks:
The published OLMo 2 1B pure-SFT results are retained only as an external reference. They are not a matched architectural control because the model family and training recipe differ.
Findings: SiameseNorm + Depth-Attention shows faster early-stage convergence and meaningful gains on selected tasks, particularly IFEval. Nevertheless, the final 1B aggregate result is only marginally above the matched baseline. The current evidence supports an early-convergence benefit but does not yet demonstrate a substantial final downstream-quality improvement.
Research Question 3 — Does the result generalize beyond 1B?
Hypothesis: The combined architecture remains stable and beneficial at larger model scales.
Results & Analysis:
No completed larger-scale matched comparison is available yet.
Findings: Generalization beyond 1B remains unresolved. The 3B experiment will complete before determining whether the faster early convergence and task-level changes observed at 1B persist at a larger scale. The suspended 7B plan is not currently contributing experimental evidence.
Archive
Reviewer Assessment (for repo reviewers)
Draft status remains recommended.
The implementation and 1B end-to-end pipeline are available for review. The matched 1B experiment indicates faster early convergence, but the final eight-task macro average is nearly tied with the OLMo 3 baseline.
The modified 3B experiment remains in progress, while the 7B experimental plan is suspended. Larger-scale validation is therefore incomplete, and no general architectural-effectiveness claim is made at this stage.
Merge Checklist:
in-progressArchitecture Proposal issue ([ARCH-PROP] SiameseNorm&Depth-Attention #2).