GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — spikeforge/documentation/sequence-primitives.md at main · Capsize-Games/spikeforge

Expand file tree

/

sequence-primitives.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
48 lines (40 loc) · 2.48 KB
/

sequence-primitives.md

Copy path

File metadata and controls

48 lines (40 loc) · 2.48 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Sequence primitives and per-stage neurons (WS-C)

Per-stage heterogeneous neurons

Every neuron stage can now choose its own kind, params, and surrogate. The presets accept additive neurons (per-stage kind) and stage_params (per-stage beta/threshold/reset/surrogate) maps, and TrainConfig gains additive stage_neurons/stage_params. A default build is byte-identical to before, and fc_legacy keeps its _fc1/_lif1/_fc2/_lif2 contract.

New stage kinds

topology/kinds.py grows conv1d, maxpool1d, maxpool2d, embedding, layer_norm, batch_norm, dropout, positional_encoding, attention, and multihead_attention, each with a module factory and an explicit NIR contract — mapped, passthrough (dropout is identity at inference), or unexportable.

Of the new kinds, conv1d is mapped and embedding and batch_norm decompose into the Affine primitive (a one-hot ingest plus the lookup table for embedding; an eval-mode statistics fold for 2D batch_norm). The rest except dropout are simulation-only: maxpool1d, maxpool2d, layer_norm, positional_encoding, attention, and multihead_attention each raise UnsupportedStageError at export, as does the alpha neuron. The per-kind verdicts live in the NIR-unmappable stage decisions.

sequence_mlp and sequence_attn

  • sequence_mlp is built only from NIR-mappable kinds over a [T, B, L, D] sequence and validates end to end. Its neurons default to reset="zero", rendering a single nir.LIF with no Delay, so it is runnable by the Norse target too.
  • sequence_attn is the spiking-transformer-shaped demo (embedding → positional_encoding → multihead_attention → layer_norm → linear → neuron). The embedding stage decomposes into a one-hot ingest plus Affine, but the installed nir has no positional-encoding, attention, or normalisation primitive, so export raises the typed UnsupportedStageError naming the first remaining unexportable stage. It stays available for simulation and introspection — the honest alpha precedent, applied to stages.

The toy token task (data/sequence_source.py) supplies [T, B, L, D] frames, and the client StageNeuronEditor edits the per-stage configuration. This enables sequence/attention experimentation, not production LLM training.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.