1 DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Alphonso Simmons muokkasi tätä sivua 1 kuukausi sitten


Today, we are delighted 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, DeepSeek-R1, along with the distilled versions ranging from 1.5 to 70 billion parameters to build, experiment, and responsibly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that uses reinforcement learning to enhance reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key identifying function is its support learning (RL) action, which was used to refine the model’s responses beyond the standard pre-training and fine-tuning process. By integrating RL, DeepSeek-R1 can adapt more successfully to user feedback and objectives, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, indicating it’s geared up to break down complex questions and reason through them in a detailed manner. This assisted reasoning process allows the model to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT capabilities, aiming to generate structured actions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has captured the market’s attention as a versatile text-generation design that can be integrated into different workflows such as agents, sensible reasoning and information analysis jobs.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion parameters, allowing effective reasoning by routing questions to the most pertinent professional “clusters.” This approach 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 instance to release the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking 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 refers to a procedure of training smaller, more effective designs to mimic the behavior and thinking patterns of the bigger DeepSeek-R1 design, utilizing it as a teacher model.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise deploying this model with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging content, and assess designs against essential safety criteria. At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce multiple guardrails tailored to different usage cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 model, you need access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and validate 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 request a limit increase, create a limit boost request and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to introduce safeguards, prevent damaging content, and assess models against crucial security criteria. You can carry out precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This you to apply guardrails to examine user inputs and design actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.

The general flow involves 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 out to the design for reasoning. After receiving the design’s output, another guardrail check is used. 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 phase. The examples showcased in the following sections demonstrate reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

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

  1. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.

    The design detail page supplies vital details about the model’s capabilities, rates structure, and execution guidelines. You can find detailed usage guidelines, consisting of sample API calls and code snippets for integration. The design supports different text generation jobs, consisting of material creation, code generation, and question answering, using its support finding out optimization and CoT reasoning abilities. The page likewise includes release options and 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, enter an endpoint name (between 1-50 alphanumeric characters).
  4. For Variety of instances, get in a number of instances (in between 1-100).
  5. For Instance type, select your circumstances type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can configure advanced security and facilities settings, including virtual private cloud (VPC) networking, service function permissions, and encryption settings. For most use cases, the default settings will work well. However, wiki.dulovic.tech for production implementations, you may desire to examine these settings to line up with your organization’s security and compliance requirements.
  6. Choose Deploy to start utilizing the design.

    When the deployment is total, you can evaluate DeepSeek-R1’s capabilities straight in the Amazon Bedrock play ground.
  7. Choose Open in play area to access an interactive interface where you can experiment with various prompts and change model criteria like temperature level and maximum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, utilize DeepSeek’s chat template for optimal results. For example, content for inference.

    This is an outstanding method to check out the design’s reasoning and text generation abilities before incorporating it into your applications. The play ground offers instant feedback, helping you comprehend how the model reacts to different inputs and letting you tweak your triggers for ideal outcomes.

    You can rapidly test the design in the play ground through the UI. However, to conjure up the deployed design 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 demonstrates how to perform reasoning using a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce 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 developed the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime client, configures inference parameters, and sends a request to produce text based on a user timely.

    Deploy DeepSeek-R1 with SageMaker JumpStart

    SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and deploy them into production using either the UI or SDK.

    Deploying DeepSeek-R1 model through SageMaker JumpStart provides two hassle-free methods: utilizing the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let’s explore both approaches to assist you pick the method that best matches your needs.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

    4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card. Each model card reveals crucial details, including:

    - Model name - Provider name
  10. Task classification (for instance, Text Generation). Bedrock Ready badge (if appropriate), showing that this design can be registered with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to invoke the model

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

    The model details page includes the following details:

    - The model name and company details. Deploy button to deploy the model. About and [forum.batman.gainedge.org](https://forum.batman.gainedge.org/index.php?action=profile