AWS sagemaker documentation change
Summary
Added SDK v3 implementation for creating foundation model endpoints using ModelBuilder
Security assessment
New code sample shows standard endpoint deployment. The 'accept_eula' parameter is a license agreement, not a security control. No security mechanisms or vulnerabilities addressed.
Diff
diff --git a/sagemaker/latest/dg/clarify-foundation-model-evaluate-auto-lib.md b/sagemaker/latest/dg/clarify-foundation-model-evaluate-auto-lib.md index de325e438..8a34a56d5 100644 --- a//sagemaker/latest/dg/clarify-foundation-model-evaluate-auto-lib.md +++ b//sagemaker/latest/dg/clarify-foundation-model-evaluate-auto-lib.md @@ -152,0 +153,23 @@ The following code example shows how create an endpoint for a [Llama 2 foundatio +SageMaker Python SDK v3 + + + import sagemaker + import json + from sagemaker.serve import ModelBuilder + from sagemaker.core.jumpstart.configs import JumpStartConfig + + #JumpStart model and version + model_id, model_version = "meta-textgeneration-llama-2-7b-f", "*" + + jumpstart_config = JumpStartConfig(model_id=model_id, accept_eula=True) + model_builder = ModelBuilder.from_jumpstart_config(jumpstart_config=jumpstart_config) + model = model_builder.build() + endpoint = model_builder.deploy() + endpoint_name = endpoint.endpoint_name + + # Test the endpoint to make sure it works. + response = endpoint.invoke(body=json.dumps({"inputs": [[{"role":"user", "content": "Hello how are you?"}]]})) + +SageMaker Python SDK v2 (Legacy) + +