立即在 Amazon Bedrock 上部署 Claude 3.5 Sonnet !更智能、更低成本!

89f4252b3a5d88986b4320c081cdaeb2.gif

Claude 3 是一系列极为先进的人工智能模型,可让您根据自己的需求,从智能、速度和成本方面考虑选择最适合的组合。距离 Anthropic 推出 Claude 3 仅过去 3 个月,Anthropic 在上周推出了 Claude 3.5 Sonnet ,这是它即将推出的 Claude 3.5 模型系列中的第一个版本。立即开始在 Amazon Bedrock 中使用 Claude 3.5 Sonnet 吧!

Claude 3.5 Sonnet 提高了智能行业门槛,在各种评估中的表现都优于其他生成式 AI 模型,包括 Anthropic 之前最智能的模型 Claude 3 Opus 。Claude 3.5 Sonnet 推出后,其速度和成本与最初的 Claude 3 Sonnet 模型的速度和成本相同。实际上,您现在以五分之一的价格就可以获得超越 Claude 3 Opus 的智能和速度,因为 Claude 3.5 Sonnet 比 Opus 便宜 80%。

4a7aeefa128d05ede098a7e9a3ad44f1.png

Claude 3.5 Sonnet 所展示出的前沿智能与具有成本效益的定价相结合,使该模型成为复杂任务的理想之选,例如提供上下文敏感的客户支持、编排多步工作流程和简化代码转换。

Claude 3.5 Sonnet 为本科级别专业知识( MMLU )、研究生级别专家推理( GPQA )、代码( HumanEval )等设定了新的行业基准。正如您在下表中所见,根据 Anthropic 的数据,Claude 3.5 Sonnet 在几乎所有基准测试中的表现都超过了 OpenAI 的 GPT-4o 和 Google 的 Gemini 1.5 Pro。

75892fc758955939f609733c2b354dbe.png

Claude 3.5 Sonnet 也是 Anthropic 迄今为止极强的视觉模型,在大多数视觉基准测试中,其表现平均超过 Claude 3 Opus 10% 。根据 Anthropic 的说法,Claude 3.5 Sonnet 在几乎所有类别中的表现也都优于其他生成式人工智能模型。

f933935edd1b5876f75a02a5f6ddf981.png

Claude 3.5 Sonnet 关键改进

Claude 3.5 Sonnet 的发布在多个领域带来了重大改进,通过新一代生成式 AI 能力为软件开发人员和企业赋能。以下是此新模型的一些关键优势:

  • 视觉处理和理解:Claude Sonnet 展示了处理图像的非凡能力,特别是在解释图表和图形方面。它可以准确地从不完美的图像中转录文本,这对于零售、物流和金融服务等领域客户尤为重要。在这些领域,生成式 AI 从图像、图形或插图中能获得比单纯文本中更多的洞察。通过使用 Claude 3.5 Sonnet ,可以自动执行可视化数据处理任务,提取有价值的信息并增强数据分析管道的能力。

  • 写作和内容生成:Claude 3.5 Sonnet 体现了其在理解细微差别和幽默的能力上的重大飞跃。该模型以更自然、更人性化的语气生成高质量的书面内容,让人感觉更真实、更贴切。使用该模型可生成引人入胜且令人信服的内容,简化写作工作流程,并提高讲故事的能力。

  • 客户支持和自然语言处理:Claude 3.5 Sonnet 对上下文的理解和多步工作流程编排的能力有大幅提升,擅长处理复杂的客户查询。此功能可实现全天候支持、更快的响应时间和更自然的互动,并最终提高客户满意度。使用此模型可自动化和增强客户支持流程,为最终用户提供无缝体验。

  • 分析和见解:Claude 3.5 Sonnet 通过轻松浏览非结构化数据并使用多种工具生成见解,增强了人类在数据科学领域的专业知识。它可以生成高质量的统计可视化和可操作的预测,涵盖了从业务策略到实时产品趋势的各种内容。使用 Claude 3.5 Sonnet 可简化数据分析工作流程,发现有价值的见解,并推动数据驱动的决策制定。

  • 编码和软件开发:Claude 3.5 Sonnet 在提供了相关工具的情况下,可通过其成熟的推理和故障排除功能,独立编写、编辑和执行代码。使用 Claude 3.5 Sonnet 可简化开发人员工作流程、加快编码任务的完成速度、减少手动工作并提高整体生产力。

在 Amazon Bedrock 上

使用 Claude 3.5 Sonnet

因为这是一个新模型,所以进入 Amazon Bedrock 控制台,从导航窗格中选择“模型访问权限”以启用对 Claude 3.5 Sonnet 的访问权限。

986c2d2b6f7a88bb98f2809638664b2d.png

现在可以访问模型了!

将 Claude 3.5 Sonnet

