1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
gilberto77f09 edited this page 2025-06-02 01:54:02 +00:00
This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.


Today, we are delighted 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 deploy DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled versions ranging from 1.5 to 70 billion criteria to construct, experiment, and properly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that utilizes support discovering to boost thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial differentiating function is its support knowing (RL) step, which was used to fine-tune the model's actions beyond the basic pre-training and wiki.whenparked.com tweak process. By including RL, DeepSeek-R1 can adapt better to user feedback and goals, ultimately enhancing both importance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, suggesting it's equipped to break down complicated queries and factor through them in a detailed way. This assisted reasoning process enables the model to produce more precise, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has captured the industry's attention as a flexible text-generation design that can be incorporated into numerous workflows such as agents, rational reasoning and information interpretation jobs.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion parameters, enabling efficient inference by routing inquiries to the most pertinent professional "clusters." This approach allows the model to concentrate on various issue domains while maintaining total effectiveness. DeepSeek-R1 requires 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 includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking capabilities of the main R1 model to more effective architectures based on 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 efficient designs to imitate 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 model, we recommend deploying this design with guardrails in location. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid hazardous material, and assess models against key safety criteria. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop numerous guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, improving 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 inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and verify 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 releasing. To ask for a limit boost, create a limitation boost demand and reach out to your account group.

Because you will be releasing this model 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 instructions, see Set up consents to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

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

The basic circulation involves 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 receiving 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 suggesting 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 gives 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, choose 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 design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a service provider and select the DeepSeek-R1 model.

The design detail page offers important details about the model's abilities, prices structure, and execution guidelines. You can discover detailed use guidelines, consisting of sample API calls and code bits for integration. The design supports numerous text generation tasks, consisting of content creation, code generation, and question answering, utilizing its support learning optimization and CoT thinking abilities. The page also consists of deployment choices and licensing details to assist you get started with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, choose 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, enter an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of instances, get in a variety of instances (between 1-100). 6. For systemcheck-wiki.de example type, select your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can configure innovative security and infrastructure settings, including virtual personal cloud (VPC) networking, service role approvals, and file encryption settings. For the majority of utilize cases, the default settings will work well. However, for production deployments, you might want to examine these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to begin utilizing the model.

When the deployment is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in playground to access an interactive user interface where you can explore different prompts and adjust design parameters like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimal outcomes. For instance, material for inference.

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

You can rapidly evaluate the model in the play ground through the UI. However, to invoke the released design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

Run reasoning utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example demonstrates how to perform inference using a deployed DeepSeek-R1 design 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 develop the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures reasoning criteria, and sends out a demand to produce text based upon a user timely.

Deploy DeepSeek-R1 with JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML services that you can deploy with just a few clicks. With SageMaker JumpStart, wiki.lafabriquedelalogistique.fr you can tailor pre-trained designs to your usage case, with your data, and release them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart provides two practical methods: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you select the technique that best matches your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model internet browser displays available models, with details like the supplier name and model abilities.

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

- Model name

  • Provider name
  • Task classification (for example, Text Generation). Bedrock Ready badge (if suitable), indicating that this model can be signed up with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to conjure up the model

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

    The design details page consists of the following details:

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

    The About tab includes crucial details, such as:

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

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, utilize the instantly produced name or develop a custom one.
  1. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the variety of instances (default: 1). Selecting proper instance types and counts is essential for cost and efficiency optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time inference is chosen by default. This is enhanced for sustained traffic and low latency.
  3. Review all configurations for precision. For garagesale.es this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to release the design.

    The implementation process can take a number of minutes to complete.

    When deployment is complete, your endpoint status will change to InService. At this moment, the model is ready to accept inference demands through the endpoint. You can keep an eye on the deployment progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the release is total, you can conjure up the design utilizing a SageMaker runtime client 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 require to set up the SageMaker Python SDK and make certain you have the required AWS permissions and photorum.eclat-mauve.fr 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 model is offered in the Github here. You can clone the note pad and range 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 develop a guardrail using the Amazon Bedrock console or the API, and execute it as revealed in the following code:

    Tidy up

    To avoid undesirable charges, complete the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace implementation

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace deployments.
  5. In the Managed deployments 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 appropriate release: 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 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 release the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. 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 helps emerging generative AI business build ingenious options utilizing AWS services and accelerated calculate. Currently, he is focused on developing strategies for fine-tuning and optimizing the reasoning performance of large language designs. In his spare time, Vivek enjoys hiking, seeing movies, and attempting different cuisines.

    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 item, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about developing solutions that help consumers accelerate their AI journey and unlock service value.