A ~9M parameter LLM that talks like a small fish.
Python
Rename web/ to docs/ for GitHub Pages, add browser demo badge to all READMEs
Arman Hossain255022f8805a
diff --git a/.gitignore b/.gitignoreindex 832c3b1..0e435ab 100644--- a/.gitignore+++ b/.gitignore@@ -7,8 +7,8 @@ checkpoints/*.onnx# ── Allow web/ assets for GitHub Pages ──────────────────────-!web/*.onnx-!web/*.json+!docs/*.onnx+!docs/*.json# ── Python ──────────────────────────────────────────────────venv/diff --git a/README.md b/README.mdindex 78a2c4f..1f0ee98 100644--- a/README.md+++ b/README.md@@ -15,6 +15,8 @@<br/><a href="https://www.linkedin.com/pulse/build-your-own-language-model-5-minutes-i-made-mine-hossain--supif/"><img src="https://img.shields.io/badge/Article-LinkedIn-0A66C2?logo=linkedin" alt="LinkedIn Article"/></a> <a href="https://arman-bd.medium.com/build-your-own-llm-in-5-minutes-i-made-mine-talk-like-a-fish-e20c338a3d14"><img src="https://img.shields.io/badge/Article-Medium-000000?logo=medium" alt="Medium Article"/></a>+ <br/><br/>+ <a href="https://arman-bd.github.io/guppylm/"><img src="https://img.shields.io/badge/Try_in-Browser-64ffda?style=for-the-badge&logo=webassembly&logoColor=white" alt="Browser Demo"/></a></p>---@@ -93,7 +95,13 @@ Guppy:## Quick Start-### Chat with Guppy (no training needed)+### Try in Browser (no install needed)++[](https://arman-bd.github.io/guppylm/)++Runs entirely in your browser via WebAssembly. Downloads a quantized ONNX model (~10 MB) and runs inference locally — no server, no API keys.++### Chat with Guppy in Colab[](https://colab.research.google.com/github/arman-bd/guppylm/blob/main/use_guppylm.ipynb)@@ -166,9 +174,17 @@ guppylm/└── inference.py Chat interfacetools/-├── make_colab.py Generates guppy_colab.ipynb+├── make_colab.py Generates Colab notebooks+├── export_onnx.py Export model to ONNX (quantized uint8)├── export_dataset.py Push dataset to HuggingFace└── dataset_card.md HuggingFace dataset README++docs/+├── index.html Browser demo (ONNX + WASM)+├── download.sh Download model.onnx + tokenizer from HF+├── model.onnx Quantized uint8 (~10 MB)+├── tokenizer.json BPE tokenizer+└── guppy.png Logo (transparent)```---diff --git a/web/download.sh b/docs/download.shsimilarity index 100%rename from web/download.shrename to docs/download.shdiff --git a/web/guppy.png b/docs/guppy.pngsimilarity index 100%rename from web/guppy.pngrename to docs/guppy.pngdiff --git a/web/index.html b/docs/index.htmlsimilarity index 100%rename from web/index.htmlrename to docs/index.htmldiff --git a/web/model.onnx b/docs/model.onnxsimilarity index 100%rename from web/model.onnxrename to docs/model.onnxdiff --git a/web/tokenizer.json b/docs/tokenizer.jsonsimilarity index 100%rename from web/tokenizer.jsonrename to docs/tokenizer.jsondiff --git a/tools/dataset_card.md b/tools/dataset_card.mdindex afd27c2..5dc7bcf 100644--- a/tools/dataset_card.md+++ b/tools/dataset_card.md@@ -25,6 +25,8 @@ pretty_name: GuppyLM Chat<br/><a href="https://www.linkedin.com/pulse/build-your-own-language-model-5-minutes-i-made-mine-hossain--supif/"><img src="https://img.shields.io/badge/Article-LinkedIn-0A66C2?logo=linkedin" alt="LinkedIn Article"/></a> <a href="https://arman-bd.medium.com/build-your-own-llm-in-5-minutes-i-made-mine-talk-like-a-fish-e20c338a3d14"><img src="https://img.shields.io/badge/Article-Medium-000000?logo=medium" alt="Medium Article"/></a>+ <br/><br/>+ <a href="https://arman-bd.github.io/guppylm/"><img src="https://img.shields.io/badge/Try_in-Browser-64ffda?style=for-the-badge&logo=webassembly&logoColor=white" alt="Browser Demo"/></a></p># GuppyLM Chat Datasetdiff --git a/tools/export_onnx.py b/tools/export_onnx.pyindex a7dce7f..2a326ae 100644--- a/tools/export_onnx.py+++ b/tools/export_onnx.py@@ -1,7 +1,7 @@"""Export GuppyLM to ONNX format for browser inference via onnxruntime-web.-Exports to web/model.onnx (quantized uint8 by default) + web/tokenizer.json+Exports to docs/model.onnx (quantized uint8 by default) + web/tokenizer.jsonso the browser demo (web/index.html) can load them — works on GitHub Pages.Quantization shrinks the model from ~35 MB (float32) to ~9 MB (uint8) with@@ -145,7 +145,7 @@ def main():parser = argparse.ArgumentParser(description="Export GuppyLM to ONNX")parser.add_argument("--checkpoint", default="checkpoints/best_model.pt")parser.add_argument("--tokenizer", default="data/tokenizer.json")- parser.add_argument("--output", default="web/model.onnx")+ parser.add_argument("--output", default="docs/model.onnx")parser.add_argument("--no-quantize", action="store_true", help="Skip uint8 quantization")parser.add_argument("--push", action="store_true", help="Upload to HuggingFace repo")args = parser.parse_args()diff --git a/tools/model_card.md b/tools/model_card.mdindex 5befc0b..13d8fa4 100644--- a/tools/model_card.md+++ b/tools/model_card.md@@ -22,6 +22,8 @@ pipeline_tag: text-generation<br/><a href="https://www.linkedin.com/pulse/build-your-own-language-model-5-minutes-i-made-mine-hossain--supif/"><img src="https://img.shields.io/badge/Article-LinkedIn-0A66C2?logo=linkedin" alt="LinkedIn Article"/></a> <a href="https://arman-bd.medium.com/build-your-own-llm-in-5-minutes-i-made-mine-talk-like-a-fish-e20c338a3d14"><img src="https://img.shields.io/badge/Article-Medium-000000?logo=medium" alt="Medium Article"/></a>+ <br/><br/>+ <a href="https://arman-bd.github.io/guppylm/"><img src="https://img.shields.io/badge/Try_in-Browser-64ffda?style=for-the-badge&logo=webassembly&logoColor=white" alt="Browser Demo"/></a></p># GuppyLM — 9M Parameter Fish Chat Model