5 DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Arlie Augustine edited this page 1 month ago


Today, we are thrilled to reveal 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 criteria to construct, experiment, and properly scale your generative AI ideas on AWS.

In this post, we show how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to deploy the distilled versions of the designs too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that utilizes support learning to enhance reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key distinguishing feature is its support knowing (RL) action, which was utilized to fine-tune the design's responses beyond the basic pre-training and fine-tuning procedure. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and objectives, eventually improving both significance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, suggesting it's equipped to break down intricate inquiries and factor through them in a detailed manner. This guided thinking procedure permits the design to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to create structured responses while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has caught the industry's attention as a flexible text-generation design that can be incorporated into different workflows such as representatives, 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 specifications, making it possible for effective inference by routing queries to the most relevant professional "clusters." This method permits the model to focus on different problem domains while maintaining total performance. DeepSeek-R1 needs at least 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 features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

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

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this design with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous content, and examine designs against crucial security criteria. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to different use cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you require access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and confirm you're using 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 releasing. To request a limit increase, create a limitation boost demand and connect to your account group.

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) permissions to utilize Amazon Bedrock Guardrails. For instructions, 135.181.29.174 see Set up permissions to utilize guardrails for bio.rogstecnologia.com.br content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, avoid hazardous material, and examine models against key security criteria. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to evaluate 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 circulation involves the following actions: 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 receiving the model's output, another guardrail check is used. If the output passes this last check, it's returned as the last result. However, if either the input or output is stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following areas show reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

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

1. On the Amazon Bedrock console, choose Model brochure under Foundation designs 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. 2. Filter for DeepSeek as a service provider and choose the DeepSeek-R1 model.

The design detail page provides necessary details about the model's capabilities, pricing structure, and implementation guidelines. You can discover detailed use guidelines, including sample API calls and code bits for integration. The design supports various text generation tasks, including material production, code generation, and question answering, utilizing its reinforcement finding out optimization and CoT thinking abilities. The page likewise consists of deployment choices and licensing details to help you begin with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, pick Deploy.

You will be prompted 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 (between 1-50 alphanumeric characters). 5. For Variety of instances, go into a number of circumstances (in between 1-100). 6. For Instance type, choose your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can configure advanced security and facilities settings, including virtual private cloud (VPC) networking, service function approvals, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production releases, you may desire to evaluate these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start using the design.

When the implementation is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in play ground to access an interactive user interface where you can explore different triggers and adjust model criteria like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, material for inference.

This is an to check out the design's thinking and text generation abilities before integrating it into your applications. The playground supplies immediate feedback, assisting you comprehend how the model responds to various inputs and letting you fine-tune your prompts for ideal results.

You can rapidly test the design in the playground through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example demonstrates how to carry out inference using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to develop 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 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 release with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use 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 techniques: utilizing the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both methods to help you select the technique that best suits your requirements.

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 develop a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

The design internet browser displays available designs, with details like the service provider name and design capabilities.

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

- Model name

  • Provider name
  • Task classification (for instance, Text Generation). Bedrock Ready badge (if suitable), suggesting that this design can be signed up with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to conjure up the design

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

    The model details page includes the following details:

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

    The About tab includes crucial details, such as:

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

    Before you release the design, it's recommended to evaluate the design details and license terms to verify compatibility with your usage case.

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, higgledy-piggledy.xyz utilize the automatically produced name or develop a custom-made one.
  1. For example type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the variety of instances (default: yewiki.org 1). Selecting proper instance types and counts is crucial for expense and efficiency optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time inference is selected by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for precision. For this model, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to deploy the model.

    The release procedure can take a number of minutes to complete.

    When deployment is complete, your endpoint status will alter to InService. At this moment, the design is all set to accept reasoning requests through the endpoint. You can keep an eye on the release development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the deployment is complete, you can conjure up the model utilizing a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the required AWS permissions and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for reasoning programmatically. The code for deploying the model is supplied in the Github here. You can clone the notebook and range 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 create a guardrail utilizing the Amazon Bedrock console or the API, and implement it as shown 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 implementation

    If you deployed the design using Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
  5. In the Managed implementations section, locate the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, pick Delete.
  7. Verify the endpoint details to make certain you're erasing the proper deployment: 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 want to stop sustaining charges. For more details, forum.altaycoins.com 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 get going. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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 construct innovative solutions using AWS services and accelerated compute. Currently, he is concentrated on developing methods for fine-tuning and enhancing the inference efficiency of big language designs. In his spare time, Vivek delights in hiking, seeing motion pictures, and trying 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 dealing with 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 passionate about constructing services that help consumers accelerate their AI journey and unlock organization value.