1
DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Albertina Olmstead edited this page 2025-04-08 05:13:25 +02:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


Today, we are thrilled to announce 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, yewiki.org DeepSeek-R1, along with the distilled variations ranging from 1.5 to 70 billion parameters to develop, experiment, and responsibly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that utilizes reinforcement finding out to enhance thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial identifying feature is its reinforcement learning (RL) step, which was used to improve the design's actions beyond the standard pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt more effectively to user feedback and objectives, raovatonline.org eventually improving both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, implying it's geared up to break down complicated questions and factor through them in a detailed way. This assisted reasoning process permits the model to produce more precise, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured reactions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually recorded the industry's attention as a flexible text-generation design that can be incorporated into various workflows such as representatives, logical reasoning and information analysis jobs.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient reasoning by routing queries to the most pertinent expert "clusters." This method allows the design to focus on various problem domains while maintaining general 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 models bring the thinking capabilities of the main R1 model to more efficient architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller, more effective designs to simulate the behavior and reasoning patterns of the bigger DeepSeek-R1 model, utilizing it as a teacher model.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend releasing this model with guardrails in place. In this blog, we will use Amazon Bedrock to present safeguards, prevent damaging content, and assess designs against essential safety criteria. 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 produce multiple guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, you require access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick 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 increase, produce a limitation increase demand and reach out to your account team.

Because you will be deploying 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 authorizations to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, prevent hazardous content, and assess models against essential safety requirements. You can implement precaution for the DeepSeek-R1 design 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 create a guardrail utilizing the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.

The basic flow includes 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 to the design for inference. After getting the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the final 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 occurred at the input or output phase. The examples showcased in the following sections show inference using 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, total the following steps:

1. On the Amazon Bedrock console, choose Model catalog under Foundation designs in the navigation pane. At the time of writing 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 company and choose the DeepSeek-R1 design.

The design detail page offers important details about the model's abilities, prices structure, and implementation guidelines. You can discover detailed use instructions, consisting of sample API calls and code bits for integration. The model supports different text generation tasks, including material development, code generation, and question answering, using its support finding out optimization and CoT thinking abilities. The page also consists of release choices and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, select Deploy.

You will be prompted 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 instances, go into a variety of instances (in between 1-100). 6. For Instance type, select your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, you can configure advanced security and facilities settings, including virtual personal cloud (VPC) networking, service role consents, and encryption settings. For most utilize cases, the default settings will work well. However, for production implementations, you may desire to examine these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to begin using the design.

When the release is complete, you can check 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 different prompts and change design criteria like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal outcomes. For example, material for inference.

This is an exceptional way to check out the model's reasoning and text generation capabilities before incorporating it into your applications. The play area provides instant feedback, assisting you comprehend how the model reacts to numerous inputs and letting you fine-tune your prompts for optimum outcomes.

You can rapidly evaluate the model in the play area through the UI. However, to conjure up the deployed model programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

Run inference using 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 create 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 created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, configures inference specifications, and sends out a request to generate text based upon a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated 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 using either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses 2 practical techniques: using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both techniques 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, pick Studio in the navigation pane. 2. First-time users will be prompted to develop a domain. 3. On the SageMaker Studio console, pick JumpStart in the navigation pane.

The model web browser shows available designs, with details like the service provider name and model capabilities.

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

- Model name

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

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

    The model details page consists of the following details:

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

    The About tab consists of crucial details, such as:

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

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

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the instantly generated name or develop a custom one.
  1. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the variety of circumstances (default: 1). Selecting suitable instance types and counts is essential for wakewiki.de expense and efficiency optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is optimized for sustained traffic and low latency.
  3. Review all setups for accuracy. For this design, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to release the model.

    The deployment process can take several minutes to finish.

    When deployment is complete, your endpoint status will alter to InService. At this point, the design is all set to accept inference requests through the endpoint. You can monitor the release progress on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the implementation is total, you can invoke the model using a SageMaker runtime customer and integrate 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 need to set up the SageMaker Python SDK and make certain you have the necessary AWS authorizations and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the design is provided in the Github here. You can clone the note pad and range 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 likewise 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:

    Clean up

    To prevent undesirable charges, finish the actions in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you deployed the design utilizing Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace releases.
  5. In the Managed releases section, find the endpoint you wish 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 model you deployed 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, we explored how you can access and release the DeepSeek-R1 model using 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 models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI business build innovative services utilizing AWS services and sped up compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the reasoning efficiency of large language designs. In his downtime, Vivek delights in treking, viewing movies, and trying various cuisines.

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

    Jonathan Evans is an Expert Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads item, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is enthusiastic about constructing services that assist customers accelerate their AI journey and unlock company worth.