ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念

Bringing in models built outside AWS

Host an outside model with SageMaker AI, or import its weights into Bedrock.

本课尚未翻译,暂以英文显示。

  • SageMaker AI

    You bring
    model.tar.gz in S3 and a container
    How it runs
    An endpoint you size, any framework
  • Bedrock Custom Model Import

    You bring
    Hugging Face weights in S3, supported architecture
    How it runs
    On demand through InvokeModel
Two routes for a model built elsewhere.
Model built outside AWS
Convert to Hugging Face format
Weights in S3
Import job
Imported model
InvokeModel
  1. 1The model comes from outside AWS.
  2. 2Convert it to safetensors with config and tokenizer files if needed.
  3. 3Upload the files to S3.
  4. 4Run a Custom Model Import job.
  5. 5Call the imported model with InvokeModel.
Importing weights into Bedrock, from file to call.

分步说明

  1. 1The model comes from outside AWS.
  2. 2Convert it to safetensors with config and tokenizer files if needed.
  3. 3Upload the files to S3.
  4. 4Run a Custom Model Import job.
  5. 5Call the imported model with InvokeModel.

是什么

For SageMaker AI, package the trained model as a model.tar.gz in Amazon S3. Put the model files at the root and any inference script under a code folder. A prebuilt framework container (PyTorch, TensorFlow, scikit-learn) loads the model with your handler functions. If no prebuilt container fits, use your own image. Then create the model, the endpoint configuration and the endpoint as usual. This works for any framework and any size you can fit on an instance.

是什么

Amazon Bedrock Custom Model Import brings open-weight models into Bedrock. The weights must be in Hugging Face format: safetensors files, config.json and the tokenizer files, in S3. The architecture must be supported, for example Llama, Mistral, Mixtral, Qwen, Flan-T5 or GPT-OSS. Text models can be up to 200 GB, and the context length must be under 128K. An import job creates the model. You call it with InvokeModel, with no Provisioned Throughput. Bedrock bills by model copies in 5-minute windows after the first call.

是什么

Format conversion is often the real work. Convert original Llama or Mistral weights with the Hugging Face conversion scripts, and convert older checkpoint files to safetensors. Embedding models are not supported. Custom Model Import works in a few Regions, and not with batch inference or CloudFormation.

要记住

  • SageMaker AI: model.tar.gz in S3, a prebuilt or own container, any framework.
  • Bedrock Custom Model Import: Hugging Face weights in S3, a supported architecture.
  • Needs safetensors, config.json and tokenizer files. Text models up to 200 GB.
  • Invoke with InvokeModel on demand. Billing is by model copies in 5-minute windows.

要记住

  • Not supported: embedding models, batch inference, CloudFormation.

考试中

  • “Use a PyTorch model trained on premises with no changes to its framework” points to SageMaker AI hosting with a prebuilt container.
  • “Serve a fine-tuned Llama model through the Bedrock API” points to Bedrock Custom Model Import.
  • “Weights are in the original checkpoint format” points to converting them to Hugging Face safetensors first.