How therealskyline/naylis works
Naylis is a Llama language-modeling project whose defining change is a shared, trainable memory bank read by a causally routed Mixture-of-Memory layer. The main workflow configures and pretrains a model, then evaluates checkpoints; kernel backends accelerate the memory read, while precision policies provide optional FP8 training. The README documents these capabilities, but several implementation paths are unsampled, so those links are shown only where source-index references or documentation support them.
Main entry points: model.py Llama and MoM model · pretrain.py Pretraining harness · probe.py Kernel preflight · evaluate.py Checkpoint evaluation
Components 20
Model architecture
- Llama and MoM model
model.py - MoM layer
model.py - Shared memory bank
model.py - Causal router
model.py
Training and evaluation
- Experiment configs
configs - Pretraining harness
pretrain.py - Checkpoint evaluation
evaluate.py - Model checkpoint
- Task benchmark results
Memory-read kernels
- Eager math reference
mom_kernels/reference.py - Kernel dispatch
mom_kernels/__init__.py - XLA read backend
mom_kernels/xla_tpu.py - Triton read backend
mom_kernels/triton_gpu.py - Pallas read kernels
mom_kernels/pallas_tpu/mom_pallas.py - Pallas simulator
mom_kernels/pallas_tpu/simulate.py - TPU kernel benchmark
mom_kernels/pallas_tpu/bench_tpu.py - Kernel preflight
mom_kernels/probe.py
Precision policy
- Precision planner
naylis_precision.py - FP8 preflight
probe_fp8.py
Other components
- Researcher
Connections 23
- Researcher → Pretraining harness: starts training
README.md - Experiment configs → Pretraining harness: configures run
pretrain.py - Pretraining harness → Llama and MoM model: builds model
pretrain.py - Pretraining harness → Precision planner: applies policy
pretrain.py - Llama and MoM model → MoM layer: adds per block
README.md - Llama and MoM model → Shared memory bank: owns shared bank
model.py - MoM layer → Causal router: routes tokens
README.md - MoM layer → Kernel dispatch: dispatches read
model.py - MoM layer → Eager math reference: computes eager read
model.py - Kernel dispatch → XLA read backend: dispatches read
mom_kernels/__init__.py - Kernel dispatch → Triton read backend: dispatches read
mom_kernels/__init__.py - Kernel preflight → Llama and MoM model: checks layer
mom_kernels/probe.py - Kernel preflight → Eager math reference: compares against
mom_kernels/probe.py - Kernel preflight → XLA read backend: checks parity
mom_kernels/probe.py - Kernel preflight → Triton read backend: checks parity
mom_kernels/probe.py - TPU kernel benchmark → Pallas read kernels: benchmarks kernels
mom_kernels/pallas_tpu/bench_tpu.py - TPU kernel benchmark → Pallas simulator: simulates kernels
mom_kernels/pallas_tpu/bench_tpu.py - Pretraining harness → Model checkpoint: saves model
- Model checkpoint → Checkpoint evaluation: loads for evaluation
- Checkpoint evaluation → Llama and MoM model: uses model
evaluate.py - Checkpoint evaluation → Task benchmark results: reports scores
README.md - FP8 preflight → Precision planner: checks policy
probe_fp8.py - FP8 preflight → Llama and MoM model: checks model
probe_fp8.py