1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
larabardon7564 edited this page 2025-03-01 22:21:53 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


Today, we are excited to announce that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and pipewiki.org Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek AI's first-generation frontier design, DeepSeek-R1, along with the distilled versions varying from 1.5 to 70 billion criteria to build, experiment, and properly 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 comparable actions to release the distilled versions of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that uses reinforcement learning to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key differentiating function is its reinforcement knowing (RL) action, which was utilized to fine-tune the design's actions beyond the basic pre-training and tweak process. By integrating RL, DeepSeek-R1 can adapt more efficiently to user feedback and goals, eventually boosting both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, meaning it's geared up to break down intricate questions and factor through them in a detailed way. This assisted thinking process permits the design to produce more accurate, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to generate structured actions while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually recorded the industry's attention as a flexible text-generation design that can be integrated into different workflows such as agents, sensible thinking and information analysis jobs.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion criteria, enabling effective inference by routing questions to the most pertinent specialist "clusters." This method enables the design to concentrate 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 utilize an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 design to more efficient architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and hb9lc.org 70B). Distillation refers to a procedure of training smaller, more effective designs to simulate the behavior and thinking patterns of the bigger DeepSeek-R1 design, utilizing it as a teacher model.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest releasing this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous content, and assess designs against essential safety criteria. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create several guardrails tailored to different use cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you need access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify you're using ml.p5e.48 xlarge for hb9lc.org 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 limitation boost, create a limitation increase demand and reach out to your account team.

Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) authorizations to utilize Amazon Bedrock Guardrails. For instructions, see Establish approvals to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, avoid damaging content, and examine designs against crucial security criteria. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon API. This permits you to apply guardrails to examine user inputs and model reactions 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 general flow includes 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 to the model for inference. After getting 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 happened at the input or output stage. The examples showcased in the following sections show 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 models (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 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 design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and select the DeepSeek-R1 model.

The design detail page offers necessary details about the model's capabilities, prices structure, and execution standards. You can find detailed use guidelines, consisting of sample API calls and code snippets for integration. The model supports various text generation jobs, including material creation, code generation, and question answering, using its support finding out optimization and CoT thinking capabilities. The page also includes implementation choices and licensing details to assist you start with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, pick Deploy.

You will be triggered to configure the implementation details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, enter an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, enter a number of instances (in between 1-100). 6. For example type, choose your instance type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service role consents, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production releases, you might wish to examine these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the release is complete, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock playground. 8. Choose Open in play area to access an interactive user interface where you can experiment with different triggers and adjust model specifications like temperature level and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal outcomes. For example, material for inference.

This is an exceptional method to explore the design's thinking and text generation abilities before incorporating it into your applications. The play area provides immediate feedback, assisting you comprehend how the design responds to different inputs and letting you tweak your triggers for higgledy-piggledy.xyz optimal outcomes.

You can rapidly evaluate the model in the play ground through the UI. However, to invoke the released design 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 demonstrates how to carry out inference using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo. After you have developed the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends out a request to create text based upon a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, setiathome.berkeley.edu 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 information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers two hassle-free techniques: using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to assist you pick the technique that finest matches your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The design web browser displays available designs, with details like the supplier name and model abilities.

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

- Model name

  • Provider name
  • Task classification (for example, Text Generation). Bedrock Ready badge (if appropriate), indicating that this model can be registered with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to conjure up the model

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

    The design details page consists of the following details:

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

    The About tab includes essential details, such as:

    - Model description.
  • License details.
  • Technical specs.
  • Usage standards

    Before you deploy the design, it's recommended to examine the model details and systemcheck-wiki.de license terms to verify compatibility with your use case.

    6. Choose Deploy to continue with release.

    7. For Endpoint name, utilize the automatically created name or produce a customized one.
  1. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, go into the variety of instances (default: 1). Selecting proper circumstances types and counts is important for cost and efficiency 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.
  3. Review all setups for accuracy. For this design, we strongly suggest sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the model.

    The implementation procedure can take several minutes to finish.

    When deployment is total, your endpoint status will change to InService. At this moment, the design is prepared to accept reasoning requests through the endpoint. You can keep track of the deployment development 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 client and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start 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 approvals and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the model is offered in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail using the Amazon Bedrock console or the API, and execute it as shown in the following code:

    Tidy up

    To prevent undesirable charges, finish the steps in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace implementation

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace implementations.
  5. In the Managed deployments area, locate the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting the right implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed will sustain costs if you leave it running. Use the following code to delete the endpoint if you want to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we explored how you can access and deploy the DeepSeek-R1 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, wiki.myamens.com Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies build innovative solutions utilizing AWS services and sped up compute. Currently, he is focused on establishing methods for fine-tuning and optimizing the reasoning efficiency of large language designs. In his downtime, Vivek enjoys hiking, viewing films, and trying different cuisines.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.

    Jonathan Evans is an Expert Solutions Architect working on generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about building services that assist clients accelerate their AI journey and unlock service worth.