Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
1
199
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 2
    • Issues 2
    • 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
  • Bernie Sulman
  • 199
  • Issues
  • #2

Closed
Open
Opened Apr 08, 2025 by Bernie Sulman@berniesulman14
  • Report abuse
  • New issue
Report abuse New issue

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


Today, we are delighted 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, along with the distilled variations ranging from 1.5 to 70 billion parameters to construct, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled versions of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that utilizes support discovering to enhance reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key identifying feature is its support learning (RL) step, which was utilized to improve the model's responses beyond the basic pre-training and tweak procedure. By incorporating RL, DeepSeek-R1 can adapt more effectively to user feedback and objectives, ultimately improving both relevance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, implying it's equipped to break down complicated queries and factor through them in a detailed manner. This guided reasoning procedure enables the design to produce more precise, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has caught the market's attention as a flexible text-generation model that can be integrated into various workflows such as agents, sensible reasoning and information analysis tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion parameters, making it possible for effective reasoning by routing questions to the most relevant professional "clusters." This approach allows the design to focus on different issue domains while maintaining total efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 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 describes a process of training smaller sized, more effective designs to simulate the habits and thinking patterns of the larger DeepSeek-R1 model, utilizing it as a teacher model.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend deploying this model with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent harmful content, and examine designs against crucial security criteria. At the time of composing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create multiple guardrails tailored to different usage cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you require 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 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 request a limit increase, produce a limitation boost request 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) consents to use Amazon Bedrock Guardrails. For directions, see Set up authorizations to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid hazardous content, and assess designs against crucial safety criteria. You can execute safety procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to assess user inputs and model reactions 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 produce the guardrail, see the GitHub repo.

The general flow 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 reasoning. After receiving the design's output, another guardrail check is used. 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 suggesting the nature of the intervention and whether it took place at the input or wiki.whenparked.com output phase. The examples showcased in the following areas show reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

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

The model detail page offers essential details about the model's abilities, rates structure, and application guidelines. You can find detailed usage guidelines, consisting of sample API calls and code bits for combination. The design supports various text generation tasks, consisting of content creation, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT thinking abilities. The page likewise consists of release options and licensing details to help you get going with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, pick Deploy.

You will be triggered to configure the deployment details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of circumstances, get in a variety of instances (between 1-100). 6. For Instance type, choose your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended. Optionally, you can set up innovative security and facilities settings, including virtual private cloud (VPC) networking, service function approvals, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production deployments, you may want to review these settings to line up 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 capabilities straight in the Amazon Bedrock playground. 8. Choose Open in play area to access an interactive user interface where you can experiment with various prompts and adjust design criteria like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For instance, material for reasoning.

This is an excellent method to check out the model's reasoning and text generation abilities before integrating it into your applications. The playground provides instant feedback, assisting you comprehend how the design reacts to different inputs and letting you fine-tune your triggers for optimum results.

You can quickly test the model in the play area through the UI. However, to conjure up the released design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference using guardrails with the released DeepSeek-R1 endpoint

The following code example demonstrates how to carry out inference utilizing a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce 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 produced the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime client, configures inference specifications, and sends a request to generate text based on a user timely.

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 simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses 2 convenient methods: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to help you choose the method that best fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to release DeepSeek-R1 utilizing SageMaker JumpStart:

1. On the SageMaker console, select 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 models, with details like the service provider name and model abilities.

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

- Model name

  • Provider name
  • Task classification (for example, Text Generation). Bedrock Ready badge (if suitable), indicating that this design can be registered with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to invoke the model

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

    The design details page consists of the following details:

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

    The About tab consists of crucial details, such as:

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

    Before you deploy the design, it's recommended to evaluate the model details and license terms to verify compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For archmageriseswiki.com Endpoint name, use the automatically created name or produce a custom one.
  1. For example type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, get in the variety of instances (default: 1). Selecting suitable circumstances types and counts is vital for expense and efficiency optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is selected by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for accuracy. For this design, we highly recommend sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to deploy the model.

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

    When deployment is total, your endpoint status will change to InService. At this point, the model is prepared to accept reasoning demands through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is total, you can invoke the model using a SageMaker runtime client and incorporate it with your .

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get started with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the necessary AWS approvals and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for reasoning programmatically. The code for releasing the design is supplied in the Github here. You can clone the notebook and bytes-the-dust.com run from SageMaker Studio.

    You can run additional demands against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Clean up

    To avoid unwanted charges, complete the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you released the design using Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace implementations.
  5. In the Managed releases section, find the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting 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 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 release the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, 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 helps emerging generative AI business construct innovative services using AWS services and sped up calculate. Currently, he is concentrated on developing strategies for fine-tuning and enhancing the inference efficiency of large language designs. In his spare time, bytes-the-dust.com Vivek enjoys hiking, seeing films, and attempting various 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 item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about developing solutions that assist clients accelerate their AI journey and unlock business worth.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: berniesulman14/199#2