DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
roman997606574 於 6 月之前 修改了此頁面


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 design, disgaeawiki.info DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to release the distilled versions of the models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that utilizes reinforcement discovering to enhance thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key differentiating feature is its support learning (RL) action, which was utilized to refine the model’s responses beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust more efficiently to user feedback and goals, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, indicating it’s equipped to break down intricate queries and factor through them in a detailed manner. This assisted reasoning procedure allows the design to produce more accurate, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT abilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has caught the industry’s attention as a versatile text-generation design that can be incorporated into different workflows such as representatives, sensible thinking and data interpretation jobs.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion criteria, allowing effective inference by routing inquiries to the most relevant specialist “clusters.” This technique permits the design to specialize in different problem domains while maintaining total effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning 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 refers to a procedure of training smaller, more efficient designs to simulate the habits and thinking patterns of the bigger DeepSeek-R1 model, using it as a teacher design.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend deploying this design with guardrails in place. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent damaging material, and evaluate models against crucial security 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 various use 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, pick Amazon SageMaker, and verify you’re using 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 releasing. To request a limit increase, produce a limit boost request and reach out to your account team.

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) permissions to use Amazon Bedrock Guardrails. For instructions, see Set up permissions to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent hazardous content, and examine models against essential security criteria. You can carry out security measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine user inputs and design responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.

The basic flow includes the following actions: 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 model’s output, another guardrail check is used. If the output passes this last check, it’s returned as the outcome. However, if either the input or output is stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following sections show 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 models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:

1. On the Amazon Bedrock console, select Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can use the InvokeModel API to conjure up the model. It doesn’t support Converse APIs and other Amazon Bedrock tooling.

  1. Filter for surgiteams.com DeepSeek as a service provider and select the DeepSeek-R1 model.

    The model detail page provides vital details about the design’s abilities, prices structure, and application guidelines. You can find detailed usage guidelines, including sample API calls and code bits for combination. The design supports numerous text generation jobs, consisting of material production, code generation, and concern answering, wiki.dulovic.tech using its reinforcement discovering optimization and CoT thinking abilities. The page also includes deployment alternatives and licensing details to help you begin with DeepSeek-R1 in your applications.
  2. 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.
  3. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
  4. For Number of instances, get in a number of instances (in between 1-100).
  5. For example type, choose your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up innovative security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service role approvals, and file encryption settings. For wiki.whenparked.com a lot of utilize cases, the default settings will work well. However, for production releases, you might wish to examine these settings to align with your organization’s security and compliance requirements.
  6. Choose Deploy to begin utilizing the design.

    When the release is complete, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock play ground.
  7. Choose Open in play ground to access an interactive interface where you can experiment with various prompts and adjust design criteria like temperature and optimum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat design template for optimal outcomes. For instance, material for inference.

    This is an outstanding way to check out the design’s thinking and text generation capabilities before integrating it into your applications. The playground offers instant feedback, assisting you comprehend how the to various inputs and letting you tweak your triggers for optimal outcomes.

    You can quickly test the model in the play area through the UI. However, to invoke the released 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 shows how to perform inference utilizing a deployed DeepSeek-R1 model through Amazon Bedrock using 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 produced the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, configures inference parameters, wiki.whenparked.com and sends a demand to produce text based upon a user timely.

    Deploy DeepSeek-R1 with SageMaker JumpStart

    SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML services that you can deploy with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and release them into production utilizing either the UI or SDK.

    Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 hassle-free methods: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let’s explore both approaches to assist you pick the approach that best suits your needs.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

    1. On the SageMaker console, select Studio in the navigation pane.
  8. First-time users will be triggered to create a domain.
  9. On the SageMaker Studio console, pick JumpStart in the navigation pane.

    The design web browser shows available models, with details like the company name and model capabilities.

    4. Search for engel-und-waisen.de DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows crucial details, including:

    - Model name
  10. Provider name
  11. Task category (for example, Text Generation). Bedrock Ready badge (if suitable), suggesting that this model can be registered with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to conjure up the model

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

    The model details page includes the following details:

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

    The About tab includes important details, such as:

    - Model description.
  12. License details.
  13. Technical requirements.
  14. Usage standards

    Before you deploy the model, it’s recommended to examine the design details and license terms to confirm compatibility with your use case.

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, use the automatically created name or produce a custom-made one.
  15. For Instance type ¸ select an instance type (default: ml.p5e.48 xlarge).
  16. For Initial instance count, enter the number of instances (default: 1). Selecting suitable circumstances types and counts is crucial for cost and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is optimized for sustained traffic and low latency.
  17. Review all setups for precision. For this design, we highly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  18. Choose Deploy to deploy the design.

    The deployment process can take numerous minutes to complete.

    When release is complete, your endpoint status will alter to InService. At this point, the model 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 relevant metrics and status details. When the release is complete, you can conjure up the design using a SageMaker runtime client and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, 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 provided in the Github here. You can clone the notebook and run 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 likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and execute it as shown in the following code:

    Clean up

    To prevent unwanted charges, finish the actions in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
  19. In the Managed deployments area, find the endpoint you wish to delete.
  20. Select the endpoint, and on the Actions menu, select Delete.
  21. Verify the endpoint details to make certain you’re deleting the correct release: 1. Endpoint name.
  22. Model name.
  23. 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 erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we checked out how you can access and release the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, it-viking.ch 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 companies build innovative solutions utilizing AWS services and accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and enhancing the inference performance of big language designs. In his leisure time, Vivek takes pleasure in treking, seeing movies, and attempting various foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team 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 working on generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker’s artificial intelligence and generative AI hub. She is enthusiastic about building services that help customers accelerate their AI journey and unlock service value.