Loading...
Loading...
Compare original and translation side by side
hf-cloud-aws-context-discoveryhf-cloud-python-env-setuphf-cloud-sagemaker-iam-preflighthf-cloud-serving-image-selectionhf-cloud-sagemaker-production-defaultshf-cloud-aws-context-discoveryhf-cloud-python-env-setuphf-cloud-sagemaker-iam-preflighthf-cloud-serving-image-selectionhf-cloud-sagemaker-production-defaults-embed-*BAAI/bge-sentence-transformers/*hf-cloud-aws-context-discovery-embed-*BAAI/bge-sentence-transformers/*hf-cloud-aws-context-discovery| Pathway | When it fits | When it does not |
|---|---|---|
| Real-time endpoint | Steady traffic, sub-second to few-second latency, always-on | Very spiky or very sparse traffic (wastes money on idle) |
| Serverless inference | Spiky/intermittent, tolerates cold starts (~10s+), simpler models | LLMs above a few B params (memory/cold-start limits), strict SLAs |
| Async inference | Long inference (>60s), large payloads, queue-friendly | Interactive synchronous calls |
| Batch transform | Offline scoring over a dataset | Anything online or interactive |
| Bedrock Custom Model Import | Wants Bedrock-compatible API, supported base family, weights only | Custom inference logic, unsupported architectures |
hf-cloud-serving-image-selectionhf-cloud-sagemaker-production-defaultsdeploy_async.py| 路径 | 适用场景 | 不适用场景 |
|---|---|---|
| 实时端点 | 流量稳定、延迟在亚秒到数秒之间、需要持续在线 | 流量波动极大或非常稀疏(空闲时会浪费成本) |
| 无服务器推理 | 流量波动/间歇性、可容忍冷启动(约10秒以上)、模型较简单 | 参数超过数十亿的LLM(受内存/冷启动限制)、有严格服务级别协议(SLA) |
| 异步推理 | 推理时间较长(>60秒)、负载较大、适合队列处理 | 交互式同步调用 |
| 批量转换 | 对数据集进行离线评分 | 任何在线或交互式场景 |
| Bedrock Custom Model Import | 需要兼容Bedrock的API、支持的基础模型系列、仅需权重文件 | 自定义推理逻辑、不支持的模型架构 |
hf-cloud-serving-image-selectionhf-cloud-sagemaker-production-defaultsdeploy_async.pyResourceLimitExceededaws service-quotas list-service-quotas --service-code sagemaker --region <region> \
--query "Quotas[?contains(QuotaName, 'for endpoint usage') && Value > \`0\`].[QuotaName, Value]" \
--output tableml.g5.*ml.g6.*hf-cloud-serving-image-selectionml.g6e.*Based on what you've told me, I'd recommend a real-time endpoint on. The model is small enough that this is cost-effective, and your traffic pattern is steady enough that you won't be paying for idle. Alternative: serverless would be cheaper if traffic dries up for hours at a time, but Qwen3-0.6B is at the edge of serverless memory limits and cold starts would be 15–30s. Want me to proceed with the real-time endpoint?ml.g5.xlarge
plan.yamlResourceLimitExceededaws service-quotas list-service-quotas --service-code sagemaker --region <region> \
--query "Quotas[?contains(QuotaName, 'for endpoint usage') && Value > \`0\`].[QuotaName, Value]" \
--output tableml.g5.*ml.g6.*hf-cloud-serving-image-selectionml.g6e.*根据你提供的信息,我推荐使用实例创建实时端点。该模型足够小,因此此方案具有成本效益,且你的流量模式稳定,不会为空闲资源付费。备选方案:如果流量会连续数小时中断,无服务器选项成本更低,但Qwen3-0.6B已接近无服务器内存限制,冷启动时间会达到15–30秒。是否要继续使用实时端点方案?ml.g5.xlarge
plan.yaml