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

Anya O'Dowd 2025-02-21 07:50:38 +08:00
commit c7b7d814e8
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are excited 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 release DeepSeek [AI](https://dolphinplacements.com)'s first-generation frontier model, DeepSeek-R1, together with the distilled versions ranging from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative [AI](https://git.snaile.de) ideas on AWS.<br>
<br>In this post, we show how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled variations of the designs also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) developed by DeepSeek [AI](https://www.seekbetter.careers) that uses reinforcement discovering to boost thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key distinguishing function is its reinforcement knowing (RL) step, which was utilized to improve the design's responses beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust more effectively to user feedback and goals, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, meaning it's geared up to break down [intricate questions](https://degroeneuitzender.nl) and factor through them in a detailed way. This assisted reasoning process permits the model to produce more precise, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to create structured reactions while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has recorded the market's attention as a versatile text-generation model that can be integrated into different workflows such as agents, logical reasoning and information interpretation tasks.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion criteria, enabling effective reasoning by routing queries to the most pertinent specialist "clusters." This method permits the design to concentrate on various problem domains while maintaining total efficiency. DeepSeek-R1 requires 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 deploy the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the thinking [abilities](https://social.myschoolfriend.ng) of the main R1 design to more [efficient architectures](https://mxlinkin.mimeld.com) based on popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient models to simulate the behavior and [reasoning patterns](http://120.46.139.31) of the bigger DeepSeek-R1 model, using it as a [teacher model](https://www.bjs-personal.hu).<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock [Marketplace](https://subamtv.com). Because DeepSeek-R1 is an emerging design, we recommend deploying this model with guardrails in location. In this blog, we will utilize Amazon [Bedrock Guardrails](https://online-learning-initiative.org) to introduce safeguards, avoid harmful content, and examine designs against essential safety [criteria](http://gitlab.mints-id.com). At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, enhancing user [experiences](https://gitlab.internetguru.io) and standardizing safety controls throughout your generative [AI](https://git-web.phomecoming.com) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're utilizing 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 deploying. To request a limit increase, develop a limitation increase demand and reach out to your account group.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To [Management](https://git.cnpmf.embrapa.br) (IAM) permissions to utilize Amazon Bedrock Guardrails. For directions, see [Establish approvals](https://nujob.ch) to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails permits you to present safeguards, prevent hazardous material, and evaluate models against crucial security [requirements](https://watch.bybitnw.com). You can implement precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and design actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.<br>
<br>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](https://77.248.49.223000). If the input passes the guardrail check, it's sent to the design for reasoning. 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 happened at the input or output phase. The examples showcased in the following sections demonstrate inference utilizing this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and specialized foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, pick Model brochure under Foundation designs in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to conjure up the model. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and select the DeepSeek-R1 model.<br>
<br>The model detail page provides essential details about the design's capabilities, rates structure, and execution standards. You can discover detailed use guidelines, including sample API calls and code snippets for integration. The model supports various text generation jobs, consisting of material creation, code generation, and concern answering, using its reinforcement finding out optimization and CoT thinking capabilities.
The page likewise includes deployment options and licensing details to assist you get started with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, go into a number of circumstances (in between 1-100).
6. For example type, select your instance type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can configure sophisticated 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 deployments, you might desire to evaluate these settings to align with your [organization's security](https://git.starve.space) and compliance requirements.
7. Choose Deploy to start using the model.<br>
<br>When the deployment is complete, you can evaluate 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 explore various prompts and adjust design parameters like temperature level and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum outcomes. For example, content for inference.<br>
<br>This is an excellent method to explore the model's thinking and text generation abilities before incorporating it into your applications. The play ground offers immediate feedback, helping you understand how the model reacts to numerous inputs and [letting](http://damoa8949.com) you fine-tune your triggers for optimum outcomes.<br>
<br>You can quickly evaluate the model in the playground through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run reasoning utilizing [guardrails](http://repo.jd-mall.cn8048) with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform inference utilizing a [released](http://bryggeriklubben.se) DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have actually developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, sets up reasoning specifications, and sends a demand to generate text based on a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and release them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 convenient methods: utilizing the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both [methods](https://farmwoo.com) to assist you select the technique that finest suits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to release DeepSeek-R1 using SageMaker JumpStart:<br>
<br>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.<br>
<br>The model browser shows available designs, with details like the supplier name and [model abilities](https://www.e-vinil.ro).<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card shows essential details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if appropriate), showing that this design can be registered with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to conjure up the model<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The model name and supplier details.
Deploy button to release the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes crucial details, [wiki.whenparked.com](https://wiki.whenparked.com/User:HarveyMintz4360) such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you release the model, it's suggested to examine the model details and license terms to validate compatibility with your use case.<br>
<br>6. Choose Deploy to proceed with deployment.<br>
<br>7. For Endpoint name, use the immediately created name or develop a custom one.
8. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, go into the number of circumstances (default: 1).
Selecting proper [instance types](https://in-box.co.za) and counts is vital for cost and efficiency optimization. Monitor your release to adjust these settings as needed.Under Inference type, is chosen by default. This is optimized for sustained traffic and low latency.
10. Review all configurations for precision. For this design, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
11. Choose Deploy to deploy the design.<br>
<br>The deployment procedure can take numerous minutes to complete.<br>
<br>When implementation is total, your endpoint status will change to InService. At this point, the design is prepared to accept inference demands through the endpoint. You can monitor the deployment progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is total, you can invoke the design using a SageMaker runtime client and integrate it with your [applications](https://cruyffinstitutecareers.com).<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To get going with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the [SageMaker](https://git.hxps.ru) Python SDK and make certain you have the required AWS consents and environment setup. The following is a detailed code example that demonstrates how to release and use DeepSeek-R1 for reasoning programmatically. The code for deploying the design is [supplied](http://git.agentum.beget.tech) in the Github here. You can clone the [notebook](http://git.agentum.beget.tech) and range from [SageMaker Studio](http://git.bzgames.cn).<br>
<br>You can run extra demands against the predictor:<br>
<br>[Implement](https://www.top5stockbroker.com) guardrails and run inference with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail utilizing the Amazon Bedrock console or the API, and [execute](http://git.tederen.com) it as displayed in the following code:<br>
<br>Clean up<br>
<br>To prevent unwanted charges, complete the steps in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you released the design using Amazon Bedrock Marketplace, total the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace implementations.
2. In the Managed releases section, find the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're deleting the right implementation: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>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, see Delete Endpoints and Resources.<br>
<br>Conclusion<br>
<br>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 get going. For more details, refer to Use Amazon Bedrock tooling with [Amazon SageMaker](http://bhnrecruiter.com) JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with [Amazon SageMaker](http://gitlab.signalbip.fr) JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative [AI](https://git.songyuchao.cn) business develop ingenious solutions utilizing AWS services and sped up calculate. Currently, he is concentrated on establishing methods for fine-tuning and optimizing the reasoning performance of big language models. In his complimentary time, Vivek takes pleasure in hiking, viewing movies, and trying different cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://202.164.44.246:3000) [Specialist Solutions](https://video.igor-kostelac.com) Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://git.magicvoidpointers.com) accelerators (AWS Neuron). He holds a [Bachelor's degree](https://www.designxri.com) in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a [Professional Solutions](https://iamtube.jp) Architect working on generative [AI](https://career.webhelp.pk) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](http://120.26.108.239:9188) center. She is enthusiastic about building options that assist customers accelerate their [AI](https://skillfilltalent.com) journey and unlock company worth.<br>