A Mojo-based platform for reproducing classic AI/ML research papers with production-quality implementations. ML Odyssey provides a shared library of SIMD-optimized tensor operations, an autograd engine, and a full training infrastructure — all implemented in Mojo for maximum performance and type safety.
ML Odyssey is a standalone Mojo-based ML framework for reproducing classic AI/ML research papers with production-quality implementations. It has two goals:
The project currently has ~198K lines of Mojo code, 7 fully-implemented neural network architectures, and 371+ tests across layerwise unit tests and end-to-end integration tests.
Note on project identity: The GitHub repo description says "Training framework written in Mojo." This repo is sometimes described elsewhere as an "experimental agent research sandbox" -- that description is incorrect. ML Odyssey is an ML training framework, not an agent platform. It has no integration with ai-maestro, NATS, or any distributed agent mesh. The "agent system" referenced in this repo refers to Claude Code automation for development workflow (code generation, PR creation, CI management), not a runtime agent mesh.
Odyssey is one of several repositories in the HomericIntelligence organization. Here is how the repos relate:
| Repository | Role |
|---|---|
| Odyssey (this repo) | ML training framework in Mojo -- neural nets, autograd, shared lib |
| Odysseus | Ecosystem meta-repo and architecture docs |
| AchaeanFleet | Container images for the agent mesh -- Dockerfiles, Compose, CI |
| Myrmidons | GitOps agent provisioning -- agent definitions as code |
| ProjectHephaestus | Shared utilities and tools used across the ecosystem |
| ProjectMnemosyne | Skills marketplace -- collective memory of team learnings |
| ProjectScylla | Testing and optimization framework for agentic workflows |
| ProjectKeystone | Foundation project |
| ProjectArgus | Ecosystem project |
| ProjectHermes | Ecosystem project |
| ProjectProteus | Ecosystem project |
| ProjectTelemachy | Ecosystem project |
To avoid confusion with other ecosystem repos:
.claude/agents/), which manage
code generation and CI -- they do not run as distributed services.| Architecture | Paper | Status |
|---|---|---|
| LeNet-5 | LeCun et al., 1998 | Implemented |
| AlexNet | Krizhevsky et al., 2012 | Implemented |
| VGG-16 | Simonyan & Zisserman, 2014 | Implemented |
| ResNet-18 | He et al., 2015 | Implemented |
| MobileNetV1 | Howard et al., 2017 | Implemented |
| GoogLeNet | Szegedy et al., 2014 | Implemented |
Each architecture has layerwise unit tests (runs on every PR) and end-to-end integration tests (runs weekly with real datasets).
The src/odyssey/ directory contains the ML components used by all paper implementations:
src/odyssey/core/ - Tensor Operations and LayersAnyTensor) with compile-time dtype dispatchsrc/odyssey/autograd/ - Automatic DifferentiationVariable type with gradient trackingsrc/odyssey/training/ - Training InfrastructureTrainer with configurable training loops# Clone the repository
git clone https://github.com/HomericIntelligence/Odyssey.git
cd odyssey
# Install all dependencies (Mojo, Python tools, etc.)
uv sync --locked
# Run all Mojo tests
just test-mojo
# Run layerwise tests for a specific model
uv run mojo test tests/models/test_lenet5_layers.mojo
# Run all tests for a model
uv run mojo test tests/models/test_lenet5_layers.mojo tests/models/test_lenet5_e2e.mojo
# Build project in debug mode
just build
# Build as distributable package
just package
# Show all available commands
just --list
# Format all code
just format
# Run pre-commit hooks on all files
just pre-commit-all
# Full validation (build + test)
just validate
Odyssey/
├── src/odyssey/ # Reusable ML library
│ ├── core/ # Tensor ops, layers, SIMD kernels
│ ├── autograd/ # Tape-based reverse-mode autograd
│ ├── training/ # Trainers, optimizers, schedulers
│ ├── data/ # Dataset loaders
│ └── testing/ # Shared test utilities
├── tests/
│ ├── models/ # Per-architecture test suites
│ └── src/odyssey/ # Shared library tests
├── docs/
│ ├── adr/ # Architecture Decision Records
│ ├── getting-started/ # Setup and quickstart guides
│ └── dev/ # Developer documentation
├── benchmarks/ # Performance benchmarks
├── scripts/ # Python automation scripts
└── justfile # Build system recipes
Tests are organized in two tiers:
Tier 1 (Layerwise Unit Tests): Run on every PR. Fast, deterministic tests using FP-representable values. Each layer's forward and backward pass is validated independently, including gradient checking against numerical finite differences.
Tier 2 (End-to-End Tests): Run weekly. Full model training on EMNIST and CIFAR-10, validating convergence over 5 epochs.
See ADR-004 for the complete testing strategy rationale.
Each optimizer and recurrent/normalization layer ships a self-contained unit test (shape validation + numerical parity against an independent reference + the primitive's defining property). Run any one of them with a single command:
bash scripts/run_primitive_test.sh <name> # run one primitive's test
bash scripts/run_primitive_test.sh all # run every primitive test
bash scripts/run_primitive_test.sh --list # list known primitives + paths
| Primitive | Kind | Command |
|---|---|---|
| RNN (Elman) | layer | bash scripts/run_primitive_test.sh rnn |
| LTC (Liquid Time-constant) | layer | bash scripts/run_primitive_test.sh ltc |
| LSTM | layer | bash scripts/run_primitive_test.sh lstm |
| GRU | layer | bash scripts/run_primitive_test.sh gru |
| Diagonal SSM (S4-style state-space block) | layer | bash scripts/run_primitive_test.sh ssm |
| LayerNorm | layer | bash scripts/run_primitive_test.sh layernorm |
| Transformer FeedForward (FFN) | layer | bash scripts/run_primitive_test.sh ffn |
| Multi-Head Attention (scaled dot-product self-attention) | layer | bash scripts/run_primitive_test.sh attention |
| Sparse Attention (strided factorized self-attention; Child et al. 2019) | layer | bash scripts/run_primitive_test.sh sparse_attention |
| Linear attention (kernel-feature, arXiv:2006.16236) | layer | bash scripts/run_primitive_test.sh linear_attention |
| Transformer encoder block (pre-LN attention + FFN) | layer | bash scripts/run_primitive_test.sh transformer |
| Mamba (selective SSM / S6) | layer | bash scripts/run_primitive_test.sh mamba |
| MLP-Mixer block (1-layer) | layer | bash scripts/run_primitive_test.sh mlp_mixer |
| KAN (Kolmogorov-Arnold, 1-layer) | layer | bash scripts/run_primitive_test.sh kan |
| DeepSets (permutation-equivariant linear block) | layer | bash scripts/run_primitive_test.sh deepsets |
| ADOPT | optimizer | bash scripts/run_primitive_test.sh adopt |
| Sophia (clipped update step; caller-supplied Hessian estimates) | optimizer | bash scripts/run_primitive_test.sh sophia |
| Adan | optimizer | bash scripts/run_primitive_test.sh adan |
| Muon-Hyperball | optimizer | bash scripts/run_primitive_test.sh muon_hyperball |
| LionMuon | optimizer | bash scripts/run_primitive_test.sh lionmuon |
| MGUP-Muon | optimizer | bash scripts/run_primitive_test.sh mgup_muon |
| SOAP | optimizer | bash scripts/run_primitive_test.sh soap |
| KL-Shampoo (Adam-free stable Shampoo) | optimizer | bash scripts/run_primitive_test.sh kl_shampoo |
| FTRL-Proximal | optimizer | bash scripts/run_primitive_test.sh ftrl |
| Schedule-Free (online iterate averaging — anytime) | optimizer | bash scripts/run_primitive_test.sh schedule_free |
| ScheduleFree+ (large-batch-stable schedule-free) | optimizer | bash scripts/run_primitive_test.sh schedule_free_plus |
| SF-NorMuon (schedule-free spectral) | optimizer | bash scripts/run_primitive_test.sh sf_normuon |
| SPlus | optimizer | bash scripts/run_primitive_test.sh splus |
| Prodigy (parameter-free step-size estimation) | optimizer | bash scripts/run_primitive_test.sh prodigy |
A primitive whose test file is not on the current branch is reported as
SKIP (not a failure), so the runner works incrementally as each primitive
lands. The invocation mirrors CI's include paths (mojo -I src -I . <test>;
run --list for the authoritative primitive set, which the table documents).
Full code coverage metrics are blocked by Mojo coverage tooling availability.
test_*.mojo files verified in CI via test discovery validation
(scripts/validate_test_coverage.py)src/odyssey/**/*.mojo is checked for
a corresponding test_*.mojo file (scripts/check_source_coverage.py,
warn-only as of initial rollout). Run locally:
python scripts/check_source_coverage.pyfind tests -name 'test_*.mojo' | wc -l and
find src/odyssey -name '*.mojo' ! -name '__init__.mojo' | wc -lscripts/check_adr_review_dates.py in scheduled CI (see
.github/workflows/mojo-version-check.yml)Note on Mojo coverage: Mojo 1.0 still has no coverage instrumentation (
mojo test --coveragedoes not exist). The targets incoverage.tomlare aspirational, not gated in CI. This is a known gap; enforcement will be added once Mojo coverage tooling matures.Note on gradient coverage: The gradient-coverage metric reported in CI is a proxy — it counts test files against backward-pass functions. It is not line-of-code coverage and cannot detect which branches within a backward pass are actually exercised.
mojo test --coverage tests/
mojo coverage report --format=lcov > coverage.lcov
See ADR-008 for complete explanation.
Performance benchmarks live in benchmarks/. They are run as informational snapshots and are
not a CI pass/fail gate — a slower result does not block a PR from merging. Use benchmark
output to guide optimization work, not as a correctness signal.
BSD 3-Clause License. See LICENSE for details.
Mojo
74.5%
Python
22.2%
Shell
1.8%
A Mojo-based platform for reproducing classic AI/ML research papers with production-quality implementations. ML Odyssey provides a shared library of SIMD-optimized tensor operations, an autograd engine, and a full training infrastructure — all implemented in Mojo for maximum performance and type safety.
ML Odyssey is a standalone Mojo-based ML framework for reproducing classic AI/ML research papers with production-quality implementations. It has two goals:
The project currently has ~198K lines of Mojo code, 7 fully-implemented neural network architectures, and 371+ tests across layerwise unit tests and end-to-end integration tests.
Note on project identity: The GitHub repo description says "Training framework written in Mojo." This repo is sometimes described elsewhere as an "experimental agent research sandbox" -- that description is incorrect. ML Odyssey is an ML training framework, not an agent platform. It has no integration with ai-maestro, NATS, or any distributed agent mesh. The "agent system" referenced in this repo refers to Claude Code automation for development workflow (code generation, PR creation, CI management), not a runtime agent mesh.
Odyssey is one of several repositories in the HomericIntelligence organization. Here is how the repos relate:
| Repository | Role |
|---|---|
| Odyssey (this repo) | ML training framework in Mojo -- neural nets, autograd, shared lib |
| Odysseus | Ecosystem meta-repo and architecture docs |
| AchaeanFleet | Container images for the agent mesh -- Dockerfiles, Compose, CI |
| Myrmidons | GitOps agent provisioning -- agent definitions as code |
| ProjectHephaestus | Shared utilities and tools used across the ecosystem |
| ProjectMnemosyne | Skills marketplace -- collective memory of team learnings |
| ProjectScylla | Testing and optimization framework for agentic workflows |
| ProjectKeystone | Foundation project |
| ProjectArgus | Ecosystem project |
| ProjectHermes | Ecosystem project |
| ProjectProteus | Ecosystem project |
| ProjectTelemachy | Ecosystem project |
To avoid confusion with other ecosystem repos:
.claude/agents/), which manage
code generation and CI -- they do not run as distributed services.| Architecture | Paper | Status |
|---|---|---|
| LeNet-5 | LeCun et al., 1998 | Implemented |
| AlexNet | Krizhevsky et al., 2012 | Implemented |
| VGG-16 | Simonyan & Zisserman, 2014 | Implemented |
| ResNet-18 | He et al., 2015 | Implemented |
| MobileNetV1 | Howard et al., 2017 | Implemented |
| GoogLeNet | Szegedy et al., 2014 | Implemented |
Each architecture has layerwise unit tests (runs on every PR) and end-to-end integration tests (runs weekly with real datasets).
The src/odyssey/ directory contains the ML components used by all paper implementations:
src/odyssey/core/ - Tensor Operations and LayersAnyTensor) with compile-time dtype dispatchsrc/odyssey/autograd/ - Automatic DifferentiationVariable type with gradient trackingsrc/odyssey/training/ - Training InfrastructureTrainer with configurable training loops# Clone the repository
git clone https://github.com/HomericIntelligence/Odyssey.git
cd odyssey
# Install all dependencies (Mojo, Python tools, etc.)
uv sync --locked
# Run all Mojo tests
just test-mojo
# Run layerwise tests for a specific model
uv run mojo test tests/models/test_lenet5_layers.mojo
# Run all tests for a model
uv run mojo test tests/models/test_lenet5_layers.mojo tests/models/test_lenet5_e2e.mojo
# Build project in debug mode
just build
# Build as distributable package
just package
# Show all available commands
just --list
# Format all code
just format
# Run pre-commit hooks on all files
just pre-commit-all
# Full validation (build + test)
just validate
Odyssey/
├── src/odyssey/ # Reusable ML library
│ ├── core/ # Tensor ops, layers, SIMD kernels
│ ├── autograd/ # Tape-based reverse-mode autograd
│ ├── training/ # Trainers, optimizers, schedulers
│ ├── data/ # Dataset loaders
│ └── testing/ # Shared test utilities
├── tests/
│ ├── models/ # Per-architecture test suites
│ └── src/odyssey/ # Shared library tests
├── docs/
│ ├── adr/ # Architecture Decision Records
│ ├── getting-started/ # Setup and quickstart guides
│ └── dev/ # Developer documentation
├── benchmarks/ # Performance benchmarks
├── scripts/ # Python automation scripts
└── justfile # Build system recipes
Tests are organized in two tiers:
Tier 1 (Layerwise Unit Tests): Run on every PR. Fast, deterministic tests using FP-representable values. Each layer's forward and backward pass is validated independently, including gradient checking against numerical finite differences.
Tier 2 (End-to-End Tests): Run weekly. Full model training on EMNIST and CIFAR-10, validating convergence over 5 epochs.
See ADR-004 for the complete testing strategy rationale.
Each optimizer and recurrent/normalization layer ships a self-contained unit test (shape validation + numerical parity against an independent reference + the primitive's defining property). Run any one of them with a single command:
bash scripts/run_primitive_test.sh <name> # run one primitive's test
bash scripts/run_primitive_test.sh all # run every primitive test
bash scripts/run_primitive_test.sh --list # list known primitives + paths
| Primitive | Kind | Command |
|---|---|---|
| RNN (Elman) | layer | bash scripts/run_primitive_test.sh rnn |
| LTC (Liquid Time-constant) | layer | bash scripts/run_primitive_test.sh ltc |
| LSTM | layer | bash scripts/run_primitive_test.sh lstm |
| GRU | layer | bash scripts/run_primitive_test.sh gru |
| Diagonal SSM (S4-style state-space block) | layer | bash scripts/run_primitive_test.sh ssm |
| LayerNorm | layer | bash scripts/run_primitive_test.sh layernorm |
| Transformer FeedForward (FFN) | layer | bash scripts/run_primitive_test.sh ffn |
| Multi-Head Attention (scaled dot-product self-attention) | layer | bash scripts/run_primitive_test.sh attention |
| Sparse Attention (strided factorized self-attention; Child et al. 2019) | layer | bash scripts/run_primitive_test.sh sparse_attention |
| Linear attention (kernel-feature, arXiv:2006.16236) | layer | bash scripts/run_primitive_test.sh linear_attention |
| Transformer encoder block (pre-LN attention + FFN) | layer | bash scripts/run_primitive_test.sh transformer |
| Mamba (selective SSM / S6) | layer | bash scripts/run_primitive_test.sh mamba |
| MLP-Mixer block (1-layer) | layer | bash scripts/run_primitive_test.sh mlp_mixer |
| KAN (Kolmogorov-Arnold, 1-layer) | layer | bash scripts/run_primitive_test.sh kan |
| DeepSets (permutation-equivariant linear block) | layer | bash scripts/run_primitive_test.sh deepsets |
| ADOPT | optimizer | bash scripts/run_primitive_test.sh adopt |
| Sophia (clipped update step; caller-supplied Hessian estimates) | optimizer | bash scripts/run_primitive_test.sh sophia |
| Adan | optimizer | bash scripts/run_primitive_test.sh adan |
| Muon-Hyperball | optimizer | bash scripts/run_primitive_test.sh muon_hyperball |
| LionMuon | optimizer | bash scripts/run_primitive_test.sh lionmuon |
| MGUP-Muon | optimizer | bash scripts/run_primitive_test.sh mgup_muon |
| SOAP | optimizer | bash scripts/run_primitive_test.sh soap |
| KL-Shampoo (Adam-free stable Shampoo) | optimizer | bash scripts/run_primitive_test.sh kl_shampoo |
| FTRL-Proximal | optimizer | bash scripts/run_primitive_test.sh ftrl |
| Schedule-Free (online iterate averaging — anytime) | optimizer | bash scripts/run_primitive_test.sh schedule_free |
| ScheduleFree+ (large-batch-stable schedule-free) | optimizer | bash scripts/run_primitive_test.sh schedule_free_plus |
| SF-NorMuon (schedule-free spectral) | optimizer | bash scripts/run_primitive_test.sh sf_normuon |
| SPlus | optimizer | bash scripts/run_primitive_test.sh splus |
| Prodigy (parameter-free step-size estimation) | optimizer | bash scripts/run_primitive_test.sh prodigy |
A primitive whose test file is not on the current branch is reported as
SKIP (not a failure), so the runner works incrementally as each primitive
lands. The invocation mirrors CI's include paths (mojo -I src -I . <test>;
run --list for the authoritative primitive set, which the table documents).
Full code coverage metrics are blocked by Mojo coverage tooling availability.
test_*.mojo files verified in CI via test discovery validation
(scripts/validate_test_coverage.py)src/odyssey/**/*.mojo is checked for
a corresponding test_*.mojo file (scripts/check_source_coverage.py,
warn-only as of initial rollout). Run locally:
python scripts/check_source_coverage.pyfind tests -name 'test_*.mojo' | wc -l and
find src/odyssey -name '*.mojo' ! -name '__init__.mojo' | wc -lscripts/check_adr_review_dates.py in scheduled CI (see
.github/workflows/mojo-version-check.yml)Note on Mojo coverage: Mojo 1.0 still has no coverage instrumentation (
mojo test --coveragedoes not exist). The targets incoverage.tomlare aspirational, not gated in CI. This is a known gap; enforcement will be added once Mojo coverage tooling matures.Note on gradient coverage: The gradient-coverage metric reported in CI is a proxy — it counts test files against backward-pass functions. It is not line-of-code coverage and cannot detect which branches within a backward pass are actually exercised.
mojo test --coverage tests/
mojo coverage report --format=lcov > coverage.lcov
See ADR-008 for complete explanation.
Performance benchmarks live in benchmarks/. They are run as informational snapshots and are
not a CI pass/fail gate — a slower result does not block a PR from merging. Use benchmark
output to guide optimization work, not as a correctness signal.
BSD 3-Clause License. See LICENSE for details.
Mojo
74.5%
Python
22.2%
Shell
1.8%