Skip to content

Build a floppy-sized Windows LLM CLI - #1

Merged
eimexdev merged 3 commits into
mainfrom
agent/floppy-windows-cli
Jul 29, 2026
Merged

Build a floppy-sized Windows LLM CLI#1
eimexdev merged 3 commits into
mainfrom
agent/floppy-windows-cli

Conversation

@eimexdev

@eimexdev eimexdev commented Jul 29, 2026

Copy link
Copy Markdown
Owner

What this adds

  • one-file 32-bit Windows story-completion CLI
  • tiny1m (896,256 parameters) quantized to reproducible Q8/group-32
  • exact formatted-floppy size check (1,474,560-byte ceiling)
  • runtime --tokens and --context controls plus configurable compiled defaults
  • GitHub Actions cross-build, Windows execution smoke test, artifact upload, and tagged releases
  • model/source licensing and reproducibility hashes

Verified locally

  • PE32 Intel 80386 console executable
  • 1,148,267 bytes total, leaving 326,293 bytes free
  • deterministic inference sanity test passes
  • Q8 conversion is bit-for-bit reproducible

Windows 95/98 is documented as experimental until tested on actual hardware; modern Windows is the first supported test target.

Summary by CodeRabbit

  • New Features

    • Added a self-contained TinyStories language model CLI for 32-bit Windows.
    • Supports prompt generation, interactive use, configurable token and context limits, sampling controls, and optional performance statistics.
    • Packages the executable, model, and tokenizer within a 1.44 MB floppy-disk limit.
    • Added automated Windows builds, smoke tests, size checks, and tagged release publishing.
  • Documentation

    • Added usage, build, compatibility, model, licensing, and third-party attribution documentation.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f3939bcc-2530-4d5e-81e5-b6dcbb9228de

📥 Commits

Reviewing files that changed from the base of the PR and between 1d53879 and a9249a1.

📒 Files selected for processing (14)
  • .github/PULL_REQUEST_SUMMARY.md
  • .github/workflows/build.yml
  • .gitignore
  • BUILD_RESULT.md
  • LICENSE
  • Makefile
  • README.md
  • THIRD_PARTY_NOTICES.md
  • licenses/llama2.c-MIT.txt
  • model/README.md
  • src/floppy_llm.c
  • tools/check_size.py
  • tools/legacy_to_q8.py
  • tools/pack_overlay.py

📝 Walkthrough

Walkthrough

Adds a self-contained quantized TinyStories CLI in C, embeds model and tokenizer data into native or 32-bit Windows executables, enforces the 1.44 MB size limit, and automates verified Windows builds, smoke tests, checksums, and tagged releases.

Changes

FloppyLLM release

Layer / File(s) Summary
Quantized model format
tools/legacy_to_q8.py, Makefile, model/README.md
Converts the legacy checkpoint into grouped Q8 data, verifies hashes, and documents the model format and reproducibility metadata.
Inference and CLI runtime
src/floppy_llm.c
Implements overlay discovery, quantized Transformer inference, BPE tokenization, sampling, generation, chat, runtime controls, and CLI parsing.
Overlay packaging and size enforcement
tools/pack_overlay.py, tools/check_size.py, Makefile, .gitignore
Packages runner, model, and tokenizer data into one executable, checks the floppy-size budget, and excludes generated artifacts.
Windows CI and release automation
.github/workflows/build.yml, .github/PULL_REQUEST_SUMMARY.md
Builds with a checksum-pinned LLVM MinGW toolchain, uploads checksums and artifacts, publishes tagged releases, and runs Windows smoke tests.
Project documentation and licensing
README.md, BUILD_RESULT.md, LICENSE, THIRD_PARTY_NOTICES.md, licenses/llama2.c-MIT.txt
Documents usage, builds, artifact measurements, compatibility, model provenance, and applicable licenses.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant floppy_llm_exe
  participant OverlayFooter
  participant Transformer
  participant TokenizerSampler
  User->>floppy_llm_exe: Provide prompt and runtime options
  floppy_llm_exe->>OverlayFooter: Locate bundled model and tokenizer offsets
  floppy_llm_exe->>Transformer: Build checkpoint and runtime state
  floppy_llm_exe->>TokenizerSampler: Encode prompt and sample tokens
  TokenizerSampler->>Transformer: Supply tokens for forward inference
  Transformer-->>floppy_llm_exe: Return logits
  floppy_llm_exe-->>User: Stream decoded text
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/floppy-windows-cli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eimexdev
eimexdev marked this pull request as ready for review July 29, 2026 05:54
@eimexdev
eimexdev merged commit d5f9c4f into main Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant