Back to directory

Tiny-MoE

A Mixture-of-Experts language model implemented from scratch in native PyTorch and trained on two free Kaggle T4 GPUs, meant to teach modern LLM internals.

Tiny-MoE

Tiny-MoE is a from-scratch, bottom-up implementation of a Mixture-of-Experts decoder-only transformer, built to demystify the internals of modern MoE models rather than rely on high-level frameworks or black-box library calls. Every module, from the router to the expert layers, is implemented directly in PyTorch.

The model has roughly 150 to 200 million total parameters with about 70 to 90 million active per token, a base context of 512 tokens extended to 2048 via YaRN, and was trained on two NVIDIA T4 GPUs on Kaggle. It implements multi-head latent attention, rotary positional embeddings, YaRN long-context extension, a shared expert architecture, and weight absorption for optimized inference.

It is set up to clone and run with pip, with separate scripts for training and generation.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.