{ "smithy": "2.0", "shapes": { "com.amazonaws.sagemakertrainingsessionruntime#AdamParamsConfig": { "type": "structure", "members": { "learningRate": { "target": "smithy.api#Double", "traits": { "smithy.api#documentation": "
The learning rate for the optimizer. Must be greater than 0.
", "smithy.api#range": { "min": 0, "max": 0.01 }, "smithy.api#required": {} } }, "beta1": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 0.9, "smithy.api#documentation": "The exponential decay rate for the first moment estimates.
", "smithy.api#range": { "min": 0, "max": 0.999999 } } }, "beta2": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 0.95, "smithy.api#documentation": "The exponential decay rate for the second moment estimates.
", "smithy.api#range": { "min": 0, "max": 0.999999 } } }, "eps": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 1e-08, "smithy.api#documentation": "A small constant added to the denominator for numerical stability.
", "smithy.api#range": { "min": 1e-16, "max": 0.01 } } }, "weightDecay": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 0, "smithy.api#documentation": "The weight decay (L2 regularization) coefficient.
", "smithy.api#range": { "min": 0, "max": 1 } } }, "gradClipNorm": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 1, "smithy.api#documentation": "The maximum gradient norm for gradient clipping. Gradients are scaled down if their norm exceeds this value.
", "smithy.api#range": { "min": 0, "max": 100 } } }, "loraPlusLrRatio": { "target": "smithy.api#Double", "traits": { "smithy.api#documentation": "The learning rate multiplier for LoRA+ B matrices relative to A matrices. When set, B matrices use learningRate * loraPlusLrRatio while A matrices use the base learning rate.
The Adam optimizer hyperparameters used during an optimizer step.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ClientToken": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 128 }, "smithy.api#pattern": "^[a-zA-Z0-9-]+$" } }, "com.amazonaws.sagemakertrainingsessionruntime#ComputeLogprobsConfig": { "type": "structure", "members": { "prompt": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ModelInput", "traits": { "smithy.api#documentation": "The input prompt whose token log-probabilities will be computed.
", "smithy.api#required": {} } }, "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package whose checkpoint this operation 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 operation runs against the session's latest checkpoint.
The configuration for computing log-probabilities of prompt tokens without generating new text.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ComputeLogprobsResult": { "type": "structure", "members": { "logprobs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#DoubleList", "traits": { "smithy.api#documentation": "The per-token log-probabilities for the input prompt.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The result of a compute-logprobs operation.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ConflictException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The training session is in a state that cannot accept new operations. The session must be in Running or Blocked state to accept requests.
The tokenized input to feed to the model.
", "smithy.api#required": {} } }, "lossFnInputs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMap", "traits": { "smithy.api#documentation": "The tensor inputs for the loss function, keyed by name. Unsupported keys are rejected. Supported keys: target_tokens, weights, advantages, logprobs, ref_log_prob, temperature. Required keys depend on the loss function type: SFT (cross_entropy) requires target_tokens and weights; RL (ppo, cispo, importance_sampling) requires target_tokens, weights, advantages, and logprobs.
A single training datum containing model input and optional loss function inputs.
", "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#DatumList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#Datum" } }, "com.amazonaws.sagemakertrainingsessionruntime#DoubleList": { "type": "list", "member": { "target": "smithy.api#Double" } }, "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunk": { "type": "structure", "members": { "tokens": { "target": "com.amazonaws.sagemakertrainingsessionruntime#IntegerList", "traits": { "smithy.api#documentation": "The token IDs representing the encoded text.
", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunkType", "traits": { "smithy.api#documentation": "The type of the chunk encoding.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "A chunk of pre-tokenized text represented as a list of token IDs.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunkList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunk" } }, "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunkType": { "type": "enum", "members": { "ENCODED_TEXT": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "encoded_text" } } } }, "com.amazonaws.sagemakertrainingsessionruntime#ExecuteSamplingOperation": { "type": "operation", "input": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ExecuteSamplingOperationInput" }, "output": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ExecuteSamplingOperationOutput" }, "errors": [ { "target": "com.amazonaws.sagemakertrainingsessionruntime#ConflictException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#InternalServerException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ResourceNotFoundException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ThrottlingException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "Submits an asynchronous sampling operation to generate text or compute log-probabilities from the model associated with the specified training session. The session must be in Running or Blocked state. Use GetSamplingOperationResult to poll for the result.
The name of the training session to sample from.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "operationConfig": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleOperationConfig", "traits": { "smithy.api#documentation": "The configuration for the sample operation. Specify either a sample configuration to generate text or a computeLogprobs configuration to compute token log-probabilities.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#ExecuteSamplingOperationOutput": { "type": "structure", "members": { "operationId": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OperationId", "traits": { "smithy.api#documentation": "The unique identifier for the submitted sample operation. Use this identifier with GetSamplingOperationResult to retrieve the operation status and result.
Submits an asynchronous training operation to the specified training session. The service executes operations in sequence number order. The session must be in Running or Blocked state. Use GetTrainingOperationResult to poll for the result. Supported operation types: forward, forwardBackward, optimizerStep, saveWeights, saveState, and loadState.
The name of the training session to submit the operation to.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "sequenceNumber": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SequenceNumber", "traits": { "smithy.api#documentation": "The monotonically increasing sequence number that determines execution order. The training session processes operations strictly in sequence number order. If a gap exists, the session blocks until the missing operation arrives or times out. Must be at least 1.
", "smithy.api#required": {} } }, "clientToken": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ClientToken", "traits": { "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service ignores the request but does not return an error.
" } }, "operationConfig": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OperationConfig", "traits": { "smithy.api#documentation": "The configuration that specifies the type and parameters of the training operation. Exactly one member of the union must be set.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#ExecuteTrainingOperationOutput": { "type": "structure", "members": { "operationId": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OperationId", "traits": { "smithy.api#documentation": "The unique identifier for the submitted operation. Use this identifier with GetTrainingOperationResult to retrieve the operation status and result.
The name of the loss function to evaluate during the forward-backward pass.
", "smithy.api#required": {} } }, "datumList": { "target": "com.amazonaws.sagemakertrainingsessionruntime#DatumList", "traits": { "smithy.api#documentation": "The list of input data to feed through the model. Must contain at least one datum, and each datum must have a non-empty modelInput with at least one chunk.
", "smithy.api#required": {} } }, "lossFnConfig": { "target": "smithy.api#Document", "traits": { "smithy.api#documentation": "Additional loss function configuration passed to the engine. Supported keys are clip_low_threshold (valid range: 0 to 1) and clip_high_threshold (valid range: 1 to 10). Unsupported keys are rejected.
The configuration for a forward and backward pass through the model. This computes both loss values and gradients for use in subsequent optimizer steps.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ForwardBackwardResult": { "type": "structure", "members": { "lossFnOutputType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The data type of the loss function output tensors.
" } }, "lossFnOutputs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMapList", "traits": { "smithy.api#documentation": "The loss function output tensors, keyed by name.
" } }, "metrics": { "target": "com.amazonaws.sagemakertrainingsessionruntime#MetricsMap", "traits": { "smithy.api#documentation": "The training metrics emitted by the engine, such as loss values.
" } }, "tokenUsage": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingTokenUsage", "traits": { "smithy.api#documentation": "The token usage statistics for metering.
" } } }, "traits": { "smithy.api#documentation": "The result of a forward and backward pass through the model, including computed gradients.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ForwardConfig": { "type": "structure", "members": { "lossFnName": { "target": "com.amazonaws.sagemakertrainingsessionruntime#LossFnName", "traits": { "smithy.api#documentation": "The name of the loss function to evaluate during the forward pass.
", "smithy.api#required": {} } }, "datumList": { "target": "com.amazonaws.sagemakertrainingsessionruntime#DatumList", "traits": { "smithy.api#documentation": "The list of input data to feed through the model. Must contain at least one datum, and each datum must have a non-empty modelInput with at least one chunk.
", "smithy.api#required": {} } }, "lossFnConfig": { "target": "smithy.api#Document", "traits": { "smithy.api#documentation": "Additional loss function configuration passed to the engine. Supported keys are clip_low_threshold (valid range: 0 to 1) and clip_high_threshold (valid range: 1 to 10). Unsupported keys are rejected.
The configuration for a forward-only pass through the model. This computes loss values without computing gradients.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ForwardResult": { "type": "structure", "members": { "lossFnOutputType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The data type of the loss function output tensors.
" } }, "lossFnOutputs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMapList", "traits": { "smithy.api#documentation": "The loss function output tensors, keyed by name.
" } }, "metrics": { "target": "com.amazonaws.sagemakertrainingsessionruntime#MetricsMap", "traits": { "smithy.api#documentation": "The training metrics emitted by the engine, such as loss values.
" } }, "tokenUsage": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingTokenUsage", "traits": { "smithy.api#documentation": "The token usage statistics for metering.
" } } }, "traits": { "smithy.api#documentation": "The result of a forward-only pass through the model.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#GetSamplingOperationResult": { "type": "operation", "input": { "target": "com.amazonaws.sagemakertrainingsessionruntime#GetSamplingOperationResultInput" }, "output": { "target": "com.amazonaws.sagemakertrainingsessionruntime#GetSamplingOperationResultOutput" }, "errors": [ { "target": "com.amazonaws.sagemakertrainingsessionruntime#InternalServerException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ResourceNotFoundException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ThrottlingException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "Retrieves the current status and result of a previously submitted sampling operation. Poll this operation until the status reaches a terminal state (Completed or Failed).
", "smithy.api#examples": [ { "title": "Get the result of a sampling operation", "documentation": "Retrieves the status and generated sequences for a sampling operation submitted with ExecuteSamplingOperation.", "input": { "trainingSessionName": "my-training-session", "operationId": "a1b2c3d4-5678-90ab-cdef-1234567890ab" }, "output": { "status": "Completed", "operationResult": { "sample": { "sequences": [ { "stopReason": "stop", "tokens": [ 791, 6864, 315, 9822, 374, 12366, 13 ], "tokenUsage": { "prefill": 5, "decode": 7 } } ] } } } } ], "smithy.api#http": { "uri": "/v1/training-sessions/{trainingSessionName}/sampling-operations/{operationId}", "method": "GET" }, "smithy.api#readonly": {}, "smithy.test#smokeTests": [ { "id": "GetSamplingOperationResultFailure", "params": { "trainingSessionName": "smoke-test-nonexistent-session", "operationId": "smoke-test-nonexistent-operation" }, "vendorParamsShape": "aws.test#AwsVendorParams", "vendorParams": { "region": "us-west-2" }, "expect": { "failure": {} } } ] } }, "com.amazonaws.sagemakertrainingsessionruntime#GetSamplingOperationResultInput": { "type": "structure", "members": { "trainingSessionName": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingSessionName", "traits": { "smithy.api#documentation": "The name of the training session that owns the sample operation.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "operationId": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OperationId", "traits": { "smithy.api#documentation": "The unique identifier of the sample operation to retrieve, returned by ExecuteSamplingOperation.
The current status of the sample operation. Possible values are Pending, InProgress, Completed, or Failed.
The result payload of the sample operation. The service populates this field only when the status is Completed.
A message describing why the sample operation failed. The service populates this field only when the status is Failed.
Retrieves the current status and result of a previously submitted training operation. Poll this operation until the status reaches a terminal state (Completed, Failed, or Skipped).
", "smithy.api#examples": [ { "title": "Get the result of a training operation", "documentation": "Retrieves the status and result of a training operation submitted with ExecuteTrainingOperation.", "input": { "trainingSessionName": "my-training-session", "operationId": "a1b2c3d4-5678-90ab-cdef-1234567890ab" }, "output": { "status": "Completed", "operationResult": { "forwardBackward": { "lossFnOutputType": "logprobs", "metrics": { "loss": 1.8342 } } }, "tokenUsage": { "trainingTokens": 4096 } } } ], "smithy.api#http": { "uri": "/v1/training-sessions/{trainingSessionName}/operations/{operationId}", "method": "GET" }, "smithy.api#readonly": {}, "smithy.test#smokeTests": [ { "id": "GetTrainingOperationResultFailure", "params": { "trainingSessionName": "smoke-test-nonexistent-session", "operationId": "smoke-test-nonexistent-operation" }, "vendorParamsShape": "aws.test#AwsVendorParams", "vendorParams": { "region": "us-west-2" }, "expect": { "failure": {} } } ] } }, "com.amazonaws.sagemakertrainingsessionruntime#GetTrainingOperationResultInput": { "type": "structure", "members": { "trainingSessionName": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingSessionName", "traits": { "smithy.api#documentation": "The name of the training session that owns the operation.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "operationId": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OperationId", "traits": { "smithy.api#documentation": "The unique identifier of the operation to retrieve, returned by ExecuteTrainingOperation.
The current status of the operation. Possible values are Pending, InProgress, Completed, Failed, or Skipped.
The result payload of the operation. The service populates this field only when the status is Completed. The populated member of the union corresponds to the operation type that was submitted.
A message describing why the operation failed. The service populates this field only when the status is Failed.
The token usage statistics for metering purposes. The service populates this field for forward and forwardBackward operations upon completion.
" } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#InferenceBody": { "type": "blob", "traits": { "smithy.api#documentation": "Sensitive binary payload containing customer inference data.", "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#IntegerList": { "type": "list", "member": { "target": "smithy.api#Integer" } }, "com.amazonaws.sagemakertrainingsessionruntime#InternalServerException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "An internal service error occurred. Retry the request using exponential backoff.
", "smithy.api#error": "server", "smithy.api#httpError": 500 } }, "com.amazonaws.sagemakertrainingsessionruntime#LegoRouterService": { "type": "service", "version": "2025-02-10", "operations": [ { "target": "com.amazonaws.sagemakertrainingsessionruntime#ExecuteSamplingOperation" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ExecuteTrainingOperation" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#GetSamplingOperationResult" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#GetTrainingOperationResult" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSession" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStream" } ], "traits": { "aws.api#service": { "sdkId": "SageMakerTrainingSessionRuntime", "arnNamespace": "sagemaker", "endpointPrefix": "training-session-runtime.sagemaker" }, "aws.auth#sigv4": { "name": "sagemaker" }, "aws.endpoints#dualStackOnlyEndpoints": {}, "aws.endpoints#standardRegionalEndpoints": { "partitionSpecialCases": { "aws": [ { "endpoint": "https://training-session-runtime.sagemaker.{region}.{dualStackDnsSuffix}", "dualStack": true } ], "aws-cn": [ { "endpoint": "https://training-session-runtime.sagemaker.{region}.{dualStackDnsSuffix}", "dualStack": true } ], "aws-us-gov": [ { "endpoint": "https://training-session-runtime.sagemaker.{region}.{dualStackDnsSuffix}", "dualStack": true } ] } }, "aws.protocols#restJson1": { "http": [ "h2", "http/1.1" ] }, "smithy.api#documentation": "Amazon SageMaker Training Session Runtime provides APIs for executing training operations and sampling operations against a running training session. Use these APIs to submit asynchronous training steps (such as forward-backward passes, optimizer steps, and checkpoint saves) and to generate text samples from the model being trained.
", "smithy.api#title": "SageMaker Training Session Runtime", "smithy.rules#endpointBdd": { "version": "1.1", "parameters": { "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" }, "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" } }, "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] }, { "fn": "isSet", "argv": [ { "ref": "Region" } ] }, { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "results": [ { "conditions": [], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://training-session-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://training-session-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "root": 2, "nodeCount": 6, "nodes": "/////wAAAAH/////AAAAAAAAAAYAAAADAAAAAQAAAAQF9eEFAAAAAgAAAAUF9eEFAAAAAwX14QQF9eEDAAAAAwX14QEF9eEC" }, "smithy.rules#endpointRuleSet": { "version": "1.0", "parameters": { "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" }, "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" } }, "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Region" } ] } ], "rules": [ { "conditions": [ { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" } ], "rules": [ { "conditions": [ { "fn": "stringEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "name" ] }, "aws" ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, false ] } ], "endpoint": { "url": "https://training-session-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [ { "fn": "stringEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "name" ] }, "aws-cn" ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, false ] } ], "endpoint": { "url": "https://training-session-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [ { "fn": "stringEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "name" ] }, "aws-us-gov" ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, false ] } ], "endpoint": { "url": "https://training-session-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "endpoint": { "url": "https://training-session-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://training-session-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "type": "tree" } ] }, "smithy.rules#endpointTests": { "testCases": [ { "documentation": "For custom endpoint with region not set and fips disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "Endpoint": "https://example.com", "UseFIPS": false } }, { "documentation": "For custom endpoint with fips enabled", "expect": { "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { "Endpoint": "https://example.com", "UseFIPS": true } }, { "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker-fips.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": true } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": false } }, { "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker-fips.cn-northwest-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-northwest-1", "UseFIPS": true } }, { "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker.cn-northwest-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-northwest-1", "UseFIPS": false } }, { "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker-fips.us-gov-west-1.api.aws" } }, "params": { "Region": "us-gov-west-1", "UseFIPS": true } }, { "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://training-session-runtime.sagemaker.us-gov-west-1.api.aws" } }, "params": { "Region": "us-gov-west-1", "UseFIPS": false } }, { "documentation": "Missing region", "expect": { "error": "Invalid Configuration: Missing Region" } } ], "version": "1.0" } } }, "com.amazonaws.sagemakertrainingsessionruntime#LoadStateConfig": { "type": "structure", "members": { "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package containing the checkpoint to load. Must be a valid SageMaker model package ARN in the format arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. Model package group ARNs are not accepted.
Specifies whether to also restore the optimizer state alongside model weights. When true, optimizer state is restored to resume training from where it left off.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The configuration for loading training state from a previously saved checkpoint. This restores model weights and optionally optimizer state.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#LoadStateResult": { "type": "structure", "members": {}, "traits": { "smithy.api#documentation": "The result of loading training state. An empty response indicates success.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#LoadWeightsForSamplingConfig": { "type": "structure", "members": { "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package containing the weights to load for sampling. Must be a valid SageMaker model package ARN in the format arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. The model package must belong to the same AWS account as the training session.
The configuration for loading model weights for inference and sampling without restoring optimizer state.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#LoadWeightsForSamplingResult": { "type": "structure", "members": {}, "traits": { "smithy.api#documentation": "The result of loading weights for sampling. An empty response indicates success.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#LossFnName": { "type": "enum", "members": { "CROSS_ENTROPY": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "cross_entropy" } }, "IMPORTANCE_SAMPLING": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "importance_sampling" } }, "PPO": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "ppo" } }, "CISPO": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "cispo" } } } }, "com.amazonaws.sagemakertrainingsessionruntime#MetricsMap": { "type": "map", "key": { "target": "smithy.api#String" }, "value": { "target": "smithy.api#Double" } }, "com.amazonaws.sagemakertrainingsessionruntime#ModelInput": { "type": "structure", "members": { "chunks": { "target": "com.amazonaws.sagemakertrainingsessionruntime#EncodedTextChunkList", "traits": { "smithy.api#documentation": "The ordered list of encoded text chunks forming the input sequence.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The tokenized model input composed of ordered encoded text chunks.
", "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#OperationConfig": { "type": "union", "members": { "forward": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ForwardConfig", "traits": { "smithy.api#documentation": "The configuration for a forward-only pass through the model without gradient computation.
" } }, "forwardBackward": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ForwardBackwardConfig", "traits": { "smithy.api#documentation": "The configuration for a forward and backward pass that computes gradients.
" } }, "optimizerStep": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OptimizerStepConfig", "traits": { "smithy.api#documentation": "The configuration for an optimizer step that updates model weights using accumulated gradients.
" } }, "saveWeights": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SaveWeightsConfig", "traits": { "smithy.api#documentation": "The configuration for saving model weights as a checkpoint.
" } }, "saveState": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SaveStateConfig", "traits": { "smithy.api#documentation": "The configuration for saving full training state, including model weights and optimizer state.
" } }, "loadState": { "target": "com.amazonaws.sagemakertrainingsessionruntime#LoadStateConfig", "traits": { "smithy.api#documentation": "The configuration for loading training state from a previously saved checkpoint.
" } } }, "traits": { "smithy.api#documentation": "The configuration for a training operation. Exactly one member must be set to specify the operation type and its parameters.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#OperationId": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 64 }, "smithy.api#pattern": "^[a-zA-Z0-9-]+$" } }, "com.amazonaws.sagemakertrainingsessionruntime#OperationResult": { "type": "union", "members": { "forward": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ForwardResult", "traits": { "smithy.api#documentation": "The result from a forward-only pass.
" } }, "forwardBackward": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ForwardBackwardResult", "traits": { "smithy.api#documentation": "The result from a forward and backward pass.
" } }, "optimizerStep": { "target": "com.amazonaws.sagemakertrainingsessionruntime#OptimizerStepResult", "traits": { "smithy.api#documentation": "The result from an optimizer step.
" } }, "saveWeights": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SaveWeightsResult", "traits": { "smithy.api#documentation": "The result from saving model weights.
" } }, "saveState": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SaveStateResult", "traits": { "smithy.api#documentation": "The result from saving full training state.
" } }, "loadState": { "target": "com.amazonaws.sagemakertrainingsessionruntime#LoadStateResult", "traits": { "smithy.api#documentation": "The result from loading training state.
" } } }, "traits": { "smithy.api#documentation": "The result of a completed training operation. Exactly one member is populated, corresponding to the operation type that was submitted.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#OptimizerStepConfig": { "type": "structure", "members": { "adamParamsConfig": { "target": "com.amazonaws.sagemakertrainingsessionruntime#AdamParamsConfig", "traits": { "smithy.api#documentation": "The Adam optimizer hyperparameters for this step.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The configuration for an optimizer step that updates model weights using gradients accumulated from previous forward-backward passes.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#OptimizerStepResult": { "type": "structure", "members": { "metrics": { "target": "com.amazonaws.sagemakertrainingsessionruntime#MetricsMap", "traits": { "smithy.api#documentation": "The training metrics emitted by the engine after the optimizer step.
" } } }, "traits": { "smithy.api#documentation": "The result of an optimizer step.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#RequestStatus": { "type": "enum", "members": { "PENDING": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "Pending" } }, "IN_PROGRESS": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "InProgress" } }, "COMPLETED": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "Completed" } }, "FAILED": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "Failed" } }, "SKIPPED": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "Skipped" } } } }, "com.amazonaws.sagemakertrainingsessionruntime#ResourceNotFoundException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The specified training session or operation does not exist, or the operation does not belong to the specified training session.
", "smithy.api#error": "client", "smithy.api#httpError": 404 } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleConfig": { "type": "structure", "members": { "prompt": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ModelInput", "traits": { "smithy.api#documentation": "The input prompt to send to the model for text generation.
", "smithy.api#required": {} } }, "numSamples": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The number of independent samples to generate for the prompt.
", "smithy.api#range": { "min": 1, "max": 1000 }, "smithy.api#required": {} } }, "samplingParams": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SamplingParams", "traits": { "smithy.api#documentation": "The parameters controlling the sampling strategy.
", "smithy.api#required": {} } }, "includePromptLogprobs": { "target": "smithy.api#Boolean", "traits": { "smithy.api#default": false, "smithy.api#documentation": "Specifies whether to include per-token log-probabilities for the input prompt in the response.
" } }, "topkPromptLogprobs": { "target": "smithy.api#Integer", "traits": { "smithy.api#default": 0, "smithy.api#documentation": "The number of top-k log-probabilities to return per prompt token.
" } }, "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "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.
The configuration for generating text samples from the model.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleOperationConfig": { "type": "union", "members": { "sample": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleConfig", "traits": { "smithy.api#documentation": "The configuration for generating text samples from the model.
" } }, "computeLogprobs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ComputeLogprobsConfig", "traits": { "smithy.api#documentation": "The configuration for computing log-probabilities of prompt tokens without generating new text.
" } }, "loadWeightsForSampling": { "target": "com.amazonaws.sagemakertrainingsessionruntime#LoadWeightsForSamplingConfig", "traits": { "smithy.api#documentation": "The configuration for loading model weights for inference and sampling without restoring optimizer state.
" } } }, "traits": { "smithy.api#documentation": "The configuration for a sampling operation. Exactly one member must be set to specify the operation type.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleOperationResult": { "type": "union", "members": { "sample": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleResponse", "traits": { "smithy.api#documentation": "The generated text samples from the model.
" } }, "computeLogprobs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#ComputeLogprobsResult", "traits": { "smithy.api#documentation": "The computed log-probabilities for the prompt tokens.
" } }, "loadWeightsForSampling": { "target": "com.amazonaws.sagemakertrainingsessionruntime#LoadWeightsForSamplingResult", "traits": { "smithy.api#documentation": "The result from loading weights for sampling.
" } } }, "traits": { "smithy.api#documentation": "The result of a completed sampling operation. Exactly one member is populated, corresponding to the operation type that was submitted.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleResponse": { "type": "structure", "members": { "sequences": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampledSequenceList", "traits": { "smithy.api#documentation": "The list of generated sequences.
", "smithy.api#required": {} } }, "promptLogprobs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#DoubleList", "traits": { "smithy.api#documentation": "The per-token log-probabilities for the input prompt. Populated only when includePromptLogprobs is true.
The top-k log-probabilities per prompt token, as a list of lists. Populated only when topkPromptLogprobs is greater than 0.
The response containing generated samples and optional log-probabilities.
", "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleResponseStream": { "type": "blob", "traits": { "smithy.api#documentation": "The streaming response body, delivered as Server-Sent Events (text/event-stream). Each event is a data: {JSON} line containing a chat completion chunk, and the stream is terminated by data: [DONE]. If an error occurs after streaming has started, it is delivered as a data: {\"error\": {...}} event and the stream ends without a [DONE] marker. Errors that occur before streaming starts are returned as the operation's errors.
The number of tokens in the input prompt (prefill phase).
", "smithy.api#required": {} } }, "decode": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The number of tokens generated (decode phase).
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The token usage statistics for a sample generation.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSession": { "type": "operation", "input": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionInput" }, "output": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionOutput" }, "errors": [ { "target": "com.amazonaws.sagemakertrainingsessionruntime#ConflictException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#InternalServerException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ResourceNotFoundException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ThrottlingException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "Sends an inference request to the model associated with the specified training session and returns the response synchronously. The service passes the request and response bodies to and from the model without modification.
", "smithy.api#examples": [ { "title": "Sample from a training session", "documentation": "Sends a chat completion request to the session's current weights and receives the complete response in a single payload.", "input": { "trainingSessionName": "my-training-session", "contentType": "application/json", "accept": "application/json", "body": "eyJtZXNzYWdlcyI6W3sicm9sZSI6InVzZXIiLCJjb250ZW50IjoiV2hhdCBpcyB0aGUgY2FwaXRhbCBvZiBGcmFuY2U/In1dLCJtYXhfdG9rZW5zIjoxMjh9" }, "output": { "contentType": "application/json", "body": "eyJjaG9pY2VzIjpbeyJtZXNzYWdlIjp7InJvbGUiOiJhc3Npc3RhbnQiLCJjb250ZW50IjoiUGFyaXMifSwiZmluaXNoX3JlYXNvbiI6InN0b3AifV19" } } ], "smithy.api#http": { "uri": "/training-sessions/{trainingSessionName}/sample", "method": "POST" } } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionInput": { "type": "structure", "members": { "trainingSessionName": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingSessionName", "traits": { "smithy.api#documentation": "The name of the training session whose model to invoke.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "contentType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The MIME type of the input data in the request body.
", "smithy.api#httpHeader": "Content-Type" } }, "accept": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The desired MIME type of the inference body in the response.
", "smithy.api#httpHeader": "Accept" } }, "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package whose checkpoint to invoke.
", "smithy.api#httpHeader": "X-Amzn-SageMaker-Model-Package" } }, "body": { "target": "com.amazonaws.sagemakertrainingsessionruntime#InferenceBody", "traits": { "smithy.api#documentation": "The raw inference request body.
", "smithy.api#httpPayload": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionOutput": { "type": "structure", "members": { "contentType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The MIME type of the inference result in the response body.
", "smithy.api#httpHeader": "Content-Type" } }, "body": { "target": "com.amazonaws.sagemakertrainingsessionruntime#InferenceBody", "traits": { "smithy.api#documentation": "The raw inference response body from the model.
", "smithy.api#httpPayload": {}, "smithy.api#required": {} } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStream": { "type": "operation", "input": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStreamInput" }, "output": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStreamOutput" }, "errors": [ { "target": "com.amazonaws.sagemakertrainingsessionruntime#ConflictException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#InternalServerException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ResourceNotFoundException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ThrottlingException" }, { "target": "com.amazonaws.sagemakertrainingsessionruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "Streams inference responses from the model associated with the specified training session. Use this operation for real-time token-by-token generation. The service passes the request body to the model without modification.
", "smithy.api#examples": [ { "title": "Stream samples from a training session", "documentation": "Sends a chat completion request to the session's current weights and receives the response as a stream of payload chunks.", "input": { "trainingSessionName": "my-training-session", "contentType": "application/json", "accept": "application/json", "body": "eyJtZXNzYWdlcyI6W3sicm9sZSI6InVzZXIiLCJjb250ZW50IjoiV2hhdCBpcyB0aGUgY2FwaXRhbCBvZiBGcmFuY2U/In1dLCJtYXhfdG9rZW5zIjoxMjgsInN0cmVhbSI6dHJ1ZX0=" } } ], "smithy.api#http": { "uri": "/training-sessions/{trainingSessionName}/sample-with-response-stream", "method": "POST" } } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStreamInput": { "type": "structure", "members": { "trainingSessionName": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TrainingSessionName", "traits": { "smithy.api#documentation": "The name of the training session whose model to invoke.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "contentType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The MIME type of the input data in the request body.
", "smithy.api#httpHeader": "Content-Type" } }, "accept": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The desired MIME type of the inference body in the response.
", "smithy.api#httpHeader": "Accept" } }, "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package whose checkpoint to invoke.
", "smithy.api#httpHeader": "X-Amzn-SageMaker-Model-Package" } }, "body": { "target": "com.amazonaws.sagemakertrainingsessionruntime#InferenceBody", "traits": { "smithy.api#documentation": "The raw inference request body.
", "smithy.api#httpPayload": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#SampleTrainingSessionWithResponseStreamOutput": { "type": "structure", "members": { "contentType": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The MIME type of the streaming inference result.
", "smithy.api#httpHeader": "Content-Type" } }, "body": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleResponseStream", "traits": { "smithy.api#documentation": "The streaming inference response from the model, delivered as a series of chunks.
", "smithy.api#httpPayload": {}, "smithy.api#required": {} } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.sagemakertrainingsessionruntime#SampledSequence": { "type": "structure", "members": { "stopReason": { "target": "com.amazonaws.sagemakertrainingsessionruntime#StopReason", "traits": { "smithy.api#documentation": "The reason why generation stopped. A value of stop indicates a stop sequence was encountered. A value of length indicates the maximum token limit was reached.
The token IDs of the generated sequence.
", "smithy.api#required": {} } }, "logprobs": { "target": "com.amazonaws.sagemakertrainingsessionruntime#DoubleList", "traits": { "smithy.api#documentation": "The per-token log-probabilities for the generated tokens.
" } }, "tokenUsage": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampleTokenUsage", "traits": { "smithy.api#documentation": "The token usage statistics for this individual sample.
" } } }, "traits": { "smithy.api#documentation": "A single generated sequence from the model.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SampledSequenceList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#SampledSequence" } }, "com.amazonaws.sagemakertrainingsessionruntime#SamplingParams": { "type": "structure", "members": { "maxTokens": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The maximum number of tokens to generate per sample.
", "smithy.api#range": { "min": 512, "max": 131072 }, "smithy.api#required": {} } }, "temperature": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 1, "smithy.api#documentation": "The sampling temperature controlling randomness. Higher values produce more diverse outputs.
", "smithy.api#range": { "min": 0, "max": 2 } } }, "topK": { "target": "smithy.api#Integer", "traits": { "smithy.api#default": -1, "smithy.api#documentation": "The number of highest-probability vocabulary tokens to keep for top-k filtering. Set to -1 to disable.
" } }, "topP": { "target": "smithy.api#Double", "traits": { "smithy.api#default": 1, "smithy.api#documentation": "The cumulative probability threshold for nucleus (top-p) sampling. Only tokens with cumulative probability below this threshold are considered.
", "smithy.api#range": { "min": 0, "max": 1 } } }, "seed": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The random seed for reproducible sampling. When set, the same seed with the same input produces deterministic outputs.
" } }, "stop": { "target": "com.amazonaws.sagemakertrainingsessionruntime#StopSequenceList", "traits": { "smithy.api#documentation": "The list of stop sequences that terminate generation when encountered in the output.
" } } }, "traits": { "smithy.api#documentation": "The parameters controlling the text generation sampling strategy.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SaveStateConfig": { "type": "structure", "members": { "description": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "A human-readable description for the saved state checkpoint.
", "smithy.api#length": { "max": 1024 } } } }, "traits": { "smithy.api#documentation": "The configuration for saving full training state, including model weights and optimizer state. Use this to create resumable checkpoints.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SaveStateResult": { "type": "structure", "members": { "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package created for the saved state checkpoint.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The result of saving full training state.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SaveWeightsConfig": { "type": "structure", "members": { "mergeWeights": { "target": "smithy.api#Boolean", "traits": { "smithy.api#documentation": "Specifies whether to merge LoRA adapter weights into the base model before saving. When true, the saved checkpoint contains the full merged model weights.
" } }, "description": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "A human-readable description for the saved checkpoint.
", "smithy.api#length": { "max": 1024 } } } }, "traits": { "smithy.api#documentation": "The configuration for saving model weights as a checkpoint.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SaveWeightsResult": { "type": "structure", "members": { "modelPackageArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "The ARN of the model package created for the saved weights.
" } } }, "traits": { "smithy.api#documentation": "The result of saving model weights.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#SequenceNumber": { "type": "integer", "traits": { "smithy.api#range": { "min": 1 } } }, "com.amazonaws.sagemakertrainingsessionruntime#StopReason": { "type": "enum", "members": { "STOP": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "stop" } }, "LENGTH": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "length" } } } }, "com.amazonaws.sagemakertrainingsessionruntime#StopSequenceList": { "type": "list", "member": { "target": "smithy.api#String" } }, "com.amazonaws.sagemakertrainingsessionruntime#TensorData": { "type": "structure", "members": { "data": { "target": "smithy.api#Document", "traits": { "smithy.api#documentation": "The raw tensor data as JSON. The format is determined by the dtype field: integer arrays for int64, floating-point arrays for float32.
The data type of the tensor elements, such as int64 or float32.
The dimensions of the tensor, such as [batch_size, seq_length].
" } } }, "traits": { "smithy.api#documentation": "A tensor with data, data type, and shape metadata.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMap": { "type": "map", "key": { "target": "smithy.api#String" }, "value": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TensorData" } }, "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMapList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TensorDataMap" }, "traits": { "smithy.api#documentation": "List of TensorDataMap \u2014 represents per-datum loss function outputs.\nEach element is a map of tensor names to TensorData for one datum in the batch." } }, "com.amazonaws.sagemakertrainingsessionruntime#ThrottlingException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The request was throttled. Retry the request after a brief wait using exponential backoff.
", "smithy.api#error": "client", "smithy.api#httpError": 429 } }, "com.amazonaws.sagemakertrainingsessionruntime#TokenLogprob": { "type": "structure", "members": { "tokenId": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The vocabulary token ID.
", "smithy.api#required": {} } }, "logprob": { "target": "smithy.api#Double", "traits": { "smithy.api#documentation": "The log-probability of the token.
", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The log-probability for a single token.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#TokenLogprobList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TokenLogprob" } }, "com.amazonaws.sagemakertrainingsessionruntime#TopkPromptLogprobsList": { "type": "list", "member": { "target": "com.amazonaws.sagemakertrainingsessionruntime#TokenLogprobList" } }, "com.amazonaws.sagemakertrainingsessionruntime#TrainingSessionName": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 64 }, "smithy.api#pattern": "^[a-zA-Z0-9-]+$" } }, "com.amazonaws.sagemakertrainingsessionruntime#TrainingTokenUsage": { "type": "structure", "members": { "trainingTokens": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "The number of training tokens consumed by the operation.
" } } }, "traits": { "smithy.api#documentation": "The token usage statistics for training operations.
" } }, "com.amazonaws.sagemakertrainingsessionruntime#ValidationException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "The request is not valid. Check the request syntax and parameters. Examples include invalid sequence numbers, malformed client tokens, missing required fields, or invalid operation configuration.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } } } }