Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
R
rolandradio
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 71
    • Issues 71
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Alba Caban
  • rolandradio
  • Issues
  • #62

Closed
Open
Opened May 28, 2025 by Alba Caban@albacaban67437
  • Report abuse
  • New issue
Report abuse New issue

DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart


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 model, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative AI ideas on AWS.

In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to release the distilled versions of the models too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that uses support finding out to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial distinguishing function is its support learning (RL) step, which was utilized to refine the model's responses beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) approach, implying it's geared up to break down intricate questions and factor through them in a detailed manner. This assisted thinking process permits the model to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually caught the industry's attention as a versatile text-generation model that can be integrated into various workflows such as agents, rational thinking and data interpretation jobs.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion parameters, enabling efficient inference by routing queries to the most appropriate professional "clusters." This approach permits the design to concentrate on various problem domains while maintaining overall efficiency. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to release the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

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

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this model with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid damaging content, and assess designs against essential safety requirements. At the time of writing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop multiple guardrails tailored to various usage cases and apply 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 check 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 use. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are deploying. To request a limitation boost, systemcheck-wiki.de create a limit increase request and connect to your account group.

Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For guidelines, see Establish authorizations to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent damaging content, and assess models against essential safety criteria. You can implement safety measures for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to examine user inputs and design actions released 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 circulation includes 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 to the design for reasoning. After getting the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the 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 took place at the input or output phase. The examples showcased in the following sections demonstrate reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, select Model brochure under Foundation designs in the navigation pane. At the time of composing this post, you can use the InvokeModel API to invoke 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 design detail page offers vital details about the design's abilities, pricing structure, and implementation guidelines. You can find detailed usage guidelines, consisting of sample API calls and it-viking.ch code snippets for combination. The design supports different text generation tasks, including content production, code generation, and question answering, utilizing its reinforcement discovering optimization and CoT reasoning capabilities. The page also includes release choices and licensing details to help you start with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, pick Deploy.

You will be prompted to set up the deployment details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters). 5. For Variety of circumstances, enter a number of instances (between 1-100). 6. For Instance type, pick your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can configure sophisticated security and facilities settings, including virtual private cloud (VPC) networking, service function permissions, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production deployments, you might wish to review these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the deployment is total, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in play area to access an interactive user interface where you can try out different triggers and change design specifications like temperature and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimal results. For example, content for inference.

This is an outstanding way to check out the model's thinking and text generation capabilities before incorporating it into your applications. The playground offers immediate feedback, helping you understand how the design responds to various inputs and letting you tweak your triggers for optimum results.

You can quickly check the model in the playground 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 carry out inference using a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have actually developed the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime client, sets up inference specifications, and sends a request to produce text based upon a user timely.

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 deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart provides two convenient approaches: using the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both methods to assist you choose the technique that best suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following steps to release DeepSeek-R1 utilizing 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, select JumpStart in the navigation pane.

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

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

- Model name

  • Provider name
  • Task classification (for instance, systemcheck-wiki.de Text Generation). Bedrock Ready badge (if appropriate), showing that this design can be signed up with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to invoke the model

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

    The model details page includes the following details:

    - The design name and supplier 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 release the design, it's recommended to examine the model details and license terms to validate compatibility with your usage case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, utilize the instantly produced name or develop a custom one.
  1. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the variety of circumstances (default: 1). Selecting proper instance types and counts is important for cost and performance optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to deploy the design.

    The deployment procedure can take numerous minutes to complete.

    When release is complete, your endpoint status will change to InService. At this point, the design is all set to accept reasoning requests through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is complete, you can conjure up the design utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the essential AWS approvals 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 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 likewise 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 undesirable charges, finish the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace implementations.
  5. In the Managed releases area, 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 correct release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you released will sustain expenses if you leave it running. Use the following code to erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we how you can access and release the DeepSeek-R1 design utilizing Bedrock Marketplace and 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 Starting 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 construct innovative solutions using AWS services and accelerated compute. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the inference efficiency of large language models. In his leisure time, Vivek enjoys treking, viewing films, and attempting various foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location 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 team at AWS.

    Banu Nagasundaram leads product, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about developing options that help clients accelerate their AI journey and unlock business worth.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View project labels
Reference: albacaban67437/rolandradio#62