Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
D
dost
  • 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
  • Willis Sanders
  • dost
  • Issues
  • #1

Closed
Open
Opened Apr 11, 2025 by Willis Sanders@willissanders
  • Report abuse
  • New issue
Report abuse New issue

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


Today, we are excited 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 deploy DeepSeek AI's first-generation frontier model, DeepSeek-R1, along with the distilled variations ranging from 1.5 to 70 billion parameters to develop, experiment, and properly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that uses reinforcement discovering to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial identifying function is its reinforcement knowing (RL) step, which was used to refine the design's reactions beyond the basic pre-training and wiki.whenparked.com tweak procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and goals, eventually enhancing both relevance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, suggesting it's equipped to break down complex inquiries and reason through them in a detailed manner. This procedure enables the design to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has recorded the market's attention as a flexible text-generation model that can be integrated into various workflows such as agents, rational reasoning and information analysis jobs.

DeepSeek-R1 uses a Mixture 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 inference by routing questions to the most appropriate professional "clusters." This method enables the design to focus on 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 comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking capabilities of the main R1 model to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more effective designs to mimic the habits and thinking patterns of the larger DeepSeek-R1 design, utilizing it as an instructor 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 site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous content, and evaluate designs against key safety 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 develop numerous guardrails tailored to different usage cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're utilizing 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 boost, create a limit increase demand and connect to your account team.

Because you will be releasing 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 instructions, see Set up authorizations to use guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid damaging material, and examine models against essential security requirements. You can execute precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine 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 produce the guardrail, see the GitHub repo.

The general flow 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 to the model for inference. After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the final outcome. However, if either the input or output is intervened 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 inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and wiki.whenparked.com specialized foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete 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 utilize the InvokeModel API to invoke the model. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a supplier and select the DeepSeek-R1 design.

The design detail page supplies essential details about the model's capabilities, prices structure, and execution standards. You can discover detailed use instructions, consisting of sample API calls and code snippets for combination. The design supports various text generation jobs, including material development, code generation, and concern answering, utilizing its reinforcement learning optimization and CoT thinking abilities. The page likewise includes release choices and wiki.snooze-hotelsoftware.de licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, pick Deploy.

You will be triggered to set up the release 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, enter a variety of circumstances (in between 1-100). 6. For example type, select your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service function consents, and encryption settings. For a lot of use cases, the default settings will work well. However, for production deployments, you might want to examine these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to start using the design.

When the release is complete, you can test 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 try out various prompts and change model criteria like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For example, material for inference.

This is an excellent way to check out the design's reasoning and text generation capabilities before integrating it into your applications. The play ground supplies immediate feedback, assisting you comprehend how the model reacts to different inputs and letting you fine-tune your prompts for ideal results.

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

Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example demonstrates how to carry out inference utilizing a deployed DeepSeek-R1 model through Amazon Bedrock utilizing 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 created the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference parameters, and sends a request to create text based upon a user prompt.

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 forum.batman.gainedge.org pre-trained models to your usage case, with your information, and release them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart provides two hassle-free techniques: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both approaches to help you select the technique that best fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to release 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 internet browser displays available models, with details like the company name and design abilities.

4. Search for DeepSeek-R1 to view the DeepSeek-R1 design card. Each design card reveals crucial details, including:

- Model name

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

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

    The model details page includes the following details:

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

    The About tab consists of essential details, such as:

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

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

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the instantly generated name or develop a customized one.
  1. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, get in the number of instances (default: 1). Selecting proper circumstances types and counts is crucial for cost and performance optimization. Monitor your implementation 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 precision. For this model, we strongly advise sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to release the design.

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

    When release is complete, your endpoint status will alter to InService. At this point, the design is prepared to accept inference demands through the endpoint. You can keep track of the implementation progress on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the implementation is total, you can invoke the model utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get begun with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the essential AWS permissions and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the design is supplied in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run additional 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 shown in the following code:

    Tidy up

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

    Delete the Amazon Bedrock Marketplace implementation

    If you deployed the model using Amazon Bedrock Marketplace, complete the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
  5. In the Managed releases area, wiki.asexuality.org 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 erasing the correct release: 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 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 using 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 models, 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 helps emerging generative AI business build innovative solutions using AWS services and sped up calculate. Currently, he is concentrated on establishing methods for fine-tuning and optimizing the reasoning performance of large language designs. In his downtime, Vivek takes pleasure in treking, watching motion pictures, and attempting various foods.

    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 technology and setiathome.berkeley.edu Bioinformatics.

    Jonathan Evans is an Expert Solutions Architect dealing with generative AI with the Third-Party Model Science group 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 constructing solutions that assist clients accelerate their AI journey and unlock service worth.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: willissanders/dost#1