Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
T
thegrainfather
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 1
    • Issues 1
    • 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
  • Garnet Gerald
  • thegrainfather
  • Issues
  • #1

Closed
Open
Opened Apr 08, 2025 by Garnet Gerald@garnetgerald47
  • 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 models 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 varying from 1.5 to 70 billion criteria to develop, experiment, and responsibly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that uses support discovering to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key identifying feature is its support learning (RL) step, which was used to improve the model's responses beyond the basic pre-training and fine-tuning process. By integrating RL, DeepSeek-R1 can adapt more effectively to user feedback and objectives, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, suggesting it's geared up to break down complicated questions and factor through them in a detailed way. This directed thinking procedure allows the model to produce more precise, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured reactions while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has actually recorded the industry's attention as a flexible text-generation model that can be integrated into various workflows such as agents, logical reasoning and information interpretation tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion criteria, making it possible for efficient reasoning by routing inquiries to the most relevant specialist "clusters." This approach enables the model to specialize in various issue domains while maintaining overall efficiency. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning abilities 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 describes a procedure of training smaller, more efficient models to simulate the habits and thinking patterns of the larger DeepSeek-R1 design, using it as a teacher design.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise deploying this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous material, and examine designs against key security requirements. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create numerous guardrails tailored to various use cases and use them to the DeepSeek-R1 model, improving user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you need access to an ml.p5e circumstances. To examine 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 usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are deploying. To ask for a limitation boost, develop a limit boost request and connect to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent damaging content, and examine models against key safety criteria. You can implement safety procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to evaluate user inputs and model actions deployed 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 develop the guardrail, see the GitHub repo.

The general circulation includes the following steps: First, the system receives 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 wiki.myamens.com inference. After getting the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the result. However, setiathome.berkeley.edu if either the input or output is stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following sections demonstrate reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers 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 actions:

1. On the Amazon Bedrock console, bytes-the-dust.com pick Model brochure under Foundation designs in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to conjure up 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 model.

The model detail page provides important details about the model's capabilities, rates structure, and implementation guidelines. You can discover detailed use instructions, consisting of sample API calls and code bits for combination. The design supports different text generation jobs, consisting of content development, code generation, and question answering, using its support finding out optimization and CoT reasoning abilities. The page likewise consists of implementation options and licensing details to help you get going with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, pick 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, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Number of circumstances, get in a number of instances (in between 1-100). 6. For Instance type, pick your circumstances type. For optimal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can set up sophisticated security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function authorizations, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production releases, you may want to examine these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start using the design.

When the release is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in play ground to access an interactive interface where you can explore various triggers and adjust design specifications like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum results. For example, content for reasoning.

This is an excellent method to explore the model's thinking and text generation capabilities before incorporating it into your applications. The play ground supplies instant feedback, helping you understand how the model responds to various inputs and letting you fine-tune your triggers for optimal results.

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

Run inference utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example demonstrates how to perform reasoning using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have actually produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up reasoning criteria, and sends out a demand to create text based on a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML services that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses two practical methods: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both techniques to help you select the method that finest suits 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, pick Studio in the navigation pane. 2. First-time users will be prompted to create a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

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

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

- Model name

  • Provider name
  • Task category (for example, Text Generation). Bedrock Ready badge (if relevant), suggesting that this design can be signed up with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to invoke the design

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

    The model details page consists of the following details:

    - The model name and service provider 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 requirements.
  • Usage guidelines

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

    6. Choose Deploy to continue with release.

    7. For Endpoint name, use the instantly produced name or develop a customized one.
  1. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the number of circumstances (default: 1). Selecting suitable circumstances types and counts is important for expense and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is optimized for sustained traffic and archmageriseswiki.com low latency.
  3. Review all configurations for precision. For this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the design.

    The release process can take numerous minutes to complete.

    When release is complete, your endpoint status will alter to InService. At this moment, the model is all set to accept reasoning requests through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is complete, you can invoke the design using a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To start 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 demonstrates how to deploy and use DeepSeek-R1 for reasoning programmatically. The code for deploying the design is offered in the Github here. You can clone the notebook and range from SageMaker Studio.

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

    Tidy up

    To prevent undesirable charges, complete the steps in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace implementation

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace implementations.
  5. In the Managed deployments section, find 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 deleting 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 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 get going. For more details, refer to 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 at AWS. He assists emerging generative AI companies construct ingenious services using AWS services and accelerated calculate. Currently, he is focused on developing techniques for fine-tuning and optimizing the reasoning efficiency of big language models. In his downtime, Vivek delights in hiking, enjoying motion pictures, and attempting different cuisines.

    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 Professional Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is enthusiastic about developing options that assist clients accelerate their AI journey and 89u89.com unlock company value.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: garnetgerald47/thegrainfather#1