Skip to content

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

已关闭
未关闭
在 2月 09, 2025 由 Abby Quinlan@abbyquinlan149
  • 违规举报
  • 新建问题
举报违规 新建问题

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 designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek AI's first-generation frontier model, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we show how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled versions of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) established by DeepSeek AI that utilizes support learning to boost reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial differentiating feature is its reinforcement learning (RL) step, which was utilized to fine-tune the design's actions beyond the basic pre-training and tweak process. By incorporating RL, wiki.snooze-hotelsoftware.de DeepSeek-R1 can adapt better to user feedback and objectives, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, meaning it's geared up to break down complicated questions and reason through them in a detailed manner. This assisted thinking procedure permits the design to produce more precise, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT abilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has caught the market's attention as a flexible text-generation model that can be integrated into numerous workflows such as representatives, rational thinking and data analysis tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion specifications, making it possible for effective reasoning by routing queries to the most appropriate professional "clusters." This technique allows the design to focus on various issue domains while maintaining general efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning abilities of the main R1 model to more efficient architectures based on popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more efficient designs to mimic the behavior and reasoning patterns of the larger DeepSeek-R1 model, pipewiki.org 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 design, we recommend deploying this design with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent hazardous content, and evaluate designs against key security requirements. At the time of composing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create several guardrails tailored to various usage cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To release 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, pick Amazon SageMaker, and surgiteams.com 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 deploying. To request a limit increase, create a limitation boost demand and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, avoid harmful material, and assess models against crucial safety requirements. You can execute precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and design responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.

The general flow includes the following actions: First, the system receives 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 design for reasoning. After receiving 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 took place at the input or output stage. The examples showcased in the following areas show inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, choose Model catalog under Foundation models in the navigation pane. At the time of composing this post, you can utilize 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 service provider and choose the DeepSeek-R1 model.

The model detail page provides necessary details about the design's capabilities, rates structure, and execution standards. You can discover detailed use instructions, including sample API calls and code snippets for combination. The model supports various text generation jobs, including material creation, code generation, and concern answering, using its reinforcement learning optimization and CoT thinking abilities. The page also consists of release choices and licensing details to assist you get started with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, choose 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, enter an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of instances, enter a variety of circumstances (between 1-100). 6. For Instance type, pick your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can configure sophisticated security and infrastructure settings, including virtual personal cloud (VPC) networking, service function permissions, and encryption settings. For the majority of use cases, the default settings will work well. However, for production implementations, you might wish to examine these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to begin utilizing the model.

When the implementation is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play area. 8. Choose Open in play ground to access an interactive interface where you can try out various prompts and adjust model parameters like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for ideal outcomes. For example, material for inference.

This is an exceptional method to check out the design's thinking and text generation capabilities before integrating it into your applications. The playground supplies immediate feedback, assisting you understand how the model reacts to different inputs and letting you tweak your prompts for optimum outcomes.

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

Run inference utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to carry out inference using a released DeepSeek-R1 design through Amazon Bedrock using the invoke_model and 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 produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up inference criteria, and sends out a request 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 simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart provides two hassle-free techniques: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to assist you select the technique that finest fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The design internet browser displays available models, with details like the supplier name and design capabilities.

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

- Model name

  • Provider name
  • Task category (for instance, Text Generation). Bedrock Ready badge (if appropriate), suggesting that this model can be registered with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to invoke the model

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

    The model details page consists of the following details:

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

    The About tab consists of essential details, such as:

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

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

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, utilize the immediately generated name or develop a custom one.
  1. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the variety of instances (default: 1). Selecting appropriate circumstances types and counts is vital for cost and efficiency optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is enhanced for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this design, we highly advise sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the design.

    The release process can take numerous minutes to complete.

    When release is complete, your endpoint status will alter to InService. At this point, the design is prepared to accept reasoning demands through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is total, you can conjure up the design using a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS approvals and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for reasoning programmatically. The code for releasing the design is offered in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as revealed in the following code:

    Clean up

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

    Delete the Amazon Bedrock Marketplace implementation

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace implementations.
  5. In the Managed implementations section, find the endpoint you want to delete.
  6. Select the endpoint, and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting the proper implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you released will sustain expenses 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, we explored how you can access and deploy the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. 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 generative AI business build ingenious services utilizing AWS services and sped up compute. Currently, he is concentrated on establishing methods for fine-tuning and optimizing the inference performance of large language designs. In his downtime, Vivek delights in hiking, viewing films, and trying 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 Science and Bioinformatics.

    Jonathan Evans is a Specialist Solutions Architect dealing with generative AI with the Third-Party Model Science group at AWS.

    Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about building options that help customers accelerate their AI journey and unlock service value.
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无截止日期
0
标记
无
指派标记
  • 查看项目标记
引用: abbyquinlan149/sugar#2