Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
  • Sign in
M
moto-fan
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 43
    • Issues 43
    • 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
  • Adan Freame
  • moto-fan
  • Issues
  • #38

Closed
Open
Opened Jun 01, 2025 by Adan Freame@adanfreame9312
  • 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 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 model, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative AI ideas on AWS.

In this post, we show how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled variations of the models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses support finding out to boost thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key differentiating function is its support learning (RL) step, which was used to improve the model's responses beyond the standard pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adjust more effectively to user feedback and objectives, eventually boosting both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, indicating it's equipped to break down complex questions and factor through them in a detailed manner. This assisted thinking the model to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to create structured actions while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has recorded the market's attention as a flexible text-generation model that can be incorporated into numerous workflows such as agents, rational thinking and information analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, making it possible for efficient inference by routing questions to the most pertinent specialist "clusters." This technique allows the model to concentrate on different problem domains while maintaining total effectiveness. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, engel-und-waisen.de we will utilize an ml.p5e.48 xlarge circumstances to deploy the model. ml.p5e.48 xlarge features 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 efficient architectures based on 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 efficient models to mimic the behavior and thinking patterns of the larger DeepSeek-R1 model, utilizing it as an instructor model.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest releasing this model with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid harmful content, and evaluate designs against crucial safety criteria. 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 produce several guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, improving user experiences and surgiteams.com standardizing safety controls throughout 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, choose 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 releasing. To request a limitation boost, develop a limitation boost request and connect 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) approvals to use Amazon Bedrock Guardrails. For directions, see Set up approvals to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent harmful material, and evaluate designs against key security criteria. You can implement precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and design reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using 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 design. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent out to the model for inference. After receiving the design'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 suggesting the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following areas show inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides 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 catalog under Foundation models in the navigation pane. At the time of composing this post, you can use the InvokeModel API to invoke the model. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a service provider and choose the DeepSeek-R1 model.

The model detail page offers necessary details about the design's abilities, rates structure, and execution standards. You can find detailed use instructions, including sample API calls and code snippets for integration. The design supports numerous text generation jobs, including content creation, code generation, and question answering, utilizing its support finding out optimization and CoT thinking abilities. The page likewise consists of deployment alternatives and licensing details to help you get started with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, pick Deploy.

You will be prompted to configure the deployment details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters). 5. For Number of circumstances, go into a variety of instances (between 1-100). 6. For example type, choose your circumstances 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 personal cloud (VPC) networking, service role permissions, and encryption settings. For many use cases, the default settings will work well. However, for production implementations, you might wish to examine these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to start using the model.

When the deployment is total, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in play area to access an interactive interface where you can experiment with various triggers and change design criteria like temperature and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, content for inference.

This is an outstanding method to check out the design's thinking and text generation abilities before integrating it into your applications. The play ground provides immediate feedback, assisting you comprehend how the model reacts to different inputs and letting you tweak your triggers for wiki.whenparked.com optimal results.

You can quickly evaluate 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 carry out inference using a released DeepSeek-R1 design 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 produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up reasoning parameters, and sends out a request to generate text based upon a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

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

Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 convenient techniques: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both methods to assist you pick the approach that best matches your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to deploy DeepSeek-R1 using 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 design web browser displays available models, with details like the service provider name and model capabilities.

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

- Model name

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

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

    The design details page includes the following details:

    - The model name and supplier 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 standards

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

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, utilize the immediately generated name or create a custom-made one.
  1. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, get in the number of instances (default: 1). Selecting proper circumstances types and counts is crucial for expense and efficiency optimization. Monitor your implementation 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 configurations for accuracy. For this model, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the design.

    The release procedure can take several minutes to finish.

    When release is complete, your endpoint status will change to InService. At this point, the design is all set to accept inference demands through the endpoint. You can keep an eye on the release progress on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is total, you can conjure up the model using a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To begin 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 release and use DeepSeek-R1 for inference programmatically. The code for releasing the design is offered in the Github here. You can clone the note pad and range 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 implement it as revealed in the following code:

    Tidy up

    To avoid undesirable charges, finish the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace implementation

    If you released the design utilizing Amazon Bedrock Marketplace, complete the following steps:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, select Marketplace implementations.
  5. In the Managed implementations area, locate the endpoint you want 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 appropriate release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you deployed 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 checked out 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 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 Getting going with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI business build ingenious services utilizing AWS services and accelerated compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the inference efficiency of big language models. In his totally free time, Vivek takes pleasure in treking, watching motion pictures, and attempting different foods.

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

    Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about developing services that help clients accelerate their AI journey and unlock company 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: adanfreame9312/moto-fan#38