# arman-bd/guppylm

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/arman-bd-guppylm).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,045 stars · 381 forks · Python

## Links

- GitHub: https://github.com/arman-bd/guppylm
- awesome-repositories: https://awesome-repositories.com/repository/arman-bd-guppylm.md

## Description

GuppyLM is a small educational project that trains a compact language model from scratch and gives it the voice of a fish. It covers the whole path end to end: generating a synthetic conversation dataset, training a tokenizer, training a decoder-only transformer, and chatting with the result. The aim is to make the full lifecycle of a language model easy to follow.

The training data comes from a template-based generator. It combines randomized components into a fixed set of templates, producing tens of thousands of consistent, character-driven question-and-answer samples across dozens of topics, with no manual writing. The tokenizer is learned directly from that generated text and ships alongside the model as a separate small file.

The trained model can be used in two ways. A local terminal session answers typed prompts interactively or replies to a single prompt and exits. The model's weights are also quantized to a reduced precision, which makes them small enough to run inside a web page using WebAssembly. The page downloads the weights and tokenizer when it loads and runs the model on the user's own device. No server, install, or API key is needed. The browser chat includes clickable preset prompts for trying the model quickly.

Hosted notebooks chain dataset download, tokenizer training, model training on a free GPU, and a chat test into one workflow. They also include chatting with a pre-trained model.

## Tags

### Artificial Intelligence & ML

- [AI Chatbots](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-chatbots.md) — Runs a quantized language model chatbot entirely inside the web page using WebAssembly, needing no server, installation, or API key.
- [Language Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/model-fine-tuning-adaptation/language-model-training.md) — Trains a compact decoder-only transformer language model from scratch, covering synthetic dataset generation, tokenizer training and model training in one end-to-end workflow.
- [Chat Model Interactions](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-model-integrations/chat-model-interactions.md) — Lets users send messages to a small language model in the browser and read replies written in the voice of a fish. ([source](https://arman-bd.github.io/guppylm/))
- [From-Scratch Decoder Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/decoder-architectures/from-scratch-decoder-implementations.md) — Implements a compact decoder-only transformer built from scratch that predicts the next token, kept small so the whole lifecycle is easy to follow.
- [In-Browser Model Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/in-browser-model-inference.md) — Runs a quantized model entirely inside the web browser using WebAssembly, so no server, install, or API key is needed. ([source](https://github.com/arman-bd/guppylm#readme))
- [Template-Based Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/dataset-generation/synthetic-data-generators/template-based-generation.md) — Builds conversation datasets by filling a fixed set of templates with randomly combined components, with no manual writing.
- [Synthetic Dataset Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/dataset-generation/synthetic-dataset-generators.md) — Generates tens of thousands of consistent, character-driven question-and-answer training samples across many topics by combining randomized template components.
- [Weight Quantization](https://awesome-repositories.com/f/artificial-intelligence-ml/quantized-inference-runtimes/weight-quantization.md) — Stores model weights at reduced numeric precision so the download is small enough to fetch and run inside a web page.
- [Synthetic Data Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/synthetic-data-generators.md) — Generates tens of thousands of consistent, character-driven question-and-answer samples across dozens of topics from randomized template components. ([source](https://github.com/arman-bd/guppylm#readme))
- [Tokenizer Training](https://awesome-repositories.com/f/artificial-intelligence-ml/tokenizer-training.md) — Learns a vocabulary directly from the generated conversation text and saves it as a small separate tokenizer file shipped with the model.

### Part of an Awesome List

- [Small Language Models](https://awesome-repositories.com/f/awesome-lists/ai/small-language-models.md) — Provides a small conversational language model that answers in the consistent voice of a fish, trained on synthetic question-and-answer dialogue.

### Education & Learning Resources

- [Training Notebooks](https://awesome-repositories.com/f/education-learning-resources/developer-documentation-references/developer-resources/training-notebooks.md) — Provides hosted notebooks that chain dataset download, tokenizer training, model training on a free GPU, and a chat test in one workflow.

### Programming Languages & Runtimes

- [WebAssembly Inference Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/webassembly-inference-runtimes.md) — Compiles the inference runtime to WebAssembly so the model runs inside the page on the user's own device without a server.
