Downloads · 30 days
0
maddiedreese/tinystories-imac-g3
tinystories-imac-g3 is a text generation model from maddiedreese. Use it when you need the model to write or continue text. It is set up for other. The card lists the license as mit.
This repository packages source and conversion tools for running a tiny TinyStories language model locally on a stock 1998 iMac G3 with 32 MB of RAM, Mac OS 8.5, and a 233 MHz PowerPC 750 processor.
Downloads · 30 days
0
Access
Public
Updated Jun 22, 2026
Repo size
10.2 KB
Likes
0
Public
Click a slice to open those files.
.c16.3 KB · 45%
From the Hugging Face model README
This repository packages source and conversion tools for running a tiny TinyStories language model locally on a stock 1998 iMac G3 with 32 MB of RAM, Mac OS 8.5, and a 233 MHz PowerPC 750 processor.
The original project ports a small llama2.c-style TinyStories model to Classic
Mac OS. A prompt is written to prompt.txt; the app tokenizes it, runs local
transformer inference, and writes the generated continuation to output.txt.
This prepared Hugging Face package does not include generated big-endian model
files or a prebuilt Classic Mac app binary. It includes the runtime source,
Retro68 build files, and conversion script needed to produce the Mac-ready
artifacts from karpathy/tinyllamas.
source/imac_llm.c: Classic Mac OS inference runtime.source/imac_llm.r: Mac resource file.source/CMakeLists.txt: Retro68 build configuration.source/imac-llm-repo.tar.gz: archived source snapshot from the GitHub repo.scripts/endian_swap.py: converts Little Endian model/tokenizer files for PowerPC.The runtime targets karpathy/tinyllamas TinyStories 260K:
dim=64hidden_dim=172n_layers=5n_heads=8n_kv_heads=4vocab_size=512The Classic Mac port fixes the grouped-query attention weight layout for this model shape and byte-swaps the model/tokenizer for the PowerPC 750's big-endian architecture.
Download the upstream model artifacts:
curl -L -o stories260K.bin https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
curl -L -o tok512.bin https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin
python3 scripts/endian_swap.py
Then build the Classic Mac OS app with Retro68:
mkdir build
cd build
cmake ../source -DCMAKE_TOOLCHAIN_FILE=/path/to/Retro68-build/toolchain/powerpc-apple-macos/cmake/retroppc.toolchain.cmake
make
Expected generated outputs from the original project include a MacBinary app, disk image, and Classic Mac application bundle depending on the Retro68 build configuration.
llama2.c: https://github.com/karpathy/llama2.c