Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Contribute to GitLab
  • Sign in / Register
P
ptube
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 93
    • Issues 93
    • 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
  • Adolfo Whitlow
  • ptube
  • Issues
  • #63

Closed
Open
Opened Apr 08, 2025 by Adolfo Whitlow@adolfowhitlow
  • 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 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, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to construct, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled versions of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that utilizes reinforcement discovering to enhance reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential differentiating function is its support knowing (RL) action, which was utilized to improve the design's actions beyond the basic pre-training and tweak procedure. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually enhancing both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, suggesting it's geared up to break down intricate questions and factor forum.pinoo.com.tr through them in a detailed way. This guided reasoning procedure enables the model to produce more precise, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to create structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually captured the industry's attention as a versatile text-generation design that can be incorporated into different workflows such as representatives, rational thinking and information analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion criteria, making it possible for effective reasoning by routing inquiries to the most relevant specialist "clusters." This method enables the model to focus on different issue domains while maintaining general performance. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to release the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 design to more efficient architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller, more effective designs to imitate the behavior and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as a teacher design.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise deploying this design with guardrails in place. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous content, and assess models against key 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 create several guardrails tailored to various use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, 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, select Amazon SageMaker, and confirm you're utilizing 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 request a limit increase, create a limit boost demand and reach out to your account team.

Because you will be releasing this model with Amazon Bedrock Guardrails, higgledy-piggledy.xyz make certain you have the proper AWS Identity and Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For directions, see Establish authorizations to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, prevent hazardous content, and evaluate models against key safety criteria. You can execute security measures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to assess user inputs and design responses 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 develop the guardrail, see the GitHub repo.

The basic flow includes 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 getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the last result. 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 setiathome.berkeley.edu output stage. The examples showcased in the following areas show inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and specialized foundation designs (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 designs in the navigation pane. At the time of composing this post, you can utilize the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 model.

The design detail page offers important details about the model's abilities, rates structure, and application guidelines. You can discover detailed usage instructions, consisting of sample API calls and code snippets for combination. The design supports various text generation tasks, consisting of material development, code generation, and concern answering, utilizing its reinforcement finding out optimization and CoT reasoning capabilities. The page likewise includes deployment options and licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, choose Deploy.

You will be triggered to set up the release details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of circumstances, enter a variety of instances (in between 1-100). 6. For example type, choose your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended. Optionally, you can configure sophisticated security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service function authorizations, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production releases, you might wish to evaluate these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the release is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play area. 8. Choose Open in play ground to access an interactive user interface where you can try out various triggers and adjust design parameters like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum outcomes. For instance, content for inference.

This is an excellent method to check out the design's thinking and text generation capabilities before incorporating it into your applications. The playground offers immediate feedback, assisting you understand how the design responds to various inputs and letting you fine-tune your triggers for optimum results.

You can rapidly evaluate the model in the play ground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

Run reasoning using with the deployed DeepSeek-R1 endpoint

The following code example shows how to perform inference using a deployed 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 developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up reasoning specifications, and sends a request to generate text based upon 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 release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and release them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 convenient methods: using the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both approaches to assist you select the method that finest fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

4. Search 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 instance, Text Generation). Bedrock Ready badge (if suitable), suggesting that this design can be registered with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to invoke the model

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

    The model details page consists of the following details:

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

    The About tab consists of important details, such as:

    - Model description.
  • License details.
  • Technical requirements.
  • Usage standards

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

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, utilize the automatically created name or produce a custom-made one.
  1. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the number of circumstances (default: 1). Selecting proper instance types and counts is essential for cost and efficiency optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is enhanced for sustained traffic and low latency.
  3. Review all setups for accuracy. For this model, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to release the design.

    The deployment procedure can take numerous minutes to finish.

    When release is total, your endpoint status will alter to InService. At this point, the design is ready to accept reasoning demands through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the deployment is total, you can invoke the design utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the needed AWS approvals and environment setup. The following is a detailed code example that demonstrates how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for releasing the model is offered in the Github here. You can clone the notebook 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 also use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop 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 actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you deployed the design 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 implementations section, locate the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting the right 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 delete the endpoint if you desire to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we checked out how you can access and deploy the DeepSeek-R1 model utilizing 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 designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting 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 innovative options using AWS services and sped up calculate. Currently, he is focused on establishing techniques for fine-tuning and enhancing the reasoning performance of large language models. In his leisure time, Vivek enjoys treking, seeing movies, 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 an Expert 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 center. She is enthusiastic about constructing services that help clients accelerate their AI journey and unlock service 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: adolfowhitlow/ptube#63