Overview

  • Founded Date June 26, 1983
  • Sectors Dialogue-directors
  • Posted Jobs 0
  • Viewed 14

Company Description

DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart

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 model, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar 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 structure. A crucial identifying feature is its reinforcement learning (RL) action, which was used to improve the design’s actions beyond the standard pre-training and tweak process. By integrating RL, DeepSeek-R1 can adjust more efficiently to user feedback and objectives, ultimately improving both significance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, implying it’s geared up to break down complicated questions and reason through them in a detailed manner. This guided thinking process 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 reactions while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually recorded the industry’s attention as a flexible text-generation model that can be integrated into various workflows such as agents, rational reasoning and data 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 parameters, allowing efficient inference by routing questions to the most appropriate professional “clusters.” This method enables the design to focus on different issue domains while maintaining overall efficiency. DeepSeek-R1 requires at least 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 includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 design 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 procedure of training smaller sized, more efficient models to mimic the habits and thinking patterns of the larger DeepSeek-R1 model, utilizing it as a teacher model.

You can deploy 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 use Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous material, and assess designs against essential security requirements. At the time of composing this blog site, links.gtanet.com.br for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To deploy 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, choose 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 releasing. To ask for a limit boost, produce a limitation boost 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) consents to utilize Amazon Bedrock Guardrails. For directions, see Establish permissions to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to present safeguards, avoid hazardous material, and assess designs against key security criteria. You can carry out precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to assess user inputs and design reactions 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 create the guardrail, see the GitHub repo.

The general flow involves 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 design for inference. After receiving the design’s output, another guardrail check is used. If the output passes this last check, it’s returned as the last outcome. However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the intervention and whether it occurred at the input or output stage. The examples showcased in the following sections show reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers you access to over 100 popular, emerging, and specialized foundation designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following steps:

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 utilize the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a service provider and pick the DeepSeek-R1 model.

The design detail page supplies vital details about the design’s capabilities, rates structure, and application guidelines. You can find detailed usage directions, including sample API calls and code bits for integration. The design supports numerous text generation tasks, consisting of content production, code generation, and question answering, using its reinforcement finding out optimization and CoT reasoning capabilities.
The page likewise consists of release options and licensing details to assist you begin with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, select Deploy.

You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of circumstances, enter a variety of instances (between 1-100).
6. For example type, choose your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can configure innovative security and facilities settings, consisting of virtual private cloud (VPC) networking, service function authorizations, and file encryption settings. For most utilize cases, the default settings will work well. However, for production releases, you may want to review these settings to align with your organization’s security and compliance requirements.
7. Choose Deploy to start utilizing the design.

When the implementation is complete, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock play area.
8. Choose Open in play area to access an interactive interface where you can try out different triggers and adjust model parameters like temperature and optimum length.
When using R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat template for ideal results. For instance, content for inference.

This is an exceptional way to explore the model’s thinking and text generation capabilities before incorporating it into your applications. The play ground provides immediate feedback, helping you comprehend how the design responds to different inputs and letting you fine-tune your prompts for optimum results.

You can quickly evaluate the model in the play area through the UI. However, to invoke the deployed 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 shows how to perform reasoning utilizing a deployed 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 develop the guardrail, see the GitHub repo. After you have created the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime customer, sets up inference specifications, and sends a request to generate 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 services that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 hassle-free approaches: using the user-friendly SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let’s explore both techniques to assist you choose the approach that best suits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

1. On the SageMaker console, pick 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 design browser displays available designs, with details like the company name and design abilities.

4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card shows essential details, including:

– Model name
– Provider name
– Task category (for instance, Text Generation).
Bedrock Ready badge (if appropriate), showing that this design can be registered with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to conjure up the model

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

The design details page includes the following details:

– The design name and company details.
Deploy button to deploy the model.
About and Notebooks tabs with detailed details

The About tab consists of essential details, such as:

– Model description.
– License details.
– Technical specifications.
– Usage guidelines

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

6. Choose Deploy to proceed with deployment.

7. For Endpoint name, use the immediately generated name or produce a custom one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the variety of instances (default: 1).
Selecting suitable instance types and counts is important for larsaluarna.se cost and efficiency optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is enhanced for sustained traffic and low latency.
10. Review all configurations for precision. For this design, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
11. Choose Deploy to deploy the design.

The deployment process can take a number of minutes to finish.

When implementation is complete, your endpoint status will change to InService. At this moment, the model is all set to accept reasoning requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the implementation is complete, you can invoke the design utilizing a SageMaker runtime customer and integrate it with your applications.

Deploy DeepSeek-R1 using the SageMaker Python SDK

To start with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS consents and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the design is provided in the Github here. You can clone the note pad and run from SageMaker Studio.

You can run additional demands against the predictor:

Implement guardrails and run reasoning 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, it-viking.ch and implement it as displayed in the following code:

Clean up

To prevent undesirable charges, complete the actions in this section to tidy up your resources.

Delete the Amazon Bedrock Marketplace deployment

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

1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace deployments.
2. In the Managed deployments section, locate the endpoint you want to erase.
3. Select the endpoint, and on the Actions menu, pick Delete.
4. Verify the endpoint details to make certain you’re deleting the right deployment: 1. Endpoint name.
2. Model name.
3. Endpoint status

Delete the SageMaker JumpStart predictor

The SageMaker JumpStart model you deployed will sustain expenses if you leave it running. Use the following code to erase the endpoint if you desire 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 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in 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 models, 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 helps emerging generative AI business build ingenious options utilizing AWS services and sped up compute. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the inference efficiency of large language designs. In his downtime, Vivek enjoys hiking, 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 Science and Bioinformatics.

Jonathan Evans is a Professional Solutions Architect dealing with generative AI with the Third-Party Model Science group at AWS.

Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker’s artificial intelligence and generative AI hub. She is enthusiastic about building services that assist clients accelerate their AI journey and unlock business value.