DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
erikareiber21이(가) 2 달 전에 이 페이지를 수정함


Today, we are excited to reveal that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek AI’s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations varying from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled variations of the models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that utilizes reinforcement learning to improve reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A key identifying function is its support knowing (RL) action, which was utilized to refine the design’s responses beyond the basic pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adapt more efficiently to user feedback and goals, ultimately improving both relevance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, suggesting it’s equipped to break down intricate questions and factor through them in a detailed manner. This guided reasoning process allows the design to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT capabilities, systemcheck-wiki.de aiming to produce structured actions while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has actually recorded the market’s attention as a flexible text-generation model that can be incorporated into different workflows such as representatives, rational reasoning and information interpretation tasks.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion specifications, making it possible for efficient reasoning by routing questions to the most appropriate specialist “clusters.” This method allows the design to concentrate on different issue domains while maintaining total efficiency. DeepSeek-R1 requires 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 deploy the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 design 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 process of training smaller sized, more effective models to imitate the habits and thinking patterns of the larger DeepSeek-R1 model, using it as a teacher design.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this model with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and evaluate models against essential safety requirements. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create numerous guardrails tailored to various usage 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 usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are releasing. To ask for a limitation boost, develop a limit boost demand and connect to your account team.

Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) consents to utilize Amazon Bedrock Guardrails. For guidelines, see Set up permissions to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, avoid damaging material, wiki.dulovic.tech and assess models against crucial security criteria. You can carry out security measures for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to examine user inputs and design reactions deployed 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 develop the guardrail, see the GitHub repo.

The basic circulation includes 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 to the model for reasoning. After receiving the design’s output, another guardrail check is used. If the output passes this last check, it’s returned as the result. However, if either the input or output is intervened by the guardrail, wiki.dulovic.tech a message is returned suggesting the nature of the intervention and whether it occurred at the input or output stage. The examples showcased in the following areas 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 foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following steps:

1. On the Amazon Bedrock console, choose Model catalog under Foundation designs 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 DeepSeek as a company and choose the DeepSeek-R1 design.

    The design detail page supplies vital details about the design’s capabilities, prices structure, and application guidelines. You can find detailed usage guidelines, consisting of sample API calls and wiki.whenparked.com code bits for integration. The design supports various text generation tasks, consisting of content production, code generation, and question answering, using its reinforcement discovering optimization and CoT thinking abilities. The page likewise includes deployment alternatives and mediawiki.hcah.in licensing details to assist you begin with DeepSeek-R1 in your applications.
  2. To start utilizing DeepSeek-R1, choose Deploy.

    You will be prompted to set up the implementation details for DeepSeek-R1. The model ID will be pre-populated.
  3. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
  4. For Variety of circumstances, get in a variety of circumstances (in between 1-100).
  5. For example type, select your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up innovative security and facilities settings, consisting of virtual private cloud (VPC) networking, service function consents, and encryption settings. For the majority of use cases, the default settings will work well. However, for production deployments, you may wish to evaluate these settings to align with your company’s security and compliance requirements.
  6. Choose Deploy to start utilizing the model.

    When the implementation is total, you can test DeepSeek-R1’s abilities straight in the Amazon Bedrock playground.
  7. Choose Open in playground to access an interactive user interface where you can try out different triggers and change design parameters like temperature and optimum length. When using R1 with Bedrock’s InvokeModel and Playground Console, utilize DeepSeek’s chat design template for ideal results. For example, material for reasoning.

    This is an outstanding way to check out the design’s reasoning and text generation abilities before integrating it into your applications. The play area provides immediate feedback, helping you comprehend how the design reacts to different inputs and letting you tweak your prompts for optimum outcomes.

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

    Run inference using guardrails with the deployed DeepSeek-R1 endpoint

    The following code example shows how to carry out reasoning using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail using 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 . The script initializes the bedrock_runtime customer, sets up inference specifications, and sends out a demand to produce text based on a user timely.

    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 deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and deploy them into production utilizing either the UI or SDK.

    Deploying DeepSeek-R1 model through SageMaker JumpStart provides 2 practical approaches: utilizing the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let’s check out both approaches to assist you select the approach that finest matches your requirements.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

    The design browser shows available designs, with details like the provider name and model abilities.

    4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card. Each design card shows essential details, consisting of:

    - Model name
  10. Provider name
  11. Task category (for example, Text Generation). Bedrock Ready badge (if suitable), showing that this design can be signed up with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to invoke the design

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

    The design details page includes the following details:

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

    The About tab consists of essential details, such as:

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

    Before you release the design, it’s suggested to review the model details and license terms to validate compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, utilize the automatically generated name or develop a customized one.
  14. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  15. For Initial circumstances count, get in the variety of circumstances (default: 1). Selecting proper instance types and counts is crucial for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is enhanced for sustained traffic and low latency.
  16. Review all configurations for accuracy. For this design, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  17. Choose Deploy to release the design.

    The deployment process can take several minutes to finish.

    When implementation is total, your endpoint status will change to InService. At this moment, the model is all set to accept inference demands through the endpoint. You can monitor the release progress on the SageMaker console Endpoints page, which will show relevant metrics and it-viking.ch status details. When the implementation is complete, 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 begin with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the needed AWS consents and environment setup. The following is a detailed code example that shows how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for releasing the model is provided in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run additional requests against the predictor:

    Implement guardrails and run reasoning 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 using the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Tidy up

    To prevent unwanted charges, finish the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you deployed the design using Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace implementations.
  18. In the Managed releases area, find the endpoint you wish to delete.
  19. Select the endpoint, and on the Actions menu, choose Delete.
  20. Verify the endpoint details to make certain you’re erasing the correct release: 1. Endpoint name.
  21. Model name.
  22. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you deployed will sustain expenses 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 release the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. 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 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 solutions utilizing AWS services and sped up compute. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the inference efficiency of big language models. In his downtime, Vivek takes pleasure in treking, viewing films, 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 a Professional Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

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