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


Today, we are thrilled 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 deploy DeepSeek AI’s first-generation frontier design, DeepSeek-R1, along with the distilled versions varying from 1.5 to 70 billion parameters to develop, experiment, and responsibly scale your generative AI ideas on AWS.

In this post, we show how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to release the distilled variations of the designs also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses support finding out to enhance thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A key identifying function is its support knowing (RL) step, which was utilized to fine-tune the model’s reactions beyond the standard pre-training and tweak process. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually improving both relevance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, meaning it’s equipped to break down complicated questions and factor through them in a detailed manner. This directed reasoning procedure allows the design to produce more accurate, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured reactions while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has captured the market’s attention as a flexible text-generation model that can be incorporated into different workflows such as representatives, sensible reasoning and information interpretation jobs.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion specifications, making it possible for effective reasoning by routing queries to the most relevant professional “clusters.” This method permits the model to focus on various problem domains while maintaining overall effectiveness. 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 includes 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning abilities of the main R1 model 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 efficient models to imitate the behavior and reasoning patterns of the bigger DeepSeek-R1 model, using it as an instructor model.

You can deploy 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 site, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful content, and examine models against essential safety criteria. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and surgiteams.com Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing safety 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 confirm you’re using 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 ask for a limitation boost, create 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 right AWS Identity and Gain Access To Management (IAM) permissions to use Amazon Bedrock Guardrails. For directions, see Set up permissions to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent harmful material, and examine models against essential security requirements. You can implement safety steps for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and model actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo.

The general circulation involves the following steps: First, the system gets an input for the model. 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 model’s output, another guardrail check is applied. If the output passes this final check, it’s returned as the result. However, if either the input or output is intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it took place 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 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 use the InvokeModel API to conjure up the model. It does not support Converse APIs and other Amazon Bedrock tooling.

  1. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.

    The model detail page supplies essential details about the design’s abilities, prices structure, and implementation standards. You can find detailed use directions, fishtanklive.wiki consisting of sample API calls and code snippets for combination. The model supports different text generation jobs, including content development, code generation, and question answering, using its reinforcement learning optimization and CoT reasoning abilities. The page also consists of implementation options and licensing details to assist you get going with DeepSeek-R1 in your applications.
  2. To begin utilizing DeepSeek-R1, select Deploy.

    You will be prompted to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated.
  3. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
  4. For Variety of instances, enter a number of circumstances (between 1-100).
  5. For Instance type, choose your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can set up advanced security and facilities settings, consisting of virtual private cloud (VPC) networking, service function consents, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production implementations, you might wish to evaluate these settings to align with your organization’s security and compliance requirements.
  6. Choose Deploy to start using the model.

    When the deployment is complete, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock playground.
  7. Choose Open in playground to access an interactive interface where you can experiment with various triggers and change model specifications like temperature and optimum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat design template for optimal results. For example, material for inference.

    This is an outstanding way to explore the design’s reasoning and text generation abilities before incorporating it into your applications. The play ground supplies instant feedback, helping you understand how the design responds to different inputs and letting you fine-tune your triggers for ideal results.

    You can rapidly check the model in the playground through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

    Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint

    The following code example shows how to carry out inference utilizing a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have produced the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime customer, sets up reasoning specifications, and sends out a demand to produce text based upon 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 services that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and release them into production using either the UI or SDK.

    Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 convenient methods: using the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let’s check out both approaches to assist you select the method that best suits your needs.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

    The model browser displays available models, with details like the company name and design abilities.

    4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows key details, consisting of:

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

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

    The design details page consists of the following details:

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

    The About tab includes important details, such as:

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

    Before you release the design, it’s to examine the design details and license terms to verify compatibility with your usage case.

    6. Choose Deploy to proceed with deployment.

    7. For wiki.dulovic.tech Endpoint name, utilize the automatically produced name or create a custom-made one.
  15. For example type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial instance count, enter the variety of circumstances (default: 1). Selecting suitable instance types and raovatonline.org counts is crucial for cost and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time inference is selected by default. This is enhanced for sustained traffic and low latency.
  17. Review all setups for accuracy. For this model, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  18. Choose Deploy to release the design.

    The release process can take several minutes to finish.

    When implementation is total, your endpoint status will alter to InService. At this point, the model is prepared to accept reasoning requests through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the release is total, you can invoke the model using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing 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 authorizations and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for reasoning programmatically. The code for deploying the model is provided in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run extra demands against the predictor:

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

    Tidy up

    To avoid unwanted charges, wiki.snooze-hotelsoftware.de finish the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace implementation

    If you deployed the model utilizing Amazon Bedrock Marketplace, [forum.batman.gainedge.org](https://forum.batman.gainedge.org/index.php?action=profile