Llama2 inference in one TypeScript file
-
Updated
May 29, 2025 - JavaScript
Llama2 inference in one TypeScript file
Codebase for Linguistic Collapse: Neural Collapse in (Large) Language Models [NeurIPS 2024] [arXiv:2405.17767]
🎈 A series of lightweight GPT models featuring TinyGPT Base (~51M params) and TinyGPT2 (~95M params). Fast, creative text generation trained on whimsical stories.
Dataset Generation Code for SimpleStories
Implementation of a small GPT-style transformer from scratch in PyTorch. Learn how Large Language Models work by building, training, generating text, and visualizing attention.
Run Next-Concept Modeling (NCM) on the Apple Silicon GPU with MLX: HazyResearch's released checkpoints with verified parity to PyTorch, plus from-scratch training and benchmarks.
Train and run a small Llama 2 model from scratch on the TinyStories dataset.
Train GPT style model on tinystories dataset
Karpathy's llama2.c ported to the Nintendo Wii, with the option to run the matmuls on its fixed-function GPU.
Code implementation for our paper "BERTtime Stories: Investigating the Role of Synthetic Story Data in Language Pre-training" as part of the 2024 BabyLM Challenge
A ~30M GPT small language model trained from scratch on TinyStories — GPT-2-compatible so the ember inference server runs it.
This project fine-tunes GPT-2, a popular pre-trained transformer model, to generate short stories using the TinyStories dataset. The goal is to teach GPT-2 to produce creative and coherent stories based on prompts.
Small transformer trained from scratch
A 30.72M parameter LLM running dense on an $8 ESP32-S3. Every stored parameter is multiplied on every token. 0.95 tok/s, no cloud, no SD card.
Specialized agentic coding LLM — 3B, pre-trained from scratch, runs locally on Apple Silicon. No API key, no data leaving your machine, zero cost per call.
A complete LLM inference engine from scratch in ~1400 lines of dependency-free C — transformer, BPE tokenizer, sampler, hand-rolled thread pool, int8 quantization. No OpenMP, no BLAS, no API keys.
A 29M-parameter language model written and trained from scratch in PyTorch, running in your browser with ONNX Runtime Web.
A 110M-parameter Llama-style transformer trained from scratch on the TinyStories dataset, optimized for high-throughput training on 4GB VRAM consumer GPUs. The project features a custom asynchronous CUDA-stream prefetcher and KV-cache inference, achieving 10k+ TPS on an RTX 3050.
A port of karpathy/llama2.c to MS-DOS
StoryByte — a ~1M-parameter GPT trained from scratch on TinyStories. The model behind the Let's Data Science 'Build a Tiny LLM — From Tokens to Text' course; its whole forward pass runs in ~40 lines of NumPy in a browser.
To associate your repository with the tinystories topic, visit your repo's landing page and select "manage topics."