Add Conformer audio encoder as default architecture - #15
Merged
Conversation
Replace pure transformer encoder with Conformer blocks (Gulati et al., 2020) that combine self-attention with depthwise convolutions to capture both global and local temporal patterns in audio. Adds ConformerFeedForward, ConformerConvModule, and ConformerBlock classes behind a use_conformer config flag (default True). Medium conformer config: 9.4M params, fits 8GB VRAM at batch_size=4. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous LR (1e-4) caused val loss instability with the 6.5M+ param models — train loss dropped but val loss exploded after epoch 4. Lower LR and longer warmup should stabilize training. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: Conformer architecture details, 3 training result sections (small baseline, medium transformer divergence, medium conformer progress), updated config descriptions and test counts - README.md: Conformer encoder in architecture, updated project status - RESEARCH.md: New Conformer section with full architecture, param counts, training comparison, and key findings (LR scaling, stability) - CODEBASE_REFERENCE.md: Updated transformer.py description, added medium_conformer.json, updated test counts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
ConformerFeedForward,ConformerConvModule,ConformerBlockintransformer.pyAudioEncoderbranches onuse_conformerconfig flag (defaultTrue), transparent to decoderconfigs/medium_conformer.json(9.4M params, fits 8GB VRAM at batch_size=8)TestConformerclass (178 total tests passing)Training results (medium conformer, 7 epochs so far)
Stable training with no divergence. On track to surpass the small model baseline (60.6% at epoch 16).
Test plan
python -m pytest tests/ -v)🤖 Generated with Claude Code