About Keras
Getting started
Developer guides
Keras 3 API documentation
Models API
Layers API
Callbacks API
Ops API
Optimizers
Metrics
Losses
Data loading
Built-in small datasets
Keras Applications
Mixed precision
Multi-device distribution
RNG API
Utilities
KerasTuner
KerasCV
KerasNLP
Pretrained Models
Models API
Tokenizers
Preprocessing Layers
Modeling Layers
Samplers
Metrics
KerasHub
Keras 2 API documentation
Code examples
KerasTuner: Hyperparameter Tuning
KerasHub: Pretrained Models
KerasCV: Computer Vision Workflows
KerasNLP: Natural Language Workflows
search
►
Keras 3 API documentation
/
KerasNLP
/ Samplers
Samplers
Sampler base class
Sampler class
get_next_token method
BeamSampler
BeamSampler class
ContrastiveSampler
ContrastiveSampler class
GreedySampler
GreedySampler class
RandomSampler
RandomSampler class
TopKSampler
TopKSampler class
TopPSampler
TopPSampler class
Samplers
Sampler base class
BeamSampler
ContrastiveSampler
GreedySampler
RandomSampler
TopKSampler
TopPSampler