Skip to content

donaldfilimon/abi / .agents/skills/nn-demo

nn-demo

Verified

Build the abi CLI and run the miniature character-level neural-net demo — `nn train` (real manual-backprop char-LM) and `nn sample` (train-then-generate). Use to train, sample, or smoke-test the nn demo trainer, or verify nn after touching crates/abi-nn/. This is a demo trainer, NOT a production/LLM/distributed trainer.

nn-demo — drive abi's character-level demo trainer

Driver: .agents/skills/nn-demo/nn.sh (paths relative to repo root). Builds the CLI and drives abi nn train + abi nn sample. Evidence is the RESULT: line. Fully local, no network.

Run (agent path)

.agents/skills/nn-demo/nn.sh                                   # default corpus, seed 't', n=20
.agents/skills/nn-demo/nn.sh "hello world hello there" h 24    # custom corpus / seed / n
  • nn train "<corpus>" — asserts nn train:, final_loss=, steps=.
  • nn sample --text "<corpus>" --seed <char> --n <k> — trains, then generates; asserts nn sample:.

Prints RESULT: PASS (exit 0) or a FAIL count.

Current Rust driver: requires real train-loss/step markers and a generated sample while deliberately avoiding a fixed numerical-quality claim.

Gotchas

  • ⚠️ Demo, not a production trainer. nn is a pure-Rust hand-derived-backprop char-LM for demonstration — it is not an LLM, not distributed, not a real training stack. Loss values vary run-to-run; the driver asserts structural markers (final_loss=, steps=), not a specific loss.
  • nn sample's --seed is the seed character for generation, not an RNG seed. nn sample trains first, so its output has a leading nn train: line.
  • nn train --jsonl <path> [--field <name>] trains from a JSONL corpus; the driver exercises the inline-text path. For source analysis, read crates/abi-nn/src/.

Troubleshooting

SymptomFix
build FAILUse ./tools/cargo.sh build -p abi-cli, then ./tools/check.sh.
missing nn train: / nn sample:Output grammar drift — check the nn handler in crates/abi-cli/src/ and crates/abi-nn/src/.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall