Deploying Amazon Ergo-1.0 in production forces a clear architectural fork. You can consume the managed endpoint on Amazon Bedrock (3.00/M output, >400 tok/s on AWS Trainium) or pull the open weights from Hugging Face under the Amazon Ergo Open-Weights License and run your own vLLM or SGLang inference cluster.
This runbook covers both paths: IAM-scoped Bedrock Converse calls with tool-calling loops, memory math for the 1.1T MoE footprint, and self-hosted vLLM/SGLang deployment.
Bedrock Managed Path vs. Self-Hosted vLLM/SGLang
| Dimension | Amazon Bedrock (Managed) | Self-Hosted vLLM / SGLang |
|---|---|---|
| Hardware Required | None (AWS Trainium managed) | Multi-GPU (e.g. 8x H200 / B200 or multi-node H100) |
| Weight Memory | Abstracted | ~1.1 TB (FP8) or ~550 GB (4-bit) + KV cache |
| Throughput | >400 tok/s out of the box | Depends on TP/EP interconnect (NVLink / EFA) |
| Data Privacy | Zero data retention; PrivateLink VPC | 100% air-gapped inside your cluster |
| Pricing Model | 3.00/M output | Fixed instance $/hr regardless of utilization |
Context-Window Memory Math for Self-Hosting
A common sizing mistake with sparse MoE models is confusing active FLOPs with resident VRAM. Although Ergo-1.0 executes only 55B parameters per token, all 1.1T parameters must stay resident in GPU HBM across your cluster:
- FP8 weights (1 byte/param): ~1.1 TB raw weights across GPUs. An 8x H200 (141 GB each = 1,128 GB total) barely fits FP8 weights with almost zero room for KV cache; in practice, FP8 serving requires 2x 8-GPU nodes (16x H100/H200) or 8x B200 (192 GB/GPU = 1,536 GB).
- 4-bit quantized weights (AWQ/GPTQ/FP4): ~550 GB raw weights, fitting cleanly onto a single 8x H200 (1,128 GB) or 8x H100 80GB (640 GB) node with headroom for KV cache.
- KV cache at 1M context: Keep
--max-model-lenbounded to your actual workload ceiling (for example,131072or262144tokens) unless you have dedicated multi-node HBM capacity for 1M-token concurrent prefixes.
Step-by-Step Deployment
Step 1: Call Amazon Ergo-1.0 via the Bedrock Converse API
Verify your AWS CLI and boto3 SDK are current, enable the Amazon Ergo-1.0 model access in your target Region, and use a cross-Region inference profile (us.amazon.ergo-1-0-v1:0) so Bedrock routes traffic across available Trainium capacity while preserving zero data retention.
import boto3
client = boto3.client("bedrock-runtime", region_name="us-east-1")
tools = [
{
"toolSpec": {
"name": "run_tests",
"description": "Execute unit tests for a repository path and return exit code and output.",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"path": {"type": "string", "description": "Target test directory or file"}
},
"required": ["path"],
}
},
}
}
]
response = client.converse(
modelId="us.amazon.ergo-1-0-v1:0",
messages=[
{
"role": "user",
"content": [{"text": "Inspect tests/unit/ and fix any failing assertions."}],
}
],
toolConfig={"tools": tools},
inferenceConfig={"maxTokens": 8192, "temperature": 0.1},
)
print(response["output"]["message"])For production VPCs, attach an Interface VPC Endpoint for com.amazonaws.<region>.bedrock-runtime so payloads never traverse the public internet.
Step 2: Launch Self-Hosted vLLM with Tensor and Expert Parallelism
If your compliance boundary requires self-hosting the Hugging Face checkpoint (amazon-fmr/ergo-1.0-fp8 or quantized 4-bit variant), start vLLM with Expert Parallelism (`--enable-expert-parallel`) alongside Tensor Parallelism so MoE all-to-all routing stays over NVLink rather than saturating host PCIe.
vllm serve amazon-fmr/ergo-1.0-fp8 \
--host 0.0.0.0 \
--port 8000 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--quantization fp8 \
--kv-cache-dtype fp8 \
--max-model-len 262144 \
--gpu-memory-utilization 0.92 \
--enable-auto-tool-choice \
--tool-call-parser ergoIf you prefer SGLang for prefix-heavy agentic loops (where consecutive turns reuse 90%+ of the repository system prompt), enable RadixAttention prefix caching:
python3 -m sglang.launch_server \
--model-path amazon-fmr/ergo-1.0-fp8 \
--tp 8 \
--ep-size 8 \
--context-length 262144 \
--mem-fraction-static 0.90 \
--host 0.0.0.0 \
--port 30000Step 3: Wire a Bounded Tool-Calling Agent Loop
Whether hitting Bedrock or self-hosted vLLM, wrap Ergo-1.0 in a bounded loop that enforces max turns, max output tokens per turn, and prefix-cache reuse so an agent cannot burn 128K output tokens on a stuck retry.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
def run_agent_turn(messages, tools, max_turns=12):
for turn in range(max_turns):
resp = client.chat.completions.create(
model="amazon-fmr/ergo-1.0-fp8",
messages=messages,
tools=tools,
max_tokens=16384,
temperature=0.0,
)
msg = resp.choices[0].message
messages.append(msg)
if not msg.tool_calls:
return msg.content
for call in msg.tool_calls:
result = execute_tool(call.function.name, call.function.arguments)
messages.append({
"role": "tool",
"tool_call_id": call.id,
"content": result,
})
raise RuntimeError(f"Agent exceeded max_turns={max_turns} without converging")Verification Checklist
- Bedrock IAM & Region Check: Confirm
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamare scoped to the cross-Region inference profile ARN and VPC endpoint policy. - KV-Cache Headroom: On self-hosted nodes, watch
vllm:gpu_cache_usage_percunder load; if prefix eviction spikes above 80%, lower--max-model-lenor add a second 8-GPU node. - Cost Guardrails: Log
usage.prompt_tokensandusage.completion_tokensper agent run so a runaway loop triggers circuit-breaker alerts before hitting the 128K output cap.
