View a markdown version of this page

SampleConfig - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

SampleConfig

The configuration for generating text samples from the model.

Contents

numSamples

The number of independent samples to generate for the prompt.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: Yes

prompt

The input prompt to send to the model for text generation.

Type: ModelInput object

Required: Yes

samplingParams

The parameters controlling the sampling strategy.

Type: SamplingParams object

Required: Yes

includePromptLogprobs

Specifies whether to include per-token log-probabilities for the input prompt in the response.

Type: Boolean

Required: No

modelPackageArn

The ARN of the model package whose checkpoint this sample should run against. Must be a valid SageMaker model package ARN in the format arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. When absent, the sample runs against the session's latest checkpoint.

Type: String

Required: No

topkPromptLogprobs

The number of top-k log-probabilities to return per prompt token.

Type: Integer

Required: No

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: