Skip to content
 
 

Repository files navigation

BIT - Production Ready Transformer

BIT is a production-ready, localized transformer model built from scratch. This refactor introduces a BPE tokenizer, KV-cache optimized inference, disk-streaming for large datasets, and a FastAPI serving layer.

Features

  • Tokenizer: BPE (Byte Pair Encoding) with a vocabulary size of 10,000.
  • Architecture: Transformer with Multi-Head Attention and SwiGLU.
  • Inference: Optimized with KV-caching (10x faster) and Top-k/Top-p sampling.
  • Training: Early stopping, cosine learning rate annealing, and Tensorboard logging.
  • Serving: FastAPI-based REST API for production deployment.

Quick Start

Installation

pip install -r requirements.txt

Training

python train.py master_dataset.txt

Chat

python chat.py --model bit_model.pt

API Server

python -m bit.serve

Documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages