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

Marty Birdsong 2025-02-16 03:10:04 +08:00
commit e280fbcfae

@ -0,0 +1,93 @@
<br>Today, we are thrilled to announce that DeepSeek R1 distilled Llama and Qwen designs are available through [Amazon Bedrock](https://source.coderefinery.org) Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](https://gitea.potatox.net)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations varying from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative [AI](https://braindex.sportivoo.co.uk) ideas on AWS.<br>
<br>In this post, we show how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled versions of the designs also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) established by DeepSeek [AI](http://park7.wakwak.com) that uses support finding out to boost thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential differentiating feature is its reinforcement learning (RL) step, which was used to improve the model's responses beyond the standard pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust better to user [feedback](http://www.maxellprojector.co.kr) and objectives, eventually enhancing both importance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, indicating it's geared up to break down [intricate inquiries](https://git.i2edu.net) and reason through them in a detailed manner. This assisted thinking process allows the model to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually captured the market's attention as a flexible text-generation design that can be incorporated into various workflows such as representatives, sensible thinking and data interpretation jobs.<br>
<br>DeepSeek-R1 [utilizes](https://acetamide.net) a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion specifications, allowing efficient reasoning by routing inquiries to the most pertinent expert "clusters." This approach allows the design to focus on various issue domains while maintaining general performance. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 model to more efficient architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller, more effective designs to simulate the habits and reasoning patterns of the larger DeepSeek-R1 design, using it as a teacher design.<br>
<br>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 place. In this blog, we will [utilize Amazon](http://119.23.214.10930032) Bedrock Guardrails to present safeguards, avoid damaging content, and examine models against essential safety criteria. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing security [controls](https://www.suyun.store) throughout your generative [AI](http://47.101.131.235:3000) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e instance. To examine 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 [fishtanklive.wiki](https://fishtanklive.wiki/User:KentonR156) endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are releasing. To ask for a limitation increase, produce a [limitation boost](https://societeindustrialsolutions.com) demand and [connect](https://git.kicker.dev) to your account group.<br>
<br>Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) permissions to use Amazon Bedrock Guardrails. For instructions, see Set up permissions to utilize guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, prevent damaging content, and assess models against crucial security requirements. You can carry out security measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and design responses 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](http://www.my.vw.ru).<br>
<br>The general flow includes the following steps: First, the system [receives](https://lovelynarratives.com) 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 model's output, another guardrail check is applied. If the output passes this final check, it's returned as the outcome. However, if either the input or output is intervened by the guardrail, a [message](http://forum.infonzplus.net) 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 demonstrate reasoning 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, total the following steps:<br>
<br>1. On the Amazon Bedrock console, select Model catalog under Foundation models 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 supplier and pick the DeepSeek-R1 model.<br>
<br>The model detail page provides necessary details about the model's capabilities, pricing structure, and application standards. You can discover detailed use instructions, including sample API calls and code snippets for [combination](http://jenkins.stormindgames.com). The model supports various text generation jobs, consisting of content production, code generation, and concern answering, using its reinforcement learning optimization and CoT thinking capabilities.
The page likewise consists of and licensing details to help you start with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, select 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, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a variety of circumstances (between 1-100).
6. For Instance type, pick your circumstances type. For optimal performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can set up sophisticated security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function authorizations, and encryption settings. For the majority of utilize cases, the default settings will work well. However, for production releases, you might want to evaluate these settings to align with your organization's security and compliance [requirements](https://vidy.africa).
7. Choose Deploy to start using the model.<br>
<br>When the deployment is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play area to access an interactive user interface where you can try out different triggers and adjust model parameters like temperature level and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For example, content for reasoning.<br>
<br>This is an exceptional method to check out the design's thinking and text generation capabilities before incorporating it into your applications. The play area supplies immediate feedback, helping you comprehend how the [design responds](http://code.istudy.wang) to different inputs and letting you fine-tune your prompts for ideal outcomes.<br>
<br>You can rapidly evaluate the design in the [play ground](https://code.dev.beejee.org) through the UI. However, to invoke the released design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to carry out reasoning using a released DeepSeek-R1 design 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 produce the guardrail, see the GitHub repo. After you have developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up inference parameters, and sends a demand to generate text based on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML options that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and deploy them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 hassle-free approaches: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both [methods](https://gitea.ochoaprojects.com) to assist you select the method that finest suits your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to deploy DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, [pick Studio](https://git.es-ukrtb.ru) in the navigation pane.
2. First-time users will be prompted to create a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model web browser shows available models, with details like the company name and design abilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each model card reveals essential details, including:<br>
<br>- Model name
- Provider name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if appropriate), showing that this model can be signed up with Amazon Bedrock, permitting you to utilize Amazon [Bedrock](https://nodlik.com) APIs to conjure up the design<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The design details page consists of the following details:<br>
<br>- The design name and supplier details.
Deploy button to deploy the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of important details, such as:<br>
<br>- Model description.
- License details.
- Technical specs.
- Usage standards<br>
<br>Before you release the design, it's suggested to evaluate the design details and license terms to confirm compatibility with your use case.<br>
<br>6. Choose Deploy to continue with deployment.<br>
<br>7. For Endpoint name, utilize the instantly produced name or produce a customized one.
8. For Instance type ¸ select an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the number of instances (default: 1).
Selecting appropriate instance types and counts is vital for cost and performance optimization. Monitor your deployment 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](https://gitea.ochoaprojects.com).
10. Review all setups for accuracy. For this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
11. Choose Deploy to release the model.<br>
<br>The deployment process can take numerous minutes to finish.<br>
<br>When implementation is total, your endpoint status will alter to InService. At this point, the design is all set to accept reasoning demands through the [endpoint](https://menfucks.com). You can monitor the deployment progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the deployment is total, you can invoke the design using a SageMaker runtime customer and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To start 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](https://www.meetgr.com) consents and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the design is supplied in the Github here. You can clone the notebook and run from [SageMaker Studio](https://hlatube.com).<br>
<br>You can run extra requests against the predictor:<br>
<br>Implement guardrails and run inference with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:<br>
<br>Clean up<br>
<br>To [prevent undesirable](http://git.cattech.org) charges, finish the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you deployed the design utilizing Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace implementations.
2. In the Managed implementations area, locate 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 erasing the appropriate implementation: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you deployed will sustain expenses 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.<br>
<br>Conclusion<br>
<br>In this post, we checked out how you can access and release the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in [SageMaker Studio](https://lovn1world.com) or Amazon Bedrock Marketplace now to get going. For more details, refer to Use Amazon Bedrock tooling with [Amazon SageMaker](https://bug-bounty.firwal.com) JumpStart models, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon [Bedrock](http://enhr.com.tr) Marketplace, and Getting going with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging [generative](https://gitlab.bzzndata.cn) [AI](https://git.slegeir.com) [companies build](http://122.51.46.213) innovative solutions utilizing AWS services and accelerated calculate. Currently, he is focused on developing methods for fine-tuning and optimizing the inference performance of big language models. In his [leisure](https://kahkaham.net) time, Vivek delights in treking, watching motion pictures, and trying various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://dongawith.com) Specialist Solutions Architect with the Third-Party Model [Science](http://www.scitqn.cn3000) team at AWS. His area of focus is AWS [AI](https://4kwavemedia.com) [accelerators](https://lms.jolt.io) (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect working on generative [AI](https://git.viorsan.com) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon [SageMaker](http://119.45.195.10615001) JumpStart, SageMaker's artificial intelligence and [generative](https://wiki.uqm.stack.nl) [AI](http://120.48.7.250:3000) hub. She is passionate about developing services that help clients accelerate their [AI](http://221.229.103.55:63010) journey and unlock service worth.<br>