1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Mayra Fryman edited this page 2025-05-29 06:29:34 +08: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 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 ranging from 1.5 to 70 billion criteria to develop, experiment, and properly 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 variations of the designs also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses reinforcement finding out to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial differentiating function is its reinforcement learning (RL) step, which was utilized to refine the design's actions beyond the standard pre-training and genbecle.com fine-tuning process. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately enhancing both importance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, implying it's geared up to break down complicated queries and reason through them in a detailed manner. This assisted thinking process permits the design to produce more accurate, transparent, 89u89.com and detailed responses. This model integrates RL-based fine-tuning with CoT abilities, aiming to create structured actions while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has caught the market's attention as a flexible text-generation design that can be integrated into various workflows such as agents, rational thinking and data interpretation jobs.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion parameters, allowing efficient inference by routing inquiries to the most appropriate expert "clusters." This technique allows the design to specialize in different issue domains while maintaining overall effectiveness. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge instance to deploy the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

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

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 place. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid harmful material, and examine models against key . At the time of writing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to different usage cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

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

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, avoid harmful content, and evaluate models against key security criteria. You can implement safety procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and model reactions released 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 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 to the design for reasoning. After receiving the design's output, another guardrail check is applied. If the output passes this final 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 suggesting the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following areas demonstrate inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, select Model catalog under Foundation designs 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 company and pick the DeepSeek-R1 design.

The design detail page supplies necessary details about the design's capabilities, pricing structure, and implementation guidelines. You can find detailed use directions, including sample API calls and code bits for integration. The model supports different text generation jobs, including content production, code generation, and concern answering, using its support discovering optimization and CoT reasoning abilities. The page also consists of implementation options and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, select Deploy.

You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, get in a variety of instances (in between 1-100). 6. For example type, pick your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can set up advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service role approvals, and encryption settings. For most use cases, the default settings will work well. However, for production implementations, you may want to evaluate these settings to align with your company's security and compliance requirements. 7. Choose Deploy to begin utilizing the design.

When the implementation is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in play area to access an interactive interface where you can try out different prompts and adjust model specifications like temperature and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimum results. For instance, content for inference.

This is an excellent way to explore the design's reasoning and text generation capabilities before integrating it into your applications. The play area offers instant feedback, helping you comprehend how the model reacts to various inputs and letting you tweak your triggers for optimal outcomes.

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

Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to perform inference using a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. 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. After you have actually created the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends out a demand to produce 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 few clicks. With SageMaker JumpStart, you can tailor pre-trained designs 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 provides 2 hassle-free techniques: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both techniques to assist you pick the method that best suits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card. Each model card shows crucial details, including:

- Model name

  • Provider name
  • Task category (for example, Text Generation). Bedrock Ready badge (if relevant), showing that this model can be signed up with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to invoke the model

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

    The model details page consists of the following details:

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

    The About tab includes crucial details, such as:

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

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

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, use the automatically generated name or develop a custom one.
  1. For example type ¸ choose a circumstances type (default: hb9lc.org ml.p5e.48 xlarge).
  2. For Initial instance count, enter the variety of instances (default: 1). Selecting suitable instance types and counts is essential for cost and performance optimization. Monitor your implementation 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 accuracy. For this design, we strongly recommend sticking 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 numerous minutes to finish.

    When release is total, your endpoint status will change to InService. At this point, the model is ready to accept inference requests through the endpoint. You can monitor the deployment progress on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the implementation is total, you can invoke the design using 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 require 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 demonstrates how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the design is offered 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 reasoning 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 using the Amazon Bedrock console or the API, and implement it as displayed in the following code:

    Clean up

    To prevent unwanted charges, finish the steps in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace implementation

    If you released the model using Amazon Bedrock Marketplace, pediascape.science complete the following steps:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace implementations.
  5. In the Managed releases area, locate the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, pick Delete.
  7. Verify the endpoint details to make certain you're deleting the correct implementation: 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 more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we explored how you can access and deploy the DeepSeek-R1 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, oeclub.org describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting started with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies develop innovative services using AWS services and accelerated calculate. Currently, he is focused on developing strategies for fine-tuning and enhancing the reasoning efficiency of big language models. In his downtime, Vivek takes pleasure in hiking, seeing motion pictures, and attempting different 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 technology and Bioinformatics.

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

    Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is enthusiastic about developing services that assist consumers accelerate their AI journey and unlock business worth.