Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Contribute to GitLab
  • Sign in
S
stay-22
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 33
    • Issues 33
    • 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
  • Antwan Flanagan
  • stay-22
  • Issues
  • #33

Closed
Open
Opened Jun 03, 2025 by Antwan Flanagan@antwanflanagan
  • Report abuse
  • New issue
Report abuse New issue

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


Today, we are thrilled 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 deploy DeepSeek AI's first-generation frontier model, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion parameters to construct, experiment, and responsibly 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 similar actions to release the distilled versions of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that utilizes reinforcement learning to improve reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key differentiating feature is its reinforcement learning (RL) action, which was used to fine-tune the model's actions beyond the basic pre-training and fine-tuning process. By integrating RL, DeepSeek-R1 can adapt more successfully to user feedback and goals, ultimately enhancing both importance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, implying it's geared up to break down intricate inquiries and reason through them in a detailed manner. This directed reasoning procedure permits the design to produce more precise, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has caught the industry's attention as a flexible text-generation design that can be integrated into different workflows such as agents, rational thinking and information analysis tasks.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion specifications, enabling effective inference by routing inquiries to the most relevant expert "clusters." This method allows the design to focus on different problem domains while maintaining overall effectiveness. 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 instance to release the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

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

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and examine models against essential safety requirements. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop several guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, 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, select 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 deploying. To request a limitation increase, create a limitation boost request and reach out to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, avoid damaging material, and evaluate models against essential security criteria. You can execute safety steps for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to assess 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 produce the guardrail, see the GitHub repo.

The general flow includes the following steps: First, the system gets an input for the design. 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 model's output, another guardrail check is used. If the output passes this last check, it's returned as the last outcome. However, if either the input or output is intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following sections demonstrate reasoning using 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, total the following actions:

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

The design detail page supplies vital details about the model's abilities, prices structure, and execution standards. You can discover detailed usage instructions, including sample API calls and code snippets for integration. The model supports numerous text generation jobs, including content production, code generation, and question answering, utilizing its support finding out optimization and CoT thinking abilities. The page likewise includes implementation choices and licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, select 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 Number of instances, get in a number of instances (between 1-100). 6. For Instance type, choose your instance type. For optimal efficiency with DeepSeek-R1, a type like ml.p5e.48 xlarge is recommended. Optionally, you can configure sophisticated security and facilities settings, consisting of virtual private cloud (VPC) networking, service function approvals, and file encryption settings. For the majority of use cases, the default settings will work well. However, for production deployments, you might wish to evaluate these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to begin using the model.

When the implementation is complete, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in play area to access an interactive user interface where you can experiment with different prompts and change model criteria like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal results. For instance, content for reasoning.

This is an exceptional method to check out the design's reasoning and text generation capabilities before incorporating it into your applications. The playground supplies instant feedback, helping you understand how the design responds to numerous inputs and letting you tweak your triggers for optimum results.

You can quickly evaluate the design in the playground through the UI. However, to conjure up 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 shows how to carry out reasoning utilizing a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can create 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 created the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up reasoning specifications, and sends out a demand to generate 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 deploy with just a few clicks. With SageMaker JumpStart, 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 uses 2 convenient methods: using the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you select the approach that finest fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

- Model name

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

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

    The design details page includes the following details:

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

    The About tab includes important details, such as:

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

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

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, use the instantly created name or develop a custom one.
  1. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, get in the variety of circumstances (default: 1). Selecting proper circumstances types and counts is important for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for precision. For this model, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to deploy the model.

    The deployment process can take numerous minutes to finish.

    When deployment is complete, your endpoint status will change to InService. At this moment, the model is all set to accept inference demands through the endpoint. You can keep track of the deployment progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the deployment is total, you can conjure up the design using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get started with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the necessary AWS authorizations and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the model is provided in the Github here. You can clone the note pad and setiathome.berkeley.edu range from SageMaker Studio.

    You can run additional requests 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 produce a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:

    Clean up

    To avoid undesirable charges, complete the actions in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you released the model utilizing Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
  5. In the Managed deployments area, find the endpoint you want to erase.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're erasing the proper deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you released 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 checked out how you can access and release the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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 services utilizing AWS services and accelerated compute. Currently, he is concentrated on establishing techniques for fine-tuning and enhancing the inference performance of large language designs. In his leisure time, Vivek enjoys hiking, enjoying motion pictures, and attempting different cuisines.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group 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 Professional Solutions Architect working on 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 enthusiastic about constructing options that assist customers accelerate their AI journey and unlock organization value.
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: antwanflanagan/stay-22#33