DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
shellagreville ha modificato questa pagina 6 mesi fa


Today, we are excited 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 release DeepSeek AI’s first-generation frontier design, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion specifications to construct, experiment, and properly 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 versions of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that uses support learning to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key identifying feature is its support knowing (RL) action, which was used to refine the design’s responses beyond the standard pre-training and fine-tuning procedure. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually enhancing both importance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, meaning it’s geared up to break down intricate queries and factor through them in a detailed manner. This guided thinking process enables the model to produce more accurate, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has recorded the market’s attention as a versatile text-generation design that can be incorporated into numerous workflows such as representatives, rational thinking and data analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient inference by routing inquiries to the most relevant expert “clusters.” This approach permits the design to concentrate on different problem domains while maintaining general efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge circumstances to release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 model 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, more effective designs to simulate the behavior and reasoning patterns of the larger DeepSeek-R1 model, 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 design with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous material, and examine designs against crucial security criteria. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop several guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you need 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 confirm you’re utilizing 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 releasing. To ask for a limitation increase, develop a limitation increase request 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) approvals to utilize Amazon Bedrock Guardrails. For directions, see Establish authorizations to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, avoid damaging content, and assess designs against key safety requirements. You can carry out security measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to evaluate user inputs and design 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 produce the guardrail, see the GitHub repo.

The basic circulation includes the following steps: First, the system gets 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 design for inference. After getting the model’s output, another guardrail check is used. If the output passes this final check, it’s returned as the last outcome. However, if either the input or output is intervened by the guardrail, a message is returned showing the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following areas show inference utilizing 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, choose Model brochure under Foundation models in the pane. At the time of writing this post, you can utilize 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 select the DeepSeek-R1 model.

    The design detail page supplies vital details about the design’s capabilities, prices structure, and implementation guidelines. You can find detailed usage guidelines, consisting of sample API calls and code snippets for combination. The model supports various text generation tasks, including content creation, code generation, and question answering, utilizing its reinforcement finding out optimization and disgaeawiki.info CoT thinking abilities. The page also consists of implementation alternatives and licensing details to help you get started with DeepSeek-R1 in your applications.
  2. To begin utilizing DeepSeek-R1, choose Deploy.

    You will be triggered to configure the deployment 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 Variety of instances, get in a variety of instances (between 1-100).
  5. For Instance type, select your circumstances type. For optimum performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, you can set up advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function consents, and file encryption settings. For a lot of utilize cases, the default settings will work well. However, for production deployments, you might want to review these settings to align with your organization’s security and compliance requirements.
  6. Choose Deploy to start utilizing the model.

    When the implementation is complete, you can check DeepSeek-R1’s abilities straight in the Amazon Bedrock play ground.
  7. Choose Open in play area to access an interactive user interface where you can experiment with various triggers and change model specifications like temperature level and optimum length. When using R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat design template for optimal results. For example, material for reasoning.

    This is an excellent method to explore the design’s thinking and text generation abilities before integrating it into your applications. The playground provides immediate feedback, assisting you understand how the design reacts to different inputs and letting you fine-tune your prompts for optimum outcomes.

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

    Run reasoning using guardrails with the released DeepSeek-R1 endpoint

    The following code example shows how to carry out inference utilizing a released DeepSeek-R1 model 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 develop the guardrail, see the GitHub repo. After you have actually created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up reasoning criteria, and sends out a request to create text based upon a user prompt.

    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 just a few clicks. With SageMaker JumpStart, [forum.batman.gainedge.org](https://forum.batman.gainedge.org/index.php?action=profile