π₯οΈ ezpz-generate-tuiΒΆ
[!WARNING] Experimental / not well tested. Expect rough edges and be ready to fall back to a simpler script if things misbehave.
Textual TUI for interactive prompt-based text generation.
- Load a Hugging Face causal LM + tokenizer, choose dtype and max length, and generate responses from a simple UI.
- Uses
ezpz.get_torch_device_type()to pick the accelerator. - Keyboard:
Ctrl+Enterto generate,qorCtrl+Cto quit.
UsageΒΆ
Defaults and controlsΒΆ
- Default model:
meta-llama/Llama-3.2-1B - Default dtype:
bfloat16(float16andfloat32also available) - Default max length:
128 - Buttons: Load Model, Generate (ββ), Stop, Clear output
NotesΒΆ
- Requires
textual,torch, andtransformersinstalled; GPU strongly recommended for any non-toy model. - Generation runs on a worker thread to keep the UI responsive; cancelling uses the Stop button.