Class: Aws::SageMakerTrainingSessionRuntime::Types::SamplingParams

Inherits:
Struct
  • Object
show all
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

Instance Attribute Details

#max_tokens ⇒ Integer

The maximum number of tokens to generate per sample.

Returns:

  • (Integer)


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.

Returns:

  • (Integer)


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.

Returns:

  • (Array<String>)


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.

Returns:

  • (Float)


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.

Returns:

  • (Integer)


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.

Returns:

  • (Float)


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