Class: Aws::SageMakerTrainingSessionRuntime::Types::SamplingParams
- Inherits:
-
Struct
- Object
- Struct
- Aws::SageMakerTrainingSessionRuntime::Types::SamplingParams
- Defined in:
- gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb
Overview
The parameters controlling the text generation sampling strategy.
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#max_tokens ⇒ Integer
The maximum number of tokens to generate per sample.
-
#seed ⇒ Integer
The random seed for reproducible sampling.
-
#stop ⇒ Array<String>
The list of stop sequences that terminate generation when encountered in the output.
-
#temperature ⇒ Float
The sampling temperature controlling randomness.
-
#top_k ⇒ Integer
The number of highest-probability vocabulary tokens to keep for top-k filtering.
-
#top_p ⇒ Float
The cumulative probability threshold for nucleus (top-p) sampling.
Instance Attribute Details
#max_tokens ⇒ Integer
The maximum number of tokens to generate per sample.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |
#seed ⇒ Integer
The random seed for reproducible sampling. When set, the same seed with the same input produces deterministic outputs.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |
#stop ⇒ Array<String>
The list of stop sequences that terminate generation when encountered in the output.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |
#temperature ⇒ Float
The sampling temperature controlling randomness. Higher values produce more diverse outputs.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |
#top_k ⇒ Integer
The number of highest-probability vocabulary tokens to keep for top-k filtering. Set to -1 to disable.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |
#top_p ⇒ Float
The cumulative probability threshold for nucleus (top-p) sampling. Only tokens with cumulative probability below this threshold are considered.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/types.rb', line 1018 class SamplingParams < Struct.new( :max_tokens, :temperature, :top_k, :top_p, :seed, :stop) SENSITIVE = [] include Aws::Structure end |