1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
addiemilne2157 edited this page 2025-04-10 14:51:46 +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 reveal that DeepSeek R1 distilled Llama and wiki.dulovic.tech 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 model, DeepSeek-R1, along with the distilled versions ranging from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled versions of the models too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that uses reinforcement discovering to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key identifying function is its reinforcement knowing (RL) step, which was utilized to fine-tune the model's responses beyond the standard pre-training and fine-tuning procedure. By incorporating RL, DeepSeek-R1 can adjust more successfully to user feedback and objectives, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, indicating it's equipped to break down complex inquiries and factor through them in a detailed manner. This guided thinking procedure allows the design to produce more accurate, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT abilities, aiming to create structured responses while concentrating on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually recorded the market's attention as a flexible text-generation model that can be integrated into various workflows such as agents, setiathome.berkeley.edu sensible reasoning and information analysis tasks.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion specifications, allowing effective inference by routing inquiries to the most pertinent professional "clusters." This approach enables the design to focus on different issue domains while maintaining general efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning abilities of the main R1 design to more efficient architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more effective models to mimic the habits and thinking patterns of the larger DeepSeek-R1 model, using it as a teacher model.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest deploying this model with guardrails in place. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and assess models against key safety requirements. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, 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, select 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 request a limitation increase, create a limitation boost 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) authorizations to utilize Amazon Bedrock Guardrails. For guidelines, see Set up consents to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, prevent damaging content, and assess designs against key security criteria. You can execute safety measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and model reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The general circulation involves the following steps: gratisafhalen.be 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 getting the design's output, another guardrail check is applied. If the output passes this last 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 phase. The examples showcased in the following areas demonstrate inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, select Model brochure under Foundation models in the navigation pane. At the time of writing this post, you can utilize 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 model detail page offers essential details about the model's capabilities, prices structure, and execution standards. You can discover detailed use instructions, including sample API calls and code bits for combination. The model supports numerous text generation tasks, consisting of content production, code generation, and concern answering, using its reinforcement learning optimization and CoT reasoning abilities. The page also includes deployment choices and engel-und-waisen.de licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, select Deploy.

You will be triggered to set up the release details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of instances, get in a number of instances (between 1-100). 6. For example type, select your circumstances type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can configure sophisticated security and infrastructure settings, including virtual personal cloud (VPC) networking, service function authorizations, and encryption settings. For most use cases, the default settings will work well. However, for production releases, you might want to evaluate these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the release is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can experiment with different triggers and change design parameters like temperature level and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum results. For instance, content for reasoning.

This is an exceptional way to explore the design's thinking and text generation abilities before incorporating it into your applications. The playground provides instant feedback, helping you understand how the model responds to various inputs and letting you tweak your prompts for optimal outcomes.

You can quickly test the design in the playground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference using guardrails with the released DeepSeek-R1 endpoint

The following code example demonstrates how to perform reasoning utilizing a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can create a guardrail utilizing the Amazon Bedrock console or raovatonline.org the API. For the example code to develop the guardrail, see the GitHub repo. After you have created the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, sets up inference parameters, and sends a request to generate text based upon a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML solutions that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your information, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart provides 2 convenient methods: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to assist you choose the approach that finest suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card. Each model card key details, consisting of:

- Model name

  • Provider name
  • Task category (for instance, Text Generation). Bedrock Ready badge (if applicable), indicating that this design can be registered with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to conjure up the design

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

    The model details page consists of the following details:

    - The design name and company 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 requirements.
  • Usage standards

    Before you release the model, it's suggested to evaluate the design details and license terms to validate compatibility with your use case.

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, use the immediately generated name or produce a customized one.
  1. For 89u89.com Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the variety of instances (default: 1). Selecting suitable circumstances types and counts is essential for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time inference is picked by default. This is optimized for sustained traffic and low latency.
  3. Review all setups for precision. For this model, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the model.

    The implementation procedure can take numerous minutes to complete.

    When deployment is total, your endpoint status will change to InService. At this point, the design is prepared to accept reasoning demands through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is complete, you can conjure up the design using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the required AWS approvals and environment setup. The following is a detailed code example that demonstrates how to deploy and engel-und-waisen.de utilize DeepSeek-R1 for inference programmatically. The code for deploying the model is offered in the Github here. You can clone the note pad and range from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:

    Clean up

    To avoid undesirable charges, finish the actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you deployed the model utilizing Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace implementations.
  5. In the Managed implementations section, find the endpoint you want to delete.
  6. Select the endpoint, and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting the proper release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

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

    Conclusion

    In this post, we checked out how you can access and release the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting started with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He helps emerging generative AI business build innovative services using AWS services and accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and optimizing the reasoning efficiency of large language designs. In his leisure time, Vivek takes pleasure in treking, viewing films, and attempting various foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area 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 group at AWS.

    Banu Nagasundaram leads item, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about building services that assist consumers accelerate their AI journey and unlock organization worth.