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

Alanna Vardon 2025-02-21 23:51:09 +08:00
commit 62b9d7e2bb
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are thrilled to reveal that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock [Marketplace](http://connect.lankung.com) and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](http://ieye.xyz:5080)'s first-generation frontier model, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion specifications to construct, experiment, and properly scale your generative [AI](http://111.229.9.19:3000) concepts on AWS.<br>
<br>In this post, we show how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled variations of the designs also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](https://bytevidmusic.com) that utilizes reinforcement learning to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3[-Base structure](http://pplanb.co.kr). An essential distinguishing feature is its [reinforcement learning](http://47.100.3.2093000) (RL) action, which was used to fine-tune the model's actions beyond the standard pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately boosting both relevance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, implying it's equipped to break down [intricate inquiries](https://luckyway7.com) and reason through them in a detailed way. This directed thinking procedure enables the design to produce more precise, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has captured the industry's attention as a versatile text-generation model that can be incorporated into various workflows such as representatives, rational thinking and information interpretation tasks.<br>
<br>DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, allowing efficient reasoning by routing questions to the most pertinent professional "clusters." This approach enables the model to focus on various issue domains while maintaining overall efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 [xlarge circumstances](http://42.192.14.1353000) to deploy the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 [distilled](http://lyo.kr) models bring the reasoning abilities of the main R1 model to more effective architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, [disgaeawiki.info](https://disgaeawiki.info/index.php/User:CecilaDalgarno) and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient designs to mimic the behavior and [thinking patterns](https://gitlab.optitable.com) of the larger DeepSeek-R1 model, utilizing it as an instructor design.<br>
<br>You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing this model with guardrails in place. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid harmful content, and evaluate models against key [safety requirements](https://www.joboont.in). At the time of composing this blog site, for DeepSeek-R1 deployments 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 model, enhancing user experiences and standardizing security controls across your generative [AI](http://221.131.119.2:10030) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you require 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 verify you're utilizing 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 request a limit increase, produce a [limit boost](https://git.qingbs.com) request and connect to your account group.<br>
<br>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) permissions to use Amazon Bedrock Guardrails. For directions, see Establish authorizations to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, and evaluate models against crucial safety criteria. You can execute precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine user inputs and model reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.<br>
<br>The basic flow involves the following steps: First, the system gets an input for the model. This input is then [processed](http://133.242.131.2263003) through the ApplyGuardrail API. If the input passes the [guardrail](https://kewesocial.site) check, it's sent out to the design for inference. After receiving the model's output, another guardrail check is applied. If the output passes this final check, it's returned as the result. However, if either the input or output is stepped in by the guardrail, a message is returned showing 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.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>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, total the following actions:<br>
<br>1. On the Amazon Bedrock console, choose Model brochure 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 supplier and choose the DeepSeek-R1 design.<br>
<br>The model detail page provides essential details about the model's abilities, pricing structure, and implementation standards. You can discover detailed use directions, including sample API calls and code snippets for integration. The design supports different text generation tasks, including content production, code generation, and question answering, utilizing its reinforcement finding out optimization and CoT thinking capabilities.
The page also includes implementation choices and licensing details to help you get begun with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, select Deploy.<br>
<br>You will be triggered to set up the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, enter a variety of instances (in between 1-100).
6. For example type, select your [circumstances type](https://demo.shoudyhosting.com). For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up [advanced security](https://projectblueberryserver.com) and infrastructure settings, including virtual private cloud (VPC) networking, service function consents, and file encryption settings. For many use cases, the default settings will work well. However, for production releases, you may wish to review these settings to align with your company's security and compliance requirements.
7. Choose Deploy to start utilizing 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 playground to access an interactive user interface where you can experiment with various triggers and adjust model criteria like temperature level and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal results. For example, content for reasoning.<br>
<br>This is an exceptional way to explore the model's thinking and text generation capabilities before incorporating it into your applications. The [playground supplies](http://121.37.138.2) instant feedback, helping you comprehend how the design responds to various inputs and letting you tweak your [prompts](https://www.iwatex.com) for ideal results.<br>
<br>You can rapidly evaluate the design in the play area through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run reasoning utilizing guardrails with the released DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to carry out reasoning using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock or the API. For the example code to develop the guardrail, see the GitHub repo. After you have developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up inference criteria, and sends a [request](http://gagetaylor.com) to produce 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 use case, with your information, [trademarketclassifieds.com](https://trademarketclassifieds.com/user/profile/2672496) and release them into [production utilizing](https://socials.chiragnahata.is-a.dev) either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart uses 2 convenient methods: utilizing the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both techniques to help you pick the approach that finest fits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to deploy DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>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, choose JumpStart in the navigation pane.<br>
<br>The model web browser shows available models, with details like the service provider name and model capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card shows crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for example, [forum.altaycoins.com](http://forum.altaycoins.com/profile.php?id=1095540) Text Generation).
[Bedrock Ready](http://git.aivfo.com36000) badge (if relevant), [suggesting](https://fleerty.com) that this design can be signed up with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the model card to view the design details page.<br>
<br>The model [details](http://175.6.124.2503100) page [consists](https://www.jobcheckinn.com) of the following details:<br>
<br>- The design name and company details.
Deploy button to [release](https://deadreckoninggame.com) the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of essential details, such as:<br>
<br>- Model description.
- License details.
- Technical specs.
- Usage standards<br>
<br>Before you release the model, it's recommended to review the design details and license terms to confirm compatibility with your use case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, utilize the immediately generated name or create a customized one.
8. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the variety of instances (default: 1).
Selecting suitable instance types and counts is crucial for cost and performance optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is chosen by default. This is optimized for sustained traffic and low latency.
10. Review all setups for precision. For this model, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
11. [Choose Deploy](https://www.oemautomation.com8888) to deploy the model.<br>
<br>The implementation process can take a number of minutes to complete.<br>
<br>When deployment is complete, your endpoint status will change to InService. At this point, the model is ready to accept inference requests through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the [release](https://wiki.trinitydesktop.org) is complete, you can invoke the model using a SageMaker runtime client and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To begin with DeepSeek-R1 using the SageMaker Python SDK, [wiki.whenparked.com](https://wiki.whenparked.com/User:HarveyMintz4360) you will need to install the SageMaker Python SDK and make certain you have the needed AWS consents and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for inference programmatically. The code for deploying the model is [offered](https://gitea.sb17.space) in the Github here. You can clone the note pad and run from SageMaker Studio.<br>
<br>You can run additional 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 utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail using the Amazon Bedrock console or the API, and implement it as [revealed](https://casajienilor.ro) in the following code:<br>
<br>Tidy up<br>
<br>To prevent undesirable charges, complete the actions in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you released the model using Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
2. In the Managed implementations section, locate the endpoint you desire to erase.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're deleting the correct release: 1. Endpoint name.
2. Model name.
3. [Endpoint](https://heatwave.app) status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you released will sustain expenses 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](https://scholarpool.com) 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 or Amazon Bedrock Marketplace now to start. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He helps emerging generative [AI](http://bhnrecruiter.com) companies construct [innovative](https://howtolo.com) options using AWS services and accelerated calculate. Currently, he is focused on developing methods for fine-tuning and optimizing the reasoning efficiency of big language designs. In his downtime, Vivek enjoys hiking, watching movies, and attempting various foods.<br>
<br>Niithiyn Vijeaswaran is a [Generative](https://esvoe.video) [AI](http://forum.ffmc59.fr) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](https://loveyou.az) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect working on generative [AI](https://melanatedpeople.net) with the Third-Party Model [Science](http://47.108.94.35) group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://juryi.sn) center. She is enthusiastic about constructing options that assist customers accelerate their [AI](https://10mektep-ns.edu.kz) journey and unlock organization value.<br>