feat: P0-P3 RDT architecture enhancements#61
Open
bdzjie wants to merge 6 commits intokyegomez:mainfrom
Open
Conversation
added 6 commits
April 25, 2026 07:26
P0: Multi-scale recurrent block & curriculum learning - DepthSelector: dynamic loop depth selection (4/8/16) - CurriculumScheduler: 4-stage curriculum (4→8→12→16) P1: FlashMLA & cross-layer KV sharing - SDPA-based attention (FlashAttention-compatible) - Cross-layer KV sharing via shared cache keys P2: Speculative decoding - SpeculativeRDTDecoder class - OpenMythos.speculative_generate() convenience method P3: Hierarchical loop & meta-learning - AdaptiveScaleSelector for multi-scale processing - HierarchicalRecurrentBlock with top-down broadcast - MetaLoopPredictor for complexity-aware loop weighting - MetaLoopRecurrentBlock with adaptive loop importance
…n.py - Add P0 config fields to MythosConfig (loop_depths, complexity thresholds, curriculum params) - Add DepthSelector class: complexity-aware loop depth selection - Add CurriculumLoopScheduler class: 4-phase curriculum learning - File grew from 1970 to 2160 lines, 22 classes total
Merged classes: - LoopConsistencyRegularizer: loop consistency regularization - CapacityAwareRouter: capacity-aware MoE routing - TaskConditionedMoE: task-conditioned mixture of experts - OpenMythosEnhanced: unified wrapper for all enhancements Skipped (already in main.py or redundant): - ComplexityAwareLoopDepth (≈ DepthSelector) - MultiScaleRecurrentBlock (≈ RecurrentBlock) - FlashMLAAttention (use_flash_mla flag) - CrossLayerKVCache (_get_shared_cache_key) - SpeculativeRDTDecoding (≈ SpeculativeRDTDecoder) - MetaLearnedLoopDepth (≈ MetaLoopPredictor)
Added: - docs/: API documentation, RAG enhancement proposal - examples/: Context, search, evolution, memory, tools examples - training/: P0 curriculum, enhanced training, benchmark scripts - benchmarks/: Benchmarking infrastructure - serving/: Model serving scripts - shell/: Shell integration tools - open_mythos/cli/: CLI agent implementation - open_mythos/config/: Configuration system - open_mythos/evolution/: Auto-evolution system - open_mythos/integration/: External integrations - open_mythos/persistence/: JSON/SQLite persistence - open_mythos/rag/: RAG implementation - open_mythos/search/: Hybrid search with reranking - open_mythos/tests/: Test suite - open_mythos/tools/: Tool registry and built-in tools - open_mythos/web/: Web dashboard Removed: - open_mythos/main_p0.py (merged into main.py) Total: 103 files, +35208 lines
- Removed residual section header comment that was left after code cleanup - Verified syntax with py_compile
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
Implemented comprehensive P0-P3 enhancements for OpenMythos RDT architecture:
P0: Multi-Scale Loop + Curriculum Learning
P1: FlashMLA + Cross-Layer KV Sharing
P2: Speculative Decoding
P3: Hierarchical Loop + Meta-Learning
Training Enhancements
Files Changed
Testing
Local testing completed successfully.