Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
  • Sign in
S
sneakerxp
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 23
    • Issues 23
    • 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
  • Amee Gettinger
  • sneakerxp
  • Issues
  • #21

Closed
Open
Opened Apr 06, 2025 by Amee Gettinger@ameegettinger
  • 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 announce 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 design, DeepSeek-R1, along with the distilled versions varying from 1.5 to 70 billion specifications to build, experiment, and properly 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 versions of the designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that utilizes reinforcement discovering to enhance reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A key differentiating function is its reinforcement knowing (RL) action, which was utilized to fine-tune the design's responses beyond the standard pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately boosting both significance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, suggesting it's geared up to break down complicated queries and reason through them in a detailed way. This guided reasoning process allows the design to produce more precise, it-viking.ch transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has recorded the industry's attention as a versatile text-generation model that can be integrated into various workflows such as agents, rational thinking and data analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion specifications, allowing efficient inference by routing queries to the most relevant expert "clusters." This technique enables the model to focus on various issue domains while maintaining overall performance. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to release the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 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 designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller, more effective models to simulate the behavior and thinking patterns of the larger DeepSeek-R1 design, utilizing it as a teacher model.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing 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 requirements. At the time of writing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, you need access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose 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 instance in the AWS Region you are deploying. To request a limit increase, create a limitation boost demand and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, and evaluate models against key security criteria. You can carry out precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to assess user inputs and model actions deployed 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 develop the guardrail, see the GitHub repo.

The basic circulation involves the following steps: First, the system receives 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 model's output, another guardrail check is applied. If the output passes this last check, it's returned as the . 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 happened at the input or output stage. The examples showcased in the following sections demonstrate inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers 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, choose Model brochure under Foundation models 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 provider and pick the DeepSeek-R1 model.

The model detail page provides necessary details about the design's capabilities, rates structure, and application guidelines. You can discover detailed usage instructions, including sample API calls and code snippets for combination. The design supports various text generation tasks, including content creation, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT thinking abilities. The page likewise consists of deployment alternatives and licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, select Deploy.

You will be prompted to configure the deployment details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, go into a variety of instances (in between 1-100). 6. For Instance type, choose your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can configure innovative security and infrastructure settings, including virtual private cloud (VPC) networking, service role approvals, and file encryption settings. For many utilize cases, the default settings will work well. However, for production implementations, you may desire to evaluate these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start using the design.

When the implementation is total, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive interface where you can experiment with different triggers and adjust design criteria like temperature and optimum 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 exceptional method to check out the design's reasoning and text generation capabilities before incorporating it into your applications. The play area supplies immediate feedback, helping you comprehend how the model reacts to numerous inputs and letting you fine-tune your prompts for optimum outcomes.

You can rapidly check the model in the play ground through the UI. However, to conjure up the released design 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 demonstrates how to perform reasoning using a deployed DeepSeek-R1 model 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 carry out guardrails. The script initializes the bedrock_runtime client, configures inference specifications, and sends out a request to generate text based upon 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 release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers two hassle-free techniques: 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 approach that best suits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model internet browser displays available designs, with details like the service provider name and model capabilities.

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

- Model name

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

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

    The model details page consists of the following details:

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

    The About tab consists of important details, such as:

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

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

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, use the automatically generated name or create a custom-made one.
  1. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the variety of circumstances (default: 1). Selecting suitable instance types and counts is essential for expense and efficiency optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for precision. For this model, we highly advise sticking 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 a number of minutes to complete.

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

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get begun with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the required AWS authorizations and wakewiki.de 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 offered in the Github here. You can clone the note pad and run from SageMaker Studio.

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

    Clean up

    To prevent unwanted charges, complete the actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace implementation

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace deployments.
  5. In the Managed deployments area, find the endpoint you desire 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 implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you deployed will sustain costs if you leave it running. Use the following code to erase the endpoint if you desire 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 started. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, 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 construct ingenious services using AWS services and sped up compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the inference efficiency of big language models. In his leisure time, Vivek delights in treking, watching 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 an Expert Solutions Architect working on generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and tactical partnerships for engel-und-waisen.de Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about building options that assist consumers 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: ameegettinger/sneakerxp#21