与 Amazon SDK 配合使用

您可以使用新的 Amazon Bedrock Converse API 或 Anthropic Claude Messages API ,将 Claude 3.5 Sonnet 与任何 Amazon SDK 配合使用。

21e9cc965466d54ae8acab7d3f042d7f.png

Amazon Bedrock 

Converse API

扫码了解更多

a63a13f995b181c41db7e2349878fb95.png

Anthropic Claude 

Messages API

扫码了解更多

左右滑动查看更多

要更新已经使用 Claude 3 模型的代码,我只需要将模型 ID 替换为:

anthropic.claude-3-5-sonnet-20240620-v1:0

‍左右滑动查看完整示意

以下是适用于 Python 的 Amazon SDK( Boto3 )的实施示例,展示了如何通过 Converse API 来使用图像和文本。

85cd2345117d86d5c34329a90c43e111.png

Amazon SDK 

for Python( Boto3 )

扫码了解更多

import boto3
from botocore.exceptions import ClientError


MODEL_ID = "anthropic.claude-3-5-sonnet-20240620-v1:0"


IMAGE_NAME = "primary-energy-hydro.png"


bedrock_runtime = boto3.client("bedrock-runtime", region_name="us-east-1")


with open(IMAGE_NAME, "rb") as f:
    image = f.read()


user_message = "Which countries consume more than 1000 TWh from hydropower? 逐步思考,查看所有区域。Output in JSON."


messages = [
    {
        "role": "user",
        "content": [
            {"image": {"format": "png", "source": {"bytes": image}}},
            {"text": user_message},
        ],
    }
]


response = bedrock_runtime.converse(
    modelId=MODEL_ID,
    messages=messages,
)
response_text = response["output"]["message"]["content"][0]["text"]
print(response_text)

左右滑动查看完整示意

当我运行它时,我得到的输出与控制台中的输出类似:

Let's approach this step-by-step:


1. First, I'll examine the color scale at the bottom of the map. The darkest blue color represents consumption of 2,000 TWh or more.


2. Now, I'll scan the map region by region:


   North America: Canada is dark blue, indicating over 1,000 TWh.
   South America: Brazil is also dark blue, over 1,000 TWh.
   Europe: No country appears to be dark blue.
   Africa: No country appears to be dark blue.
   Asia: China stands out as dark blue, indicating over 1,000 TWh.
   Oceania: No country appears to be dark blue.


3. To be thorough, I'll double-check for any medium blue countries that might be close to or over 1,000 TWh, but I don't see any that appear to reach that threshold.


4. Based on this analysis, there are three countries that clearly consume more than 1,000 TWh from hydropower.


Now, I'll format the answer in JSON:


```json
{
  "countries_consuming_over_1000TWh_hydropower": [
    "Canada",
    "Brazil",
    "China"
  ]
}
```


This JSON output lists the three countries that visually appear to consume more than 1,000 TWh of primary energy from hydropower according to the 2022 data presented in the map.

左右滑动查看完整示意

因为我没有指定 JSON 语法,所以这两个答案使用了不同的格式。在您的应用程序中,您可以在提示中描述所需的 JSON 属性,或提供示例以在输出中展示标准格式。

有关更多示例,请参阅《 Amazon Bedrock 用户指南》中的代码示例。有关更高级的用例,这里有一个功能齐全的工具使用演示,演示了如何将生成式 AI 模型与自定义工具或 API 连接起来。

e888c2399d373eb91d4dc63cf8db16c9.png

代码示例

扫码了解更多

2151bf477a677e85187b01547fc27821.png

工具使用演示

扫码了解更多

e2c030b4b3f89b4292c5b149ed158ef6.png

如何将生成 AI 模型

与自定义工具或 API 连接起来

扫码了解更多

左右滑动查看更多

在 Amazon CLI 中

使用 Claude 3.5 Sonnet

有时候,没有什么能比命令行的速度更快。您可以通过以下方式将 Amazon CLI 与新模型配合使用:

aws bedrock-runtime converse \
    --model-id anthropic.claude-3-5-sonnet-20240620-v1:0 \
    --messages '{"role": "user", "content": [{"text": "Alice has N brothers and she also has M sisters. How many sisters does Alice’s brother have?"}]}' \
    --region us-east-1
    --query output.message.content

左右滑动查看完整示意

在输出中,我使用查询选项以仅获取输出消息的内容:

[
    {
        "text": "Let's approach this step-by-step:\n\n1. First, we need to understand the relationships:\n   - Alice has N brothers\n   - Alice has M sisters\n\n2. Now, let's consider Alice's brother:\n   - He is one of Alice's N brothers\n   - He has the same parents as Alice\n\n3. This means that Alice's brother has:\n   - The same sisters as Alice\n   - One sister more than Alice (because Alice herself is his sister)\n\n4. Therefore, the number of sisters Alice's brother has is:\n   M + 1\n\n   Where M is the number of sisters Alice has.\n\nSo, the answer is: Alice's brother has M + 1 sisters."
    }
]

