Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B bplt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Thelma Burton
  • bplt
  • Issues
  • #3

Closed
Open
Created Feb 07, 2025 by Thelma Burton@thelmaburton64Owner

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


Today, we are thrilled to announce 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, together with the distilled versions ranging 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 start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled versions of the designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that utilizes support discovering to boost thinking abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential differentiating feature is its reinforcement learning (RL) step, which was used to improve the model's reactions beyond the basic pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, indicating it's equipped to break down complicated inquiries and factor through them in a detailed manner. This assisted thinking procedure enables the model to produce more accurate, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT capabilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually captured the industry's attention as a flexible text-generation model that can be integrated into different workflows such as agents, rational reasoning and information analysis tasks.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion specifications, making it possible for efficient inference by routing queries to the most appropriate specialist "clusters." This approach permits the model to concentrate on various issue domains while maintaining overall performance. DeepSeek-R1 requires at least 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 model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking 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 procedure of training smaller sized, more effective models to imitate the habits and thinking patterns of the bigger DeepSeek-R1 design, utilizing it as an instructor design.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise deploying this model with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, prevent damaging content, and evaluate designs against crucial security criteria. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, fishtanklive.wiki Bedrock Guardrails supports only the ApplyGuardrail API. You can develop multiple guardrails tailored to various usage cases and use them to the DeepSeek-R1 model, enhancing 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 instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and verify you're using ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are deploying. To request a limitation increase, develop a limit boost request and connect to your account group.

Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) authorizations to utilize Amazon Bedrock Guardrails. For instructions, see Establish authorizations to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful content, and evaluate models against key security requirements. You can implement precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to evaluate user inputs and design responses deployed 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 basic flow involves the following actions: 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 reasoning. After getting the model's output, another guardrail check is applied. If the output passes this final check, it's returned as the final 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 utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace gives 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 actions:

1. On the Amazon Bedrock console, select Model catalog under Foundation designs in the navigation pane. At the time of writing this post, you can use the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a company and pick the DeepSeek-R1 design.

The design detail page provides essential details about the design's abilities, rates structure, and execution standards. You can discover detailed usage directions, consisting of sample API calls and code bits for combination. The model supports different text generation jobs, consisting of material development, code generation, and question answering, utilizing its reinforcement learning optimization and CoT thinking capabilities. The page also includes implementation choices and licensing details to assist you begin with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, choose Deploy.

You will be triggered to set up the release details for disgaeawiki.info DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Number of instances, get in a number of instances (between 1-100). 6. For Instance type, choose your circumstances type. For optimal efficiency with DeepSeek-R1, engel-und-waisen.de 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 approvals, and encryption settings. For the majority of utilize cases, the default settings will work well. However, for production deployments, you may want to review these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the design.

When the release is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can try out various prompts and change model parameters like temperature level and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, content for reasoning.

This is an outstanding way to explore the design's reasoning and text generation abilities before incorporating it into your applications. The playground offers immediate feedback, helping you comprehend how the design reacts to various inputs and letting you tweak your prompts for optimum outcomes.

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

Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to perform inference using a released DeepSeek-R1 design 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 create the guardrail, see the GitHub repo. After you have produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, configures inference 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) hub with FMs, built-in algorithms, and prebuilt ML solutions that you can release with simply a few clicks. With SageMaker JumpStart, wiki.snooze-hotelsoftware.de you can tailor pre-trained designs to your usage case, with your information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart provides 2 practical techniques: using the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both methods to help you choose the method that finest fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

1. On the SageMaker console, choose 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 designs, with details like the company name and design abilities.

4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card. Each model card reveals essential details, including:

- Model name

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

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

    The model details page consists of the following details:

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

    The About tab includes essential details, such as:

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

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

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, use the immediately produced name or develop a custom-made one.
  1. For example type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, get in the variety of circumstances (default: 1). Selecting suitable instance types and counts is essential for cost and efficiency optimization. Monitor your release 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 design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the design.

    The release process can take numerous minutes to complete.

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

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require 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 demonstrates how to release and use DeepSeek-R1 for reasoning programmatically. The code for releasing the design is provided in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run extra requests 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 the API, and implement it as revealed in the following code:

    Tidy up

    To prevent undesirable charges, finish the steps in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you deployed the model utilizing Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
  5. In the Managed implementations area, locate the endpoint you desire to delete.
  6. Select the endpoint, and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting the right deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed will sustain costs if you leave it running. Use the following code to delete the endpoint if you want 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 model using 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 designs, 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 assists emerging generative AI companies construct ingenious options utilizing AWS services and archmageriseswiki.com accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and optimizing the inference efficiency of large language designs. In his downtime, Vivek enjoys hiking, viewing films, and attempting different 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 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 for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about developing options that help customers accelerate their AI journey and unlock service value.
Assignee
Assign to
Time tracking