Expand description
Text generation utilities for character-level language models.
Provides vocabulary management, character embeddings, and sampling strategies.
Structs§
- Character
Embedding - Trainable character embedding layer.
- Embedding
Gradients - Gradients for character embedding layer.
- Text
Vocabulary - Character vocabulary for text generation tasks.
Functions§
- argmax
- Get argmax (greedy decoding).
- sample_
nucleus - Nucleus (top-p) sampling.
- sample_
top_ k - Sample from top-k most likely tokens.
- sample_
with_ temperature - Sample from logits with temperature scaling.
- softmax
- Apply softmax to logits.