TorchLean API

NN.Widgets.Models.Sequence.Gpt2

GPT-2 Training Log Viewer #

TorchLean's generic TrainLog widget (#train_log_view / #train_log_file_view) is great for curves and small scalar summaries, but language-model examples benefit from a "prompt → sample" panel that keeps the generated text readable.

This module provides GPT-2 specific viewers that:

Usage (after running the executable to write a JSON log):

#gpt2_train_log_file_view "data/model_zoo/gpt2_trainlog.json"

Render a TrainLog produced by torchlean gpt2 with prompt/sample blocks.

Instances For

    One-shot Prompt Runner #

    #gpt2_prompt_view "..." runs the torchlean gpt2 executable (CUDA) with a small default configuration, writes a temporary JSON TrainLog, then renders it.

    This is meant for quick "does it run?" checks inside the infoview. It is not a replacement for the CLI interactive loop, and it will still take noticeable time if you increase --steps.

    Commands #