Readable machine learning, now on RubyGems. The first published version of toy — a transformer LM framework in Ruby, Spinel-compiled to native binaries, where the whole forward pass fits on one screen and still runs real HuggingFace models (SmolLM2, Llama 3, Qwen 2.5/3, Mistral, Gemma 2, OLMoE) on CPU, CUDA, and Metal.
Highlights of the release arc (#58):
- The experimenter API — named options, validating batches, run logs: one compile, many runs
- Dual-use, for real — a playable CLI and
require "toy/compute"as a clean library, with self-contained native vendoring for consumers - Compile-time device selection — one source, per-device binaries, multi-arch
build.sh - MRI dev-runs + a bit-exact CRuby oracle —
require "toy/mri"runs the same code under plain Ruby, byte-identical to the compiled binaries on Linux/aarch64 and Apple Silicon - Every README claim is gate-tested — 17-model coverage matrix with provenance, cold-start consumer gates on Linux and macOS, byte-exact reproducibility gates throughout
Full details in CHANGELOG.md. Recommended Spinel revision: see docs/consuming-toy.md.
With thanks to Ninoslav Milenović for the gem name. 🙏