左右滑动查看完整示意

我将文本复制到一个小型的 Python 程序中,以查看它在多行上打印的效果:

print("Let's approach this step-by-step:\n\n1. First, we need to understand the relationships:\n   - Alice has N brothers\n   - Alice has M sisters\n\n2. Now, let's consider Alice's brother:\n   - He is one of Alice's N brothers\n   - He has the same parents as Alice\n\n3. This means that Alice's brother has:\n   - The same sisters as Alice\n   - One sister more than Alice (because Alice herself is his sister)\n\n4. Therefore, the number of sisters Alice's brother has is:\n   M + 1\n\n   Where M is the number of sisters Alice has.\n\nSo, the answer is: Alice's brother has M + 1 sisters.")

左右滑动查看完整示意

Let's approach this step-by-step:


First, we need to understand the relationships:
   - Alice has N brothers
   - Alice has M sisters


Now, let's consider Alice's brother:
   - He is one of Alice's N brothers
   - He has the same parents as Alice


This means that Alice's brother has:
   - The same sisters as Alice
   - One sister more than Alice (because Alice herself is his sister)


Therefore, the number of sisters Alice's brother has is:
   M + 1


   Where M is the number of sisters Alice has.


So, the answer is: Alice's brother has M + 1 sisters.

左右滑动查看完整示意

即使这是一个非常微妙的问题,Claude 3.5 Sonnet 也回答正确,并描述了其分步推理的过程。

注意事项

Anthropic 的 Claude 3.5 Sonnet 现已在美国东部(弗吉尼亚州北部)Amazon 区域的 Amazon Bedrock 中推出。有关详细信息,请扫码参阅文档中的 Amazon Bedrock 模型支持(按区域列出)。 

c045b86d444225a212c4329608b3dbd9.png

地区模型信息

扫码了解更多

Claude 3.5 Sonnet 以更低的成本提供更快、更强大的模型,使生成式人工智能更容易和更有效地用于许多行业,例如:

  • 医疗保健和生命科学:在医学领域,Claude 3.5 Sonnet 在增强成像分析、作为患者分类的诊断助手,以及以易于理解的格式总结最新研究成果等方面显示出良好的前景。

  • 金融服务:该模型可有效地帮助客户识别财务趋势,并根据客户的独特情况制定个性化债务偿还计划。

  • 法律:律师事务所可以使用该模型,通过快速查找出相关的先例和法规来加快法律研究进程。此外,该模型可以通过合同分析提高律师助理的效率,并协助起草标准法律文件。

  • 媒体和娱乐:该模型可以加快记者的调查工作,对剧本写作和角色开发的创作过程提供支持,并提供有价值的受众情感分析。

  • 技术:对于软件开发人员而言,Claude 3.5 Sonnet 为快速应用程序原型设计、旧代码迁移、创新功能构想、用户体验优化和摩擦点识别提供了机会。

  • 教育:教育工作者可以使用该模型来简化拨款提案的撰写,开发融合新兴趋势的综合课程,并通过数据库查询和洞察生成来获得研究援助。

对于生成式人工智能来说,这是一个激动人心的时刻。要开始使用该新模型,请参阅《 Amazon Bedrock 用户指南》的 “Anthropic Claude 模型”部分。您还可以访问我们的社区网站,查找深入的技术内容,并了解我们的构建者社区如何在其解决方案中使用 Amazon Bedrock 。告诉我您会用这些增强功能做什么!

de0cb7916ef7bc926c4adf7100f9b894.png

Anthropic Claude 模型

扫码了解更多

f24351e8ac455b0c056dd408d5c2b251.png

亚马逊云科技社区

扫码了解更多

左右滑动查看更多

前述特定亚马逊云科技生成式人工智能相关的服务仅在亚马逊云科技海外区域可用、第三方生成式人工智能内容并非由亚马逊云科技提供,亚马逊云科技中国仅为帮助您了解行业前沿技术和发展海外业务选择推介该服务。

本篇作者

f1e2475b9c9797e1f33c85c06461c4e5.png

Danilo Poccia

亚马逊云科技首席布道师 ,他利用自己的经验帮助人们将想法变为现实,专注于无服务器架构、事件驱动编程以及机器学习和边缘计算的技术和商业影响。是《Amazon Lambda in Action》一书的作者( Manning 出版)。

437440646354e9ca16a31038ca150a5a.gif

星标不迷路,开发更极速!

关注后记得星标「亚马逊云开发者」

听说,点完下面4个按钮

就不会碰到bug了!

7129dcdf279961a5d3093bb36bfb2e14.gif

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值