TorchLean API

NN.Examples.Models.Sequence.SimpleText

Shared Simple Sequence Text Runner #

This file is the shared runner for the small RNN/LSTM/Transformer text smoke tests.

Both examples have the same public shape:

The actual architecture still lives in the calling file. This helper owns only the runnable example infrastructure, so readers can compare Rnn.lean, Lstm.lean, and Transformer.lean without reading three copies of the same runtime wrapper.

Configuration for a small real-text sequence training example.

Instances For

    Train one small sequence model for steps optimizer updates.

    This is intentionally a smoke-scale routine: one fixed corpus-derived sample, one optimizer, and a before/after loss. More realistic streaming/minibatch examples live elsewhere; this helper is for architecture sanity checks that should run quickly on CPU or CUDA.

    Instances For

      Shared main implementation for the small RNN/LSTM text examples.

      Instances For