DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
shari72i81669 upravil tuto stránku před 4 měsíci


Today, we are excited 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 release DeepSeek AI’s first-generation frontier model, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion specifications to build, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we demonstrate how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled variations of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that utilizes reinforcement finding out to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential identifying feature is its reinforcement knowing (RL) step, which was used to improve the model’s responses beyond the basic pre-training and tweak process. By including RL, DeepSeek-R1 can adjust more effectively to user feedback and objectives, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) approach, implying it’s equipped to break down intricate queries and factor through them in a detailed way. This guided thinking procedure allows the model to produce more accurate, transparent, and wiki.snooze-hotelsoftware.de detailed responses. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has caught the industry’s attention as a flexible text-generation model that can be integrated into numerous workflows such as agents, sensible thinking and information analysis jobs.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion criteria, making it possible for efficient inference by routing queries to the most relevant expert “clusters.” This method enables the design to focus on various issue domains while maintaining general efficiency. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 design to more effective architectures based upon 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 designs to simulate the behavior and reasoning patterns of the larger DeepSeek-R1 model, utilizing it as an instructor model.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this design with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid hazardous content, and evaluate models against crucial security requirements. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create multiple guardrails tailored to different usage cases and use them to the DeepSeek-R1 design, 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 instance. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify you’re utilizing ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To request a limit boost, produce a limitation boost request and connect to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to present safeguards, prevent hazardous material, and evaluate models against crucial security criteria. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to evaluate user inputs and model responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create 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 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 out to the design for inference. After receiving the design’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 stepped in 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 sections demonstrate inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and specialized structure designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following steps:

1. On the Amazon Bedrock console, choose Model brochure under Foundation models in the navigation pane. At the time of composing this post, you can use the InvokeModel API to invoke the model. It does not support Converse APIs and other Amazon Bedrock tooling.

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

    The model detail page offers necessary details about the model’s abilities, pricing structure, and execution standards. You can discover detailed usage instructions, consisting of sample API calls and code snippets for combination. The various text generation tasks, consisting of content production, code generation, and question answering, using its support learning optimization and CoT thinking capabilities. The page also consists of implementation choices and licensing details to help you get going with DeepSeek-R1 in your applications.
  2. To start using DeepSeek-R1, select Deploy.

    You will be prompted to set up the deployment details for DeepSeek-R1. The model ID will be pre-populated.
  3. For wiki.dulovic.tech Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
  4. For Variety of instances, go into a variety of instances (in between 1-100).
  5. For Instance type, select your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended. Optionally, you can configure innovative security and facilities settings, including virtual private cloud (VPC) networking, service role permissions, and file encryption settings. For many utilize cases, the default settings will work well. However, for production implementations, you may wish to examine these settings to align with your company’s security and compliance requirements.
  6. Choose Deploy to start utilizing the design.

    When the implementation is complete, you can evaluate DeepSeek-R1’s capabilities straight in the Amazon Bedrock play ground.
  7. Choose Open in play ground to access an interactive interface where you can try out various prompts and change design criteria like temperature and maximum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, utilize DeepSeek’s chat design template for optimal results. For instance, content for reasoning.

    This is an exceptional method to explore the model’s thinking and text generation capabilities before integrating it into your applications. The play area supplies immediate feedback, assisting you understand how the design responds to different inputs and letting you fine-tune your triggers for ideal outcomes.

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

    Run reasoning utilizing guardrails with the released 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 create 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 produced the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up reasoning specifications, and sends out a request to create 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 services that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your data, and deploy them into production using either the UI or SDK.

    Deploying DeepSeek-R1 model through SageMaker JumpStart provides two convenient approaches: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let’s check out both approaches to help you select the technique that best suits your requirements.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

    The model web browser shows available designs, with details like the provider name and model capabilities.

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

    - Model name
  10. Provider name
  11. Task classification (for instance, Text Generation). Bedrock Ready badge (if appropriate), suggesting that this design can be registered with Amazon Bedrock, wiki.eqoarevival.com allowing you to use Amazon Bedrock APIs to invoke the design

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

    The design details page includes the following details:

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

    The About tab consists of important details, such as:

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

    Before you deploy the model, it’s advised to evaluate the design details and license terms to validate compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the immediately produced name or create a customized one.
  15. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial instance count, enter the variety of circumstances (default: 1). Selecting suitable circumstances types and [forum.batman.gainedge.org](https://forum.batman.gainedge.org/index.php?action=profile