1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
leathamorales edited this page 2025-04-07 10:05:24 +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 excited to reveal that DeepSeek R1 distilled Llama and wavedream.wiki Qwen models are available through Amazon Bedrock Marketplace and larsaluarna.se Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek AI's first-generation frontier design, DeepSeek-R1, in addition to 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 show how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled variations of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that utilizes support learning to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial identifying feature is its support learning (RL) step, which was utilized to refine the design's actions beyond the standard pre-training and fine-tuning process. By incorporating RL, DeepSeek-R1 can adjust more successfully to user feedback and objectives, eventually enhancing both importance and clearness. In addition, archmageriseswiki.com DeepSeek-R1 uses a chain-of-thought (CoT) technique, meaning it's equipped to break down intricate questions and reason through them in a detailed manner. This guided thinking process enables the design to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has caught the market's attention as a versatile text-generation design that can be integrated into numerous workflows such as representatives, logical thinking and data interpretation tasks.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion parameters, allowing efficient inference by routing questions to the most relevant expert "clusters." This technique allows the design to focus on different problem domains while maintaining total efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 model to more effective 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 mimic the behavior and reasoning patterns of the larger DeepSeek-R1 design, utilizing it as an instructor design.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend releasing this design with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful material, and evaluate models against key safety requirements. At the time of writing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop several guardrails tailored to different use cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, you require access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and confirm you're using ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are releasing. To ask for a limit increase, create a limitation boost request and connect to your account group.

Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) approvals to use Amazon Bedrock Guardrails. For guidelines, see Set up permissions to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to present safeguards, avoid damaging material, and examine designs against key safety criteria. You can carry out security measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to assess user inputs and model reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The general circulation involves the following steps: 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 reasoning. After getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the last result. 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 sections show reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, select Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and select the DeepSeek-R1 model.

The model detail page provides necessary details about the model's abilities, pricing structure, and application standards. You can discover detailed usage directions, including sample API calls and code snippets for integration. The design supports numerous text generation tasks, consisting of content creation, code generation, and question answering, utilizing its reinforcement learning optimization and CoT reasoning abilities. The page likewise consists of release alternatives and licensing details to assist you start with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, choose Deploy.

You will be triggered to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Number of circumstances, enter a variety of instances (between 1-100). 6. For example type, choose your circumstances type. For pipewiki.org optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can configure sophisticated security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service function consents, and file encryption settings. For the majority of use cases, the default settings will work well. However, for production implementations, you might wish to evaluate these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start using the model.

When the implementation is complete, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can try out different prompts and adjust model parameters like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum results. For example, material for inference.

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

You can quickly evaluate the design in the play area through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you need 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 develop 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 implement guardrails. The script initializes the bedrock_runtime customer, sets up reasoning criteria, and sends a demand to create text based on a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML services that you can release with simply a couple of 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 methods: 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 finest suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions 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, pick JumpStart in the navigation pane.

The design browser displays available designs, with details like the supplier name and model abilities.

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

- Model name

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

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

    The design details page includes the following details:

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

    The About tab includes crucial details, such as:

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

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

    6. Choose Deploy to proceed with release.

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

    The release process can take several minutes to complete.

    When implementation is total, your endpoint status will alter to InService. At this moment, the design is ready to accept inference demands through the endpoint. You can monitor the implementation development on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the deployment is complete, you can invoke the design utilizing a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To begin with DeepSeek-R1 using the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the required AWS approvals and environment setup. The following is a detailed code example that demonstrates how to release and wavedream.wiki use DeepSeek-R1 for reasoning programmatically. The code for deploying the design is offered in the Github here. You can clone the notebook and range 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 utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Clean up

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

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace releases.
  5. In the Managed releases section, locate the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, pick Delete.
  7. Verify the endpoint details to make certain you're erasing the right deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you released will sustain expenses if you leave it running. Use the following code to erase the endpoint if you want 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 using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, wavedream.wiki 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 using AWS services and sped up compute. Currently, he is focused on establishing techniques for fine-tuning and enhancing the inference efficiency of big language models. In his totally free time, Vivek enjoys treking, seeing films, and trying 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 an Expert Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about constructing options that assist consumers accelerate their AI and unlock service value.