Repository navigation
In MLCC v2.0.0, deployment targets are now chosen and managed at deploy time, MLCC consumes clusters you already run instead of provisioning them, and one contract governs how adapters and fine-tuned models are added to a live deployment. Fine-tuning gains a capability-aware model picker, per-technique hyperparameter UX, user-authored do/train techniques and a HyperPod EKS compute backend. Deploys are checked for GPU memory fit before anything is created, benchmarks carry real engine and GPU metrics with Price List API cost, and real-time endpoints can opt in to scale-to-zero. If you are upgrading from 1.x, start with Upgrading to v2.
Highlights
- Right-sizing before deploy.
./do/deploy,./do/deploy --dry-runand./do/validateestimate weights + KV cache + LoRA buffer + draft model against GPU memory and stop a deploy that cannot fit, in seconds instead of after a failed health check. - Three verbs for adding a model to a live deployment.
./do/adapter(LoRA),./do/add-ic(full model onrealtime-inference) and the new./do/add-pod(full model onhyperpod-eks), all with the same--from-tune,--from-train,--from-weightsand--from-registrysources. - LoRA hot-load from S3 on Kubernetes.
./do/adapteronhyperpod-eksandeksnow delivers adapters the way vLLM can load them, raisesmax_lora_rankto fit your adapters, and stores each adapter under a versioned, content-addressed S3 prefix. - Train on your HyperPod cluster.
./do/train --backend hp-eksand./do/tune --backend hp-eksrun single-node HyperPodPyTorchJobs, with a read-only cluster contract and a per-profile training role bound by EKS Pod Identity. - Bring-your-own plain EKS.
./do/deploy --target eksvalidates the cluster before applying and benchmarks with the same profiles and Athena rows as the SageMaker targets. - Serving metrics and real cost. Benchmark rows carry GPU utilization, KV cache, queue depth and error rate from CloudWatch or Amazon Managed Service for Prometheus. The new
./do/metricsprints a live readout. Cost per 1M tokens comes from the AWS Price List API, with a Bedrock comparison for verified equivalents. - Scale-to-zero (opt-in).
./do/deploy --scale-to-zero onfor real-time endpoints with inference components, with an honest warning about the ~12 minute wake-up. - Fine-tuning UX. The generation model picker shows which managed techniques each model supports,
do/tuneprompts for each technique's real hyperparameters, anddo/trainaccepts your own technique plugins.
New features
Deployment
Plain EKS as a bring-your-own target. ./do/deploy --target eks checks pod identity, the CSI driver and the volume backing a model mount before applying anything, and stops with the fix when the cluster does not meet the contract. Large models get a PVC / S3-CSI mount path with an ephemeral-storage check. ./do/benchmark on eks runs AIPerf locally against the port-forwarded pod (pip install aiperf). Deployment & Inference
do/add-pod and the additive-deploy contract. The artifact kind picks the verb and the target picks the load mechanism. ./do/add-pod <name> --from-tune|--from-train|--from-weights s3://...|--from-registry <arn> serves a full fine-tuned model as a second InferenceEndpointConfig next to the base deployment, with --instance-group, --surge-node, --list, --status <name> and --remove <name>. A verb used on the wrong target exits 3 and names the right one. Adding models to a live deployment
Kubernetes LoRA delivery. ./do/adapter on hyperpod-eks and eks promotes adapters to a canonical home in the core bucket and hot-loads them through a path vLLM can read. The serving max_lora_rank is derived from your adapters (capped by a GPU memory budget), and do/adapter checks the rank before loading. ./do/adapter --from-tune and --from-registry now work on Kubernetes targets. Fine-Tuning
Versioned adapter prefixes. Each adapter version lives under <adapter-home>/v<hash12>/. Identical content is a no-op; new content gets a new version. On realtime-inference, ./do/adapter update points the inference component at the new ArtifactUrl; on Kubernetes it unloads and reloads the new path on every pod. Existing unversioned adapters keep working.
Scale-to-zero for real-time endpoints. ./do/deploy --scale-to-zero on --scale-max <n> registers each inference component for scaling between 0 and n copies, wakes on the first failed request, and tears everything down in the right order on ./do/clean. Use --reconfigure to turn it on or off on a live endpoint and --dry-run to preview the plan. While at zero, requests fail for several minutes (measured mean 11.9 minutes), so it is not for interactive SLAs. Other targets refuse the flag with the reason. Scale-to-Zero
HyperPod capacity check. Before applying on hyperpod-eks, ./do/deploy checks free GPUs and free pod slots, including the Mountpoint-S3 pod an S3-mounted model needs. A first deploy stops when no node has a pod slot; a GPU shortage only warns. When a rollout cannot schedule, it prints the --surge-node command. Troubleshooting
Fine-tuning and training
Capability-aware model picker. At generation, managed-capable models from the tune catalog are listed with badges for the techniques they support (SFT, DPO, RLAIF, RLVR, MTRL) and a legend, alongside the serving models. npm run sync:models refreshes both.
Per-technique tune configuration. Each technique has a descriptor (templates/code/tune.d/<technique>/manifest.json) synced from the SageMaker recipe override parameters. ./do/tune prompts for that technique's real knobs, --set KNOB=VALUE is validated against them, and --advanced also prompts the advanced-tier knobs. The managed-RL dataset contract means a dataset from ./do/register dataset is accepted by do/tune RLVR/RLAIF jobs without manual reshaping. Fine-Tuning
do/train technique plugins. Drop a do/training/<technique>/manifest.json (a Train_Descriptor) next to your training script and ./do/train -i builds an interactive hyperparameter UI from it (--advanced adds the advanced tier), and --set KNOB=VALUE works without prompts. A worked sample ships in examples/train-plugins/sft-neftune. Authoring do/train Techniques, Walkthrough
HyperPod EKS compute backend. ./do/train --backend hp-eks and ./do/tune --backend hp-eks run a single-node HyperPodPyTorchJob on your hyperpod-eks cluster; SageMaker training jobs (smtj) stay the default. A read-only cluster contract checks the training operator, pod identity, scratch volume, free GPUs and (optionally) the Kueue queue, and exits 4 with the owner's fix. do/tune on hp-eks runs AWS's published HyperPod recipe for SFT and DPO; --adapt-shape (experimental) fits 8-GPU recipes to smaller instance groups, and --render-only stages data and writes the manifest without applying. Custom Training, Fine-Tuning on HyperPod EKS
MLflow per-project experiments. With an MLflow App on the profile, each project logs to its own experiment, and do/tune and do/train both log there. Datasets and reward prompts are recorded in MLflow's own Datasets and prompt registry. Models and adapters register through the native MLflow to SageMaker Model Registry bridge, one registered model per project. Bootstrap: MLflow
Observability, benchmarking and cost
Real engine and GPU metrics. Every benchmark row carries GPU utilization, KV-cache usage, queue depth, prefix-cache hit rate and error_rate for the measured load window of each concurrency level. Sources: SageMaker AI detailed observability (CloudWatch PromQL) on realtime-inference and the HyperPod observability add-on's Amazon Managed Service for Prometheus workspace on hyperpod-eks. A signal with no samples is NULL, never 0. Benchmarking: GPU & Engine Metrics
do/metrics. ./do/metrics [--window <minutes>] [--target <t>] [--json] prints server-side TTFT and end-to-end latency p50/p99, queue, KV cache, GPU utilization and (realtime) per-copy concurrency, plus a pointer to the native dashboard. Live readout
Cost per 1M tokens from the Price List API. Prices resolve from a 24-hour project cache, the AWS Price List API, then a dated snapshot, and are labelled with the concurrency they were measured at. A Bedrock on-demand comparison appears only for models with a live-verified Bedrock equivalent in the run's region. Cost and Bedrock comparison
Richer benchmark schema. AIPerf aggregate metrics (effective and active throughput, effective concurrency, tokens in flight, effective latency), aiperf_version, speculative-decoding acceptance and the cost inputs are stored. The Glue table now has 93 data columns plus the model, instance and target partition keys.
Operator surface
Right-sizing preflight. One right-sizing module runs in ./do/deploy, ./do/deploy --dry-run and ./do/validate: KV cache + weights (+ LoRA buffer, draft model) vs GPU memory, context limit, tensor parallelism, dtype vs GPU architecture, LoRA rank, IC packing, disk and Service Quotas. It blocks only when the estimate clearly exceeds usable memory and prints the computed fix. --ignore-sizing overrides a block; --force does not. Right-Sizing Checks
do/validate for every target. ./do/validate runs the checks that apply to the configured target (right-sizing, config consistency, cluster contract, SageMaker payload shapes) and prints one report. Pre-Deploy Validation
do/export round trip. ./do/export reads do/config at runtime, so later edits are exported. --json writes schema parameter keys that load back with ml-container-creator --config; --notebook writes a Jupyter notebook; --target exports one target. Exporting the project
Bootstrap
Standalone eks module. EKS is its own bootstrap module, independent of HyperPod. A stack stuck in UPDATE_ROLLBACK_FAILED is recovered automatically, or MLCC prints the exact aws cloudformation continue-update-rollback command. Bootstrap
CloudFormation-owned buckets. Every MLCC bucket is declared once and owned by its stack. bootstrap update and bootstrap add-module bring existing buckets under CloudFormation through a verified import change set; --dry-run shows, per bucket, whether it is owned, will be imported or will be created. --module accepts a comma-separated list. S3 layout
HyperPod training role. The training module creates mlcc-hp-train-role-<region> for EKS Pod Identity, exported to projects as MLCC_HP_TRAIN_ROLE_ARN.
Improvements
- The instance-sizer now sizes uncatalogued and multimodal Hugging Face models from the HF Hub safetensors total and
text_config, and returns an explicit error (pass--instance-type) when a size cannot be found. - KV cache is budgeted for the context the engine will actually serve (your requested length, else the smaller of the model maximum and the engine default), so small models no longer get oversized recommendations.
do/deploy's interactive instance recommendation uses the instance-sizer's response instead of a built-in heuristic.- The inference AMI is chosen at deploy time from the instance family. The generation-time CUDA prompt is gone; an explicit
INFERENCE_AMI_VERSIONindo/configstill wins. do/registeranddo/benchmarksurface helper failures that were previously swallowed.do/scripts that need a bucket missing from the active profile name the bootstrap module that provides it.mcc regeneratepreserves engine variables oneksand the new scale-to-zero and training variables.- The npm package ships the bootstrap CDK app, so
ml-container-creator bootstrapworks from a global install. - A test scans every shell template for bash-4-only syntax, so
do/scripts keep running on the macOS default bash 3.2.
Bug fixes
Deployment
- Real-time and async deploys on
ml.g7*,ml.g7e*andml.p6-b*used an inference AMI AWS does not list for those families. They now getal2023-ami-sagemaker-inference-gpu-4-1. - Every new inference-component real-time deploy failed on an invalid
--container-metrics-configflag (1.7.0 to 1.9.x). - Real-time, async and batch deploys wrote a resolved
HF_TOKEN/ NGC key in plaintext into the SageMaker container environment. Secrets are now passed by ARN. hyperpod-eksdeploys onto a node with free GPUs but no free pod slots left the Mountpoint-S3 pod unschedulable.- LoRA hot-load from
s3://on Kubernetes returned "No adapter found"; vLLM loads only local paths. - The serving default
max_lora_rank(16) was below every managed-tune adapter rank (32/64).
Fine-tuning and training
do/trainon ahyperpod-eksproject submitted a Kubernetes Job that never ran.do/tuneshipped empty hyperparameter descriptors, so interactive prompting did nothing and--setrejected every knob.do/tuneinteractive prompting failed on an undeclaredquestionarydependency.do/tuneoffered recipe knobs the managed trainer rejects.do/tuneRFT input guards failed with "bad substitution" on macOS bash 3.2.do/register dataset --hf-idcould not read a single JSON-array file, and dataset names with underscores were rejected by AI Registry with the error hidden.do/register dataset --deletenever soft-deleted MLflow runs.- Tuned adapters registered through the bridge were not linked to their base model.
Benchmarking and sizing
- GPU and engine Athena columns were never populated (wrong PromQL path, metric names and window),
error_ratewas always 0, and cost used a stale, region-blind price table. - Benchmark rows for a real-time endpoint could be labelled with another target.
- The instance-sizer returned no recommendation, without a warning, for multimodal models such as
Qwen/Qwen3.5-4B. - The model catalog listed a placeholder draft model and the wrong architecture for gpt-oss.
Security
- The adapter sidecar now confines adapter paths and proxies only an allow-list of routes.
Breaking changes and upgrade steps
Full details: Upgrading to v2.
-
Install v2 and the Python dependencies the
do/scripts use:npm install -g @aws/ml-container-creator@2.0.0 uv pip install -r "$(npm root -g)/@aws/ml-container-creator/requirements.txt" -
Update your bootstrap stacks. Roles pick up new permissions (MLflow to Model Registry bridge on
core, the HyperPod training role ontraining), and existing buckets are imported into their stacks:ml-container-creator bootstrap update --dry-run ml-container-creator bootstrap update
-
Migrate the benchmark table if you use the
benchmarkmodule. Until you do, new columns are written but Athena does not show them:ml-container-creator bootstrap update --module benchmark --dry-run # shows the column diff ml-container-creator bootstrap update --module benchmark -
Regenerate each project from its directory. Deploy state and runtime-owned
do/configvalues are kept:mcc regenerate --dry-run mcc regenerate
-
Move plaintext tokens to Secrets Manager.
./do/deployexits 3 whenHF_TOKEN/NGC_API_KEYis set without a matching*_ARN. Store the token and deploy by reference;--allow-plaintext-secretis the explicit opt-out. Endpoints deployed by earlier releases may still carry a plaintext token: Secrets explains how to check and rotate.ml-container-creator secrets create --type hf-token --name production --secret-value hf_*** mcc bootstrap add-secret hfToken <secret-arn> ./do/deploy
-
Expect the right-sizing preflight. A deploy that clearly cannot fit GPU memory now stops before creating anything. Fix the configuration it reports, or pass
--ignore-sizing. Check ahead of time with./do/deploy --dry-run. -
Pick a training backend.
do/trainanddo/tunedefault to SageMaker training jobs on every target. Onhyperpod-eks, pass--backend hp-eksto train on the cluster, after the one-time training identity setup below. -
Provision HyperPod clusters outside MLCC.
bootstrap add-module hyperpodno longer provisions. Use the SageMaker console Quick Install or the AWS CloudFormation templates, then./do/deploy --target hyperpod-eks. -
Drop
--deployment-targetfrom generation scripts and choose the target with./do/deploy --target <t>. (Deprecated since 1.x; restated here for users upgrading from earlier releases.jumpstart://model names are likewise refused: use a Hugging Face ID,s3://orregistry://.)
IAM / permissions changes
Operator policy (docs/MLCC_OPERATOR_POLICY_STATEMENT.json):
- The operator policy statement ships in the repo for the first time. It grants no
iam:DeleteRolePolicyon*and no IAM write access torole/cdk-*; IAM writes are limited torole/mlcc-*and the CodeBuild service roles. EKSAccessaddseks:ListPodIdentityAssociationsandeks:DescribePodIdentityAssociation.- New
IAMSimulateTrainingRoles:iam:SimulatePrincipalPolicyonrole/mlcc-*androle/*-s3csi-*.
Cluster owner, once per cluster (for --backend hp-eks), after ml-container-creator bootstrap update --module training:
aws eks create-pod-identity-association --cluster-name <eks-cluster> --namespace <namespace> \
--service-account mlcc-train-sa --role-arn <MLCC_HP_TRAIN_ROLE_ARN> --region <region>The contract prints this command with your values.
Roles created by bootstrap:
coreexecution role:sagemaker:UpdateModelPackage,sagemaker:CreateAction,sagemaker:AddAssociation(Model Registry bridge), and Secrets Manager read onmlcc-hf-token-*.training: newmlcc-hp-train-role-<region>, trusted bypods.eks.amazonaws.com. The unusedmlcc-training-roleis removed.ciCodeBuild role:pricing:GetProducts,glue:GetPartition,glue:UpdatePartition.
Caller permissions for new features:
- Scale-to-zero: Application Auto Scaling register/deregister and policy actions,
cloudwatch:PutMetricAlarm/DeleteAlarms, andiam:CreateServiceLinkedRoleonce per account. Details - Metrics and cost (read-only; a missing permission leaves columns NULL with a warning):
cloudwatch:GetMetricData,cloudwatch:ListMetrics,aps:QueryMetrics,sagemaker:DescribeCluster,eks:DescribeAddon,sagemaker:DescribeAIBenchmarkJob,grafana:ListWorkspaces,pricing:GetProducts,sagemaker:DescribeEndpoint,glue:GetPartition,glue:UpdatePartition. Details
Deprecations and removals
| Item | Status | Replacement |
|---|---|---|
bootstrap add-module hyperpod (cluster provisioning) |
Deprecated; refuses without --force, hidden from the picker |
Console Quick Install or AWS CloudFormation templates; bootstrap remove-module hyperpod still removes existing installs |
do/train Kubernetes batch/v1 Job on hyperpod-eks |
Removed | ./do/train --backend hp-eks |
| Generation-time CUDA version prompt | Removed | Inference AMI resolved at deploy time per instance family |
| Hardcoded instance price table | Removed | AWS Price List API with a dated snapshot fallback |
mlcc-training-role |
Removed from the training stack |
None needed |
--deployment-target at generation |
Deprecated (since 1.x) | ./do/deploy --target <t> |
Known limitations
- Scale-to-zero is real-time only. Async is planned. Inference components added later with
./do/add-icare not registered, so they keep the endpoint above zero (v2 prints a notice)../do/statusshows1/0GPU usage at zero instances. - MTRL is not runnable yet (no catalog model advertises MTRL recipes).
do/tune --backend hp-ekssupports SFT and DPO on AWS'sverlrecipe family. RLVR/RLAIF need KubeRay and are planned post-2.0.--adapt-shapeis experimental and not supported by AWS.- Plain
ekshas no verb for adding a full model yet (planned post-2.0). - LoRA adapters on Kubernetes do not survive pod restarts or new replicas; reload them with
./do/adapter.max_lora_rankderivation is Kubernetes-only; real-time uses the engine default. mcc regenerateoverwrites editeddo/training/config.yamlanddefaults.yaml, dropsdo/tuneoutput pointers fromdo/config, and--no-registerstill runsdo/register. Back up those files before regenerating.--from-trainresolves an unknown artifact kind becausedo/traindoes not record its output type.- Model Registry bridge packages show
mlflow.lineage_status = failed. - Generation pip-installs the project requirements into the Python on your
PATH.
Validation status
Everything in this release passes the offline test suite (lint, mocha, node:test, property tests, full pytest, CDK tests). The following were also validated against live AWS resources: serving metrics, do/metrics, cost and the benchmark schema; the real-time endpoint-config fix; the operator policy; managed tuning with SFT, DPO, RLAIF and RLVR; the MLflow to Model Registry bridge; Kubernetes LoRA delivery from S3 (by hand); and the bucket import (one account). Plain-EKS deploys, scale-to-zero, the HyperPod EKS training backend, do/add-pod, do/train plugins and the right-sizing preflight inside a real deploy are tested offline and have not yet had a live run. Please report anything you hit on GitHub Issues.
Upgrade
npm install -g @aws/ml-container-creator@2.0.0
uv pip install -r "$(npm root -g)/@aws/ml-container-creator/requirements.txt"
ml-container-creator bootstrap update --dry-run
ml-container-creator bootstrap update
ml-container-creator bootstrap update --module benchmark # if you use the benchmark module
# In each existing project:
mcc regenerate --dry-run
mcc regenerateSee Breaking changes and upgrade steps above and Upgrading to v2.