1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Alexandra Spivey edited this page 2025-04-05 11:28:59 +00: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 excited 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 design, DeepSeek-R1, along with the distilled variations ranging from 1.5 to 70 billion specifications to construct, experiment, and properly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that utilizes support discovering to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key distinguishing function is its reinforcement knowing (RL) action, which was utilized to improve the design's responses beyond the standard pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately boosting both relevance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, indicating it's equipped to break down complicated questions and factor through them in a detailed way. This directed reasoning procedure enables the design to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has captured the industry's attention as a versatile text-generation design that can be incorporated into various workflows such as agents, rational thinking and information analysis jobs.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient reasoning by routing questions to the most pertinent specialist "clusters." This approach permits the model to focus on different issue domains while maintaining total efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 design 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 sized, more effective models to mimic the habits and thinking patterns of the bigger DeepSeek-R1 design, using it as a teacher design.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing this model with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous material, and assess models against crucial safety criteria. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing security 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 wiki.myamens.com P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and confirm you're using 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 ask for a limitation boost, create a limitation boost demand and reach out to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent hazardous content, and assess designs against essential safety requirements. You can execute 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 create a guardrail using 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 actions: First, the system gets 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 design for inference. After getting the design's output, another guardrail check is applied. If the output passes this last check, it's returned as the final result. However, if either the input or output is stepped in 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 areas 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 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 brochure under Foundation models in the navigation pane. At the time of composing this post, you can utilize the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.

The model detail page offers important details about the model's capabilities, prices structure, and implementation standards. You can find detailed use directions, including sample API calls and code bits for integration. The model supports numerous text generation jobs, consisting of material production, code generation, and concern answering, utilizing its reinforcement learning optimization and CoT reasoning capabilities. The page also consists of release options and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, choose Deploy.

You will be triggered to set up the implementation 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 Variety of circumstances, go into a variety of instances (between 1-100). 6. For Instance type, choose your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can configure advanced security and settings, consisting of virtual private cloud (VPC) networking, service role permissions, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production deployments, you might desire to evaluate these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the design.

When the deployment is complete, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in play area to access an interactive interface where you can explore various triggers and change model criteria like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum outcomes. For example, content for inference.

This is an outstanding way to check out the model's reasoning and text generation capabilities before integrating it into your applications. The playground provides immediate feedback, helping you understand how the design reacts to various inputs and letting you tweak your triggers for optimal results.

You can quickly evaluate the model in the play ground through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you require 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 utilizing a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail using 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, utilize the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up reasoning criteria, and sends a request to produce 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 options that you can release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into production using either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart provides two convenient techniques: utilizing the user-friendly SageMaker JumpStart UI or wavedream.wiki executing programmatically through the SageMaker Python SDK. Let's explore both approaches to assist you select the technique that best matches 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, pick Studio in the navigation pane. 2. First-time users will be prompted to develop a domain. 3. On the SageMaker Studio console, choose JumpStart in the navigation pane.

The model web browser displays available designs, with details like the company name and model capabilities.

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

- 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, allowing you to use Amazon Bedrock APIs to invoke the design

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

    The design details page consists of the following details:

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

    The About tab consists of important details, such as:

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

    Before you deploy the model, it's recommended to examine the model details and license terms to validate compatibility with your usage case.

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, use the instantly produced name or create a customized one.
  1. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, get in the variety of circumstances (default: 1). Selecting proper instance types and counts is essential for cost and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for precision. For this design, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to release the model.

    The deployment process can take numerous minutes to finish.

    When implementation is complete, your endpoint status will alter to InService. At this moment, the design is ready to accept inference requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the release is complete, you can conjure up the model using a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS consents and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for inference programmatically. The code for deploying the design is provided in the Github here. You can clone the note pad 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 likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and implement it as displayed 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 implementation

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace implementations.
  5. In the Managed deployments area, locate the endpoint you want 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 proper release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed will sustain costs if you leave it running. Use the following code to delete the endpoint if you wish to stop sustaining charges. For wiki.asexuality.org more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we explored how you can access and release the DeepSeek-R1 design using Bedrock Marketplace and yewiki.org SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting begun 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 construct ingenious solutions using AWS services and accelerated calculate. Currently, he is concentrated on developing methods for fine-tuning and optimizing the inference performance of large language designs. In his spare time, Vivek takes pleasure in treking, viewing movies, and trying different 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.

    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 developing solutions that help clients accelerate their AI journey and unlock company worth.