Skip to content

bsagevedant/sagenanochat

Repository files navigation

sagenanochat

A lightweight language model training and inference framework.

Features

  • Language model training with multiple optimizers (AdamW, Muon, Lion, Sophia)
  • Custom tokenizer with Rust-based BPE implementation
  • Inference engine with KV caching
  • Chat interface (CLI and web)
  • Evaluation tasks (ARC, GSM8K, HumanEval, MMLU, SmolTalk)

Quick Start

# Install dependencies
pip install -r requirements_microlm.txt

# Train a model
python scripts/base_train.py

# Run chat interface
python scripts/chat_cli.py

Project Structure

  • microlm/ - Core language model implementation
  • nanochat/ - Training and inference utilities
  • scripts/ - Training and evaluation scripts
  • tasks/ - Benchmark evaluation tasks
  • rustbpe/ - Rust-based tokenizer

About

A lightweight language model training and inference framework.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages