Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
J jackyu
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
Collapse sidebar
  • Alisha Rea
  • jackyu
  • Issues
  • #17

Closed
Open
Created Apr 06, 2025 by Alisha Rea@alisharea05160Maintainer

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


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

In this post, we demonstrate how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled variations of the models too.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses support learning to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential differentiating function is its support knowing (RL) action, which was utilized to improve the design's reactions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adapt more effectively to user feedback and objectives, ultimately enhancing both relevance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, implying it's geared up to break down complex inquiries and factor through them in a detailed way. This directed reasoning procedure allows the design to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT capabilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has caught the market's attention as a versatile text-generation model that can be integrated into different workflows such as agents, rational reasoning and information analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion parameters, making it possible for effective inference by routing inquiries to the most relevant professional "clusters." This approach permits the model to specialize in different issue domains while maintaining general effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for engel-und-waisen.de inference. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the model. 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 efficient architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more effective models to imitate the habits and thinking patterns of the bigger DeepSeek-R1 design, utilizing it as a teacher design.

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 location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and evaluate designs against key safety criteria. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop numerous guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, you require access to an ml.p5e instance. To examine 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 deploying. To ask for a limit boost, create a limitation boost request and connect 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) authorizations to utilize Amazon Bedrock Guardrails. For guidelines, see Set up approvals to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent harmful material, and examine designs against crucial security requirements. You can implement precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and design reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The general flow involves 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 reasoning. After receiving the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the result. However, 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 occurred 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 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, total the following steps:

1. On the Amazon Bedrock console, pick Model brochure under Foundation designs in the navigation pane. At the time of composing this post, you can use the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a supplier and pick the DeepSeek-R1 model.

The design detail page offers essential details about the design's abilities, pricing structure, wiki.dulovic.tech and implementation standards. You can find detailed usage guidelines, consisting of sample API calls and code bits for combination. The model supports numerous text generation tasks, consisting of material creation, code generation, and concern answering, using its reinforcement discovering optimization and CoT thinking capabilities. The page likewise includes release alternatives 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 set up 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 Variety of instances, go into a variety of circumstances (between 1-100). 6. For Instance type, choose your circumstances type. For optimal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up sophisticated security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function permissions, and file encryption settings. For the majority of use cases, the default settings will work well. However, for production implementations, you may wish to review these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start using the design.

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 user interface where you can experiment with various triggers and change model criteria like temperature level and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For instance, content for reasoning.

This is an outstanding method to explore the design's reasoning and text generation abilities before incorporating it into your applications. The play area offers instant feedback, helping you comprehend how the design responds to numerous inputs and letting you tweak your triggers for optimum outcomes.

You can quickly test the design 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 reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to carry out inference using a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. 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. After you have actually created the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, configures reasoning criteria, and sends a request to generate text based upon a user prompt.

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, wavedream.wiki you can tailor pre-trained designs to your usage case, with your information, and release them into either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart provides 2 hassle-free methods: using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you select the method that finest suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows crucial details, consisting of:

- Model name

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

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

    The design details page consists of the following details:

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

    The About tab includes essential details, such as:

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

    Before you release the design, it's advised to evaluate the design details and license terms to validate compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the immediately generated name or develop a custom-made one.
  1. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the variety of instances (default: 1). Selecting suitable instance types and counts is crucial for expense and efficiency optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, surgiteams.com Real-time inference is chosen by default. This is optimized for sustained traffic and low latency.
  3. Review all setups for accuracy. For this model, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the design.

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

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

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get going with DeepSeek-R1 using the SageMaker Python SDK, bytes-the-dust.com you will need to install the SageMaker Python SDK and make certain you have the necessary AWS consents and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for reasoning programmatically. The code for releasing 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 also use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and implement it as revealed in the following code:

    Tidy up

    To prevent unwanted charges, finish the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
  5. In the Managed implementations area, locate 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 implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model 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 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. 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 begun 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 develop ingenious services utilizing AWS services and accelerated calculate. Currently, he is concentrated on developing techniques for fine-tuning and optimizing the inference performance of big language models. In his complimentary time, Vivek takes pleasure in treking, seeing movies, and attempting various cuisines.

    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 technology and 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 wiki.rolandradio.net strategic partnerships for 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 business worth.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking