Skip to content

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

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

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


Today, we are excited to reveal 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, along with the distilled versions varying from 1.5 to 70 billion specifications to construct, experiment, and responsibly scale your generative AI ideas on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses reinforcement learning to improve reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential identifying function is its reinforcement learning (RL) step, which was used to refine the model's reactions beyond the standard pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust more efficiently to user feedback and goals, eventually enhancing both importance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, indicating it's geared up to break down complex queries and factor through them in a detailed way. This assisted reasoning procedure permits the model to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has recorded the market's attention as a versatile text-generation model that can be integrated into numerous workflows such as agents, logical thinking and data analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion parameters, allowing effective reasoning by routing inquiries to the most appropriate professional "clusters." This technique enables the model to focus on various issue domains while maintaining overall performance. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

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

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid hazardous content, and assess models against key safety requirements. At the time of writing this blog, for engel-und-waisen.de DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop several guardrails tailored to different use cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, wiki.asexuality.org 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 validate you're using ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are releasing. To ask for a limitation boost, produce a limitation increase request and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent hazardous material, and evaluate designs against key security requirements. You can carry out security measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and design reactions released on Amazon Bedrock Marketplace and systemcheck-wiki.de SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.

The basic flow includes the following actions: First, the system receives an input for the model. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent to the design for inference. After getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the last outcome. However, if either the input or output is stepped in by the guardrail, a message is returned indicating the nature of the intervention and whether it occurred at the input or output stage. The examples showcased in the following sections show reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, choose Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to invoke the model. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 design.

The model detail page offers important details about the design's capabilities, pricing structure, and application standards. You can find detailed usage guidelines, including sample API calls and code bits for combination. The model supports various text generation tasks, including content creation, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT reasoning capabilities. The page also includes deployment options and licensing details to assist you get started with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, choose Deploy.

You will be prompted to set up the release details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Variety of instances, enter a number of instances (in between 1-100). 6. For example type, pick your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up advanced security and facilities settings, consisting of virtual private cloud (VPC) networking, service function authorizations, and file encryption settings. For most utilize cases, the default settings will work well. However, for production implementations, you may wish to review these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start using the model.

When the release is total, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive interface where you can try out various triggers and adjust model parameters like temperature level and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For instance, material for inference.

This is an outstanding method to check out the design's thinking and text generation abilities before integrating it into your applications. The playground provides instant feedback, helping you comprehend how the design responds to numerous inputs and letting you tweak your prompts for optimal results.

You can quickly test the model in the play area through the UI. However, to invoke the released model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to carry out inference utilizing a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and engel-und-waisen.de ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo. After you have actually developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends a demand to create text based upon a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML services that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses two practical techniques: utilizing the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both approaches to help you pick the method that best fits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model internet browser displays available models, with details like the company name and model abilities.

4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card. Each design card reveals essential details, including:

- Model name

  • Provider name
  • Task classification (for instance, Text Generation). Bedrock Ready badge (if applicable), suggesting that this design can be registered with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to conjure up the model

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

    The model details page includes the following details:

    - The model name and company details. Deploy button to deploy 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 deploy the design, it's suggested to review the model details and license terms to validate compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, utilize the immediately produced name or develop a custom-made one.
  1. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the number of circumstances (default: it-viking.ch 1). Selecting suitable instance types and counts is important for expense and performance optimization. Monitor your implementation to change these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is optimized for sustained traffic and low latency.
  3. Review all setups for accuracy. For this design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to release the design.

    The implementation process can take numerous minutes to finish.

    When deployment is total, your endpoint status will change to InService. At this moment, the design is ready to accept inference requests through the endpoint. You can monitor the implementation development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the deployment is total, you can invoke the model utilizing a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get started with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the necessary AWS permissions and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for inference programmatically. The code for releasing the model is supplied in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run additional demands 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 develop a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:

    Clean up

    To prevent undesirable charges, finish the actions in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you deployed the model using Amazon Bedrock Marketplace, total the following actions:

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

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you released will sustain costs if you leave it running. Use the following code to erase the endpoint if you desire to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, wiki.dulovic.tech we explored how you can access and release the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, raovatonline.org 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 helps emerging generative AI companies develop innovative options using AWS services and accelerated calculate. Currently, he is focused on developing methods for fine-tuning and optimizing the reasoning efficiency of big language models. In his downtime, Vivek takes pleasure in hiking, viewing motion pictures, and attempting various foods.

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

    is a Specialist Solutions Architect dealing with 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 generative AI hub. She is passionate about building options that assist clients accelerate their AI journey and unlock company value.
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无截止日期
0
标记
无
指派标记
  • 查看项目标记
引用: ajaelsey510170/amazonaws#47