Quickstart — From Zero to a Running Loop

sourcedocs/guides/quickstart.md words703 read~4 min
How to install HyMo, run the test suite and quality gates, and execute model forward passes, training steps, checkpointing, and validation evaluations. For the reading order guide and corpus overview, see docs/README.md.

1. Installation#

Requires Python 3.11+ and uv.

bash
git clone https://github.com/atandra-bharati/hymo.git
cd hymo
uv sync --all-extras

Core dependencies#

  • torch >= 2.5
  • numpy >= 1.26
  • pyyaml >= 6.0
  • tokenizers >= 0.19
  • datasets >= 2.20

Optional dependency groups#

  • train: triton >= 3.0.0 (Linux), wandb >= 0.17
  • dev: pytest >= 8.0, pytest-cov >= 4.1, mypy >= 1.10, ruff >= 0.5, types-PyYAML

2. Basic Workflows#

2.1 First forward pass (~434M active / 1.13B total)#

This example loads the production configuration. On a laptop, use the tiny

configuration in section 2.2 instead of allocating the full model.

2.2 CPU-friendly testing config (~760K params)#

For local development or unit testing on laptop hardware without allocating the full 1.13B parameter graph:

2.3 Executing a training step#

Trainer.train_step always backpropagates the micro-batch loss, but only performs

clipping and an optimizer update at the configured gradient-accumulation boundary.

2.4 Checkpoint saving & restoration#

2.5 Validation loss evaluation#


3. Tests and Quality Gates#

bash
# Default test suite (~1.8s on CPU; heavy 1.13B model tests auto-skipped)
pytest tests/ -v

# Include full 1.13B model construction and heavy memory allocation tests
pytest tests/ --run-heavy

# Validate doc-code symbol anchors and intra-repo markdown links
python3 tests/test_doc_refs.py --links

# Run static type checking gate
mypy src/hymo

# Run linting gate
ruff check src/hymo tests/

4. Configuration System#

All hyperparameters live in YAML configuration files under configs/. The production configuration is configs/hymo_750m.yaml, structured into 5 frozen dataclass sub-configs (ModelConfig, OptimizerConfig, SchedulerConfig, TrainingConfig, RunConfig). See references/config.md for the full field reference and training.md for training pipeline mechanics.


5. Documentation References#