Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Contribute to GitLab
  • Sign in
A
asesordocente
  • 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
  • Jon Horst
  • asesordocente
  • Issues
  • #1

Closed
Open
Opened Apr 10, 2025 by Jon Horst@jonhorst537810
  • 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 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 release DeepSeek AI's first-generation frontier design, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion specifications to build, experiment, and responsibly 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 actions to deploy the distilled versions of the models too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that uses reinforcement finding out to enhance reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential identifying function is its reinforcement knowing (RL) step, which was utilized to fine-tune the model's actions beyond the standard pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust more successfully to user feedback and objectives, eventually boosting both significance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, implying it's geared up to break down complicated questions and reason through them in a detailed way. This assisted reasoning procedure permits the model to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to produce structured reactions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has captured the industry's attention as a versatile text-generation model that can be integrated into various workflows such as representatives, rational thinking and information analysis jobs.

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, enabling efficient reasoning by routing inquiries to the most appropriate professional "clusters." This method permits the design to specialize in various problem domains while maintaining total effectiveness. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning abilities 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 describes a process of training smaller sized, more efficient designs to mimic the behavior and reasoning patterns of the larger DeepSeek-R1 model, utilizing it as an instructor model.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this model with guardrails in location. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid harmful content, and assess models against crucial safety criteria. At the time of writing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to different usage cases and use them to the DeepSeek-R1 model, improving user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To check 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 use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To ask for a limit increase, produce a limitation increase request and reach out to your account group.

Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) approvals to utilize Amazon Bedrock Guardrails. For directions, see Set up approvals to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, and assess designs against key safety criteria. You can implement safety steps for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to evaluate user inputs and model responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.

The general flow includes the following actions: 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 design for reasoning. After getting the design's output, another guardrail check is used. If the output passes this final check, it's returned as the outcome. 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 took place 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 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 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 important details about the model's abilities, prices structure, and implementation standards. You can discover detailed usage directions, consisting of sample API calls and code snippets for integration. The design supports different text generation jobs, including material production, code generation, and question answering, using its support discovering optimization and CoT thinking abilities. The page likewise includes implementation alternatives and licensing details to help you begin with DeepSeek-R1 in your applications. 3. To begin 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, get in an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of circumstances, go into a number of instances (in between 1-100). 6. For Instance type, choose your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, you can configure advanced security and facilities settings, including virtual private cloud (VPC) networking, service role authorizations, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production releases, you may wish to evaluate these settings to align with your company's security and compliance requirements. 7. Choose Deploy to begin using the model.

When the implementation is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock playground. 8. Choose Open in play area to access an interactive user interface where you can experiment with different prompts and change design parameters like temperature level and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum outcomes. For instance, material for inference.

This is an excellent way to explore the design's thinking and text generation abilities before integrating it into your applications. The play ground provides immediate feedback, helping you comprehend how the model responds to different inputs and letting you tweak your triggers for optimum outcomes.

You can rapidly evaluate the model in the play area through the UI. However, to conjure up the deployed model 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 demonstrates how to carry out reasoning utilizing a deployed DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail using the console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have actually developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, sets up reasoning criteria, and sends a request to generate text based on a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can deploy with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and deploy them into production using either the UI or wiki.snooze-hotelsoftware.de SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers two practical techniques: utilizing the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both techniques to help you select the approach that best suits 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 prompted to produce a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

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

4. Search for DeepSeek-R1 to see 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 suitable), showing that this model can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to conjure up the model

    5. Choose the model 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 deploy the design. About and Notebooks tabs with detailed details

    The About tab includes crucial details, such as:

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

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

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, utilize the automatically generated name or produce 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 instances (default: 1). Selecting proper circumstances types and counts is crucial for expense and efficiency optimization. Monitor your deployment 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 configurations for accuracy. For this design, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to release the model.

    The implementation process can take numerous minutes to complete.

    When deployment is complete, your endpoint status will change to InService. At this moment, the model is all set to accept reasoning requests through the endpoint. You can monitor the implementation development on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is total, you can invoke the model using a SageMaker runtime client and integrate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get going with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the required AWS approvals 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 run 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 utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail using the Amazon Bedrock console or engel-und-waisen.de the API, and execute it as shown in the following code:

    Tidy up

    To avoid undesirable charges, complete the actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, select Marketplace deployments.
  5. In the Managed implementations section, find the endpoint you want to delete.
  6. Select the endpoint, and on the Actions menu, select 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 design 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 explored how you can access and deploy the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. 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 it-viking.ch 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 developing techniques for fine-tuning and enhancing the reasoning performance of large language models. In his downtime, Vivek enjoys hiking, enjoying films, 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 Science 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 item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about constructing solutions that assist clients accelerate their AI journey and unlock company value.
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: jonhorst537810/asesordocente#1