Skip to content

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

已关闭
未关闭
在 4月 02, 2025 由 Ezekiel Mazure@ezekiel55i8485
  • 违规举报
  • 新建问题
举报违规 新建问题

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


Today, we are thrilled 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, together with the distilled versions varying from 1.5 to 70 billion parameters to develop, experiment, and responsibly scale your generative AI ideas on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that utilizes reinforcement discovering to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key distinguishing function is its support learning (RL) step, which was used to improve the design's reactions beyond the standard pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and goals, ultimately enhancing both importance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, meaning it's equipped to break down complex queries and factor through them in a detailed manner. This directed thinking procedure enables the design to produce more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually caught the market's attention as a versatile text-generation model that can be incorporated into various workflows such as representatives, rational reasoning and data interpretation jobs.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion specifications, enabling effective inference by routing inquiries to the most pertinent specialist "clusters." This technique enables the design to focus on various problem domains while maintaining overall effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge instance to release the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 design to more effective architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more effective models to mimic the habits and thinking patterns of the bigger DeepSeek-R1 design, using it as an instructor model.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise releasing this design with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging content, and evaluate designs against crucial safety requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce numerous guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're utilizing ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are releasing. To ask for a limit increase, create a limitation boost demand and reach out to your account group.

Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For guidelines, see Set up consents to use guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, avoid hazardous content, and assess models against key security criteria. You can implement precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo.

The basic circulation includes the following steps: 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 out to the model for inference. After receiving the design's output, another guardrail check is applied. If the output passes this last check, it's returned as the outcome. However, if either the input or output is intervened by the guardrail, a message is returned showing 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 provides you access to over 100 popular, emerging, and specialized structure models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following steps:

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

The design detail page supplies vital details about the model's abilities, pricing structure, and application standards. You can find detailed use guidelines, consisting of sample API calls and code snippets for combination. The design supports numerous text generation jobs, including content creation, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT reasoning abilities. The page also consists of implementation options and licensing details to help you get going with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, pick Deploy.

You will be triggered to set up the deployment details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of circumstances, go into 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 innovative security and infrastructure settings, including virtual personal cloud (VPC) networking, service function consents, and encryption settings. For most utilize cases, the default settings will work well. However, for production releases, you might want to review these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to begin utilizing the model.

When the deployment is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in play ground to access an interactive interface where you can try out various triggers and change model parameters like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal results. For example, content for reasoning.

This is an excellent method to check out the design's reasoning and text generation capabilities before integrating it into your applications. The playground supplies immediate feedback, disgaeawiki.info assisting you comprehend how the design reacts to numerous inputs and letting you fine-tune your triggers for optimal outcomes.

You can quickly test the model in the playground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference using guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to perform reasoning utilizing a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can create 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 created the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures reasoning parameters, and sends out a demand to generate text based upon a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

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

Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 convenient approaches: utilizing the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you pick the approach that best matches your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model internet browser shows available designs, with details like the company name and design abilities.

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

- Model name

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

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

    The model details page includes the following details:

    - The design name and supplier details. Deploy button to deploy the model. About and Notebooks tabs with detailed details

    The About tab includes crucial details, such as:

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

    Before you deploy the design, it's suggested to evaluate the design details and license terms to validate compatibility with your usage case.

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, utilize the instantly created name or develop a customized one.
  1. For Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the number of instances (default: 1). Selecting appropriate circumstances types and counts is essential for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time inference is selected by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for precision. For this model, we highly advise sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to release the design.

    The deployment procedure can take numerous minutes to complete.

    When deployment is complete, your endpoint status will alter to InService. At this moment, the design is all set to accept inference demands through the endpoint. You can keep an eye on the release progress on the SageMaker console Endpoints page, which will metrics and status details. When the deployment is complete, you can invoke the model utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS authorizations and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the model is provided 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 use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and execute it as revealed in the following code:

    Tidy up

    To avoid undesirable charges, complete the actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
  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 correct deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design 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 release the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for disgaeawiki.info Inference at AWS. He helps emerging generative AI business build innovative options using AWS services and sped up calculate. Currently, he is focused on developing techniques for fine-tuning and optimizing the reasoning efficiency of big language models. In his spare time, Vivek delights in treking, viewing films, and trying various foods.

    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 Specialist Solutions Architect working on generative AI with the Third-Party Model Science group at AWS.

    Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about developing options that assist customers accelerate their AI journey and unlock business worth.
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无截止日期
0
标记
无
指派标记
  • 查看项目标记
引用: ezekiel55i8485/zz#1