Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

sobitkarki1/nn-v2

Repository files navigation

[ARCHIVED] Intermediate experiment (~6.8K parameters, PyTorch bigram model). Current project: nn-v4 — 1.5B-parameter GPT transformer.


Simple Text Inference Model

A minimal character-level bigram language model using PyTorch. Part of a learning progression: nn-v1 → nn-v2 → nn-v4.

Version Params Architecture Notes
nn-v1 ~1.4K Embedding + MLP (NumPy) Ultra-lightweight starter
nn-v2 (this) ~6.8K Bigram + transformer block 8-char context window
nn-v4 ~1.45B GPT decoder, 24 layers Mixed precision, Flash Attention 2

Usage

pip install -r requirements.txt
python train.py    # 5000 iterations on Shakespeare
python generate.py # interactive generation

About

Version 2 of a custom neural network framework with improved layers and regularisation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages