AWS nova documentation change
Summary
Added a sample recipe configuration for CPT training on Nova 2.0, including run parameters, training configs, optimizer settings, and scheduler details.
Security assessment
The changes provide a technical configuration example for training jobs without addressing security vulnerabilities, access controls, or data protection mechanisms. No security-related parameters or warnings were added.
Diff
diff --git a/nova/latest/nova2-userguide/nova-cpt-2.md b/nova/latest/nova2-userguide/nova-cpt-2.md index 42c376039..15f3b4fcf 100644 --- a//nova/latest/nova2-userguide/nova-cpt-2.md +++ b//nova/latest/nova2-userguide/nova-cpt-2.md @@ -12,0 +13,47 @@ CPT on Nova 2.0 allows you to extend these advanced capabilities with your domai +The following is a sample recipe for CPT. You can find this recipe and others in the [ recipes](https://github.com/aws/sagemaker-hyperpod-recipes/tree/main/recipes_collection/recipes/training/nova) repository. + + + # Note: + # This recipe can run on p5.48xlarge + # Run config + run: + name: "my-cpt-run" # A descriptive name for your training job + model_type: "amazon.nova-2-lite-v1:0:256k" # Model variant specification, do not change + model_name_or_path: "nova-lite-2/prod" # Base model path, do not change + replicas: 8 # Number of compute instances for training, allowed values are 4, 8, 16, 32 + data_s3_path: "" # Customer data paths + validation_data_s3_path: "" # Customer validation data paths + output_s3_path: "" # Output artifact path, job-specific configuration - not compatible with standard SageMaker Training Jobs + mlflow_tracking_uri: "" # Required for MLFlow + mlflow_experiment_name: "my-cpt-experiment" # Optional for MLFlow. Note: leave this field non-empty + mlflow_run_name: "my-cpt-run" # Optional for MLFlow. Note: leave this field non-empty + + ## Training specific configs + training_config: + task_type: cpt + max_length: 8192 # Maximum context window size (tokens) + global_batch_size: 256 # Global batch size, allowed values are 32, 64, 128, 256. + + trainer: + max_steps: 10 # The number of training steps to run total + val_check_interval: 10 # The number of steps between running validation. Integer count or float percentage + limit_val_batches: 2 # Batches of the validation set to use each trigger + + model: + hidden_dropout: 0.0 # Dropout for hidden states, must be between 0.0 and 1.0 + attention_dropout: 0.0 # Dropout for attention weights, must be between 0.0 and 1.0 + + optim: + optimizer: adam + lr: 1e-5 # Learning rate + name: distributed_fused_adam # Optimizer algorithm, do not change + adam_w_mode: true # Enable AdamW mode + eps: 1e-06 # Epsilon for numerical stability + weight_decay: 0.0 # L2 regularization strength, must be between 0.0 and 1.0 + adam_beta1: 0.9 # Beta1 for Adam optimizer + adam_beta2: 0.95 # Beta2 for Adam optimizer + sched: + warmup_steps: 10 # Learning rate warmup steps + constant_steps: 0 # Steps at constant learning rate + min_lr: 1e-6 # Minimum learning rate, must be lower than lr +