Skip to content

  • 项目
  • 群组
  • 代码片段
  • 帮助
    • 正在加载...
    • 帮助
    • 为 GitLab 提交贡献
  • 登录/注册
A
amazonaws
  • 项目
    • 项目
    • 详情
    • 活动
    • 周期分析
  • 议题 49
    • 议题 49
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI / CD
    • CI / CD
    • 流水线
    • 作业
    • 计划
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 成员
    • 成员
  • 折叠边栏
  • 活动
  • 创建新议题
  • 作业
  • 议题看板
  • Aja Elsey
  • amazonaws
  • Issues
  • #46

已关闭
未关闭
在 4月 10, 2025 由 Aja Elsey@ajaelsey510170
  • 违规举报
  • 新建问题
举报违规 新建问题

DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart


Today, we are delighted to announce that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled variations ranging from 1.5 to 70 billion specifications to develop, experiment, and responsibly scale your generative AI ideas on AWS.

In this post, we demonstrate how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled versions of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that uses support learning to improve reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key differentiating feature is its support learning (RL) action, which was used to fine-tune the design's actions beyond the basic pre-training and tweak process. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately boosting both importance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, implying it's geared up to break down intricate queries and reason through them in a detailed way. This guided thinking procedure enables the design to produce more precise, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has actually recorded the industry's attention as a flexible text-generation model that can be integrated into numerous workflows such as representatives, sensible reasoning and information interpretation jobs.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion criteria, enabling efficient inference by routing questions to the most pertinent specialist "clusters." This method permits the design to specialize in different problem domains while maintaining overall efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 model to more effective architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more effective designs to simulate the behavior and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as a teacher model.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise deploying this model with guardrails in location. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent damaging material, and assess models against crucial safety requirements. At the time of writing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you need access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and verify you're using ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are deploying. To request a limit increase, develop a limitation increase demand and connect to your account group.

Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) approvals to utilize Amazon Bedrock Guardrails. For instructions, see Set up permissions to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, prevent damaging material, and assess designs against key security requirements. You can implement security procedures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to evaluate user inputs and design responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock console or higgledy-piggledy.xyz the API. For the example code to develop the guardrail, see the GitHub repo.

The basic circulation involves the following steps: First, the system gets an input for the design. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent out to the model for inference. After receiving the model's output, another guardrail check is used. If the output passes this last check, it's returned as the final result. However, hb9lc.org if either the input or output is stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following sections demonstrate inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers you access to over 100 popular, emerging, and specialized foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:

1. On the Amazon Bedrock console, pick Model catalog under Foundation designs in the navigation pane. At the time of writing this post, you can use the InvokeModel API to conjure up the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a company and select the DeepSeek-R1 model.

The model detail page offers essential details about the design's abilities, rates structure, and execution standards. You can find detailed use instructions, including sample API calls and code bits for integration. The model supports various text generation tasks, including material production, code generation, and question answering, utilizing its support discovering optimization and CoT thinking capabilities. The page also consists of implementation choices and wiki.snooze-hotelsoftware.de licensing details to assist you start with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, yewiki.org pick Deploy.

You will be triggered to configure the release details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, enter a variety of circumstances (between 1-100). 6. For example type, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can configure innovative security and facilities settings, consisting of virtual private cloud (VPC) networking, service role permissions, and encryption settings. For the majority of use cases, the default settings will work well. However, for production implementations, you might wish to evaluate these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to start using the model.

When the deployment is total, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock playground. 8. Choose Open in play area to access an interactive user interface where you can explore different prompts and change model specifications like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal results. For instance, content for inference.

This is an excellent way to explore the design's thinking and text generation abilities before incorporating it into your applications. The play area supplies instant feedback, helping you understand how the model reacts to various inputs and letting you tweak your triggers for ideal outcomes.

You can rapidly evaluate the design in the playground through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run reasoning utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to perform inference using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have produced the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures inference parameters, and sends out a request to generate text based upon a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML solutions that you can release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 hassle-free approaches: using the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both techniques to help you pick the method that finest fits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following steps to release DeepSeek-R1 using SageMaker JumpStart:

1. On the SageMaker console, pick Studio in the navigation pane. 2. First-time users will be triggered to develop a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

The model browser shows available models, with details like the provider name and design capabilities.

4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows essential details, consisting of:

- Model name

  • Provider name
  • Task category (for instance, Text Generation). Bedrock Ready badge (if suitable), indicating that this design can be signed up with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to invoke the model

    5. Choose the model card to view the model details page.

    The design details page includes the following details:

    - The model name and company details. Deploy button to release the model. About and Notebooks tabs with detailed details

    The About tab includes essential details, such as:

    - Model description.
  • License details.
  • Technical specifications.
  • Usage standards

    Before you release the design, it's suggested to review the model details and license terms to verify compatibility with your use case.

    6. Choose Deploy to continue with release.

    7. For Endpoint name, utilize the instantly generated name or develop a custom-made one.
  1. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, go into the variety of instances (default: 1). Selecting proper instance types and counts is essential for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time inference is selected by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for accuracy. For this model, we highly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to deploy the design.

    The release procedure can take several minutes to finish.

    When deployment is total, your endpoint status will change to InService. At this point, the design is prepared to accept inference requests through the endpoint. You can keep an eye on the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is complete, you can invoke the model using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get going with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the needed AWS permissions and environment setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for releasing the model is provided in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run additional requests against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and execute it as shown in the following code:

    Tidy up

    To avoid undesirable charges, finish the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you deployed the model using Amazon Bedrock Marketplace, complete the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace implementations.
  5. In the Managed deployments area, find the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting the proper deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you deployed will sustain expenses if you leave it running. Use the following code to erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we explored how you can access and deploy the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies develop innovative services utilizing AWS services and accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and enhancing the inference efficiency of large language designs. In his downtime, Vivek enjoys hiking, enjoying motion pictures, and attempting various cuisines.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.

    Jonathan Evans is a Professional Solutions Architect working on generative AI with the Third-Party Model Science group at AWS.

    Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and AI hub. She is enthusiastic about developing solutions that assist clients accelerate their AI journey and unlock company value.
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无截止日期
0
标记
无
指派标记
  • 查看项目标记
引用: ajaelsey510170/amazonaws#46