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

Jeanette Cardin 2025-02-17 01:35:08 +03:00
commit 49698108a3
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are delighted 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](http://tesma.co.kr)'s first-generation frontier design, DeepSeek-R1, along with the distilled [variations ranging](http://47.93.156.1927006) from 1.5 to 70 billion parameters to build, experiment, and properly scale your generative [AI](https://ramique.kr) on AWS.<br>
<br>In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled variations of the models too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) established by DeepSeek [AI](https://caringkersam.com) that uses support discovering to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial identifying function is its support knowing (RL) step, which was utilized to refine the model's responses beyond the standard pre-training and fine-tuning process. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually improving both importance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, implying it's equipped to break down complicated questions and factor through them in a detailed manner. This guided thinking procedure permits the model to produce more precise, transparent, and detailed answers. This design combines RL-based [fine-tuning](https://wik.co.kr) with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user [interaction](http://209.141.61.263000). With its comprehensive capabilities DeepSeek-R1 has actually captured the market's attention as a versatile text-generation model that can be integrated into various [workflows](https://www.p3r.app) such as agents, logical thinking and information analysis jobs.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, allowing effective reasoning by [routing questions](https://gitlab.dndg.it) to the most pertinent specialist "clusters." This technique permits the model to concentrate on various problem domains while maintaining overall effectiveness. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge instance to [release](https://rsh-recruitment.nl) the model. ml.p5e.48 xlarge includes 8 Nvidia H200 [GPUs providing](https://jp.harmonymart.in) 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the [reasoning abilities](https://empregos.acheigrandevix.com.br) 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 sized, more efficient designs to simulate the behavior and reasoning patterns of the bigger DeepSeek-R1 model, utilizing it as a teacher model.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we [advise releasing](https://media.labtech.org) this model with guardrails in [location](https://git.zzxxxc.com). In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid harmful content, and assess designs against crucial safety requirements. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls across your generative [AI](http://82.157.11.224:3000) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're using ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are [releasing](https://online-learning-initiative.org). To ask for a limit boost, create a limitation boost request and reach out to your account team.<br>
<br>Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For guidelines, see Set up approvals to utilize guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, prevent harmful content, and assess designs against essential safety criteria. You can carry out safety steps for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to evaluate user inputs and design responses deployed on Amazon Bedrock [Marketplace](https://www.ycrpg.com) and SageMaker JumpStart. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to [produce](http://89.251.156.112) the guardrail, see the GitHub repo.<br>
<br>The general circulation involves the following actions: First, the system receives 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 [reasoning](https://git.szrcai.ru). After getting the model's output, [yewiki.org](https://www.yewiki.org/User:JefferyGoudie23) another guardrail check is used. If the output passes this last check, it's returned as the outcome. However, if either the input or output is stepped in by the guardrail, a [message](https://www.infiniteebusiness.com) is returned suggesting the nature of the intervention and whether it took place at the input or output stage. The examples [showcased](http://www.visiontape.com) in the following sections show reasoning using this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, and specialized structure 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, pick Model catalog under Foundation designs in the [navigation pane](http://123.111.146.2359070).
At the time of writing this post, you can utilize the InvokeModel API to conjure up the model. It does not [support Converse](https://leicestercityfansclub.com) APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a [provider](http://n-f-l.jp) and pick the DeepSeek-R1 design.<br>
<br>The design detail page supplies essential details about the design's abilities, prices structure, and implementation guidelines. You can find detailed use instructions, consisting of sample API calls and code bits for combination. The model supports numerous text generation jobs, [including](https://gogs.2dz.fi) content production, code generation, and concern answering, utilizing its support finding out optimization and CoT thinking abilities.
The page likewise consists of deployment alternatives and licensing details to assist you get going with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to set up the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of instances, enter a number of instances (between 1-100).
6. For example type, select your instance type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can set up sophisticated security and facilities settings, consisting of virtual private cloud (VPC) networking, service function permissions, and [gratisafhalen.be](https://gratisafhalen.be/author/willianl17/) encryption settings. For most utilize cases, [surgiteams.com](https://surgiteams.com/index.php/User:BertHowden) the default settings will work well. However, for production implementations, you may want to evaluate these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to begin [utilizing](http://47.100.81.115) the model.<br>
<br>When the deployment is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in play area to access an interactive user interface where you can try out different prompts and change model specifications like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimal outcomes. For example, content for reasoning.<br>
<br>This is an outstanding way to check out the design's reasoning and text generation capabilities before incorporating it into your applications. The play ground provides [instant](https://media.motorsync.co.uk) feedback, assisting you understand how the model responds to numerous inputs and letting you tweak your triggers for ideal results.<br>
<br>You can quickly evaluate the design in the playground 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 released DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to perform inference using a deployed 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 create the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to implement guardrails. The script initializes the bedrock_[runtime](https://thestylehitch.com) client, sets up inference parameters, and sends out a demand to produce text based upon a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial [intelligence](https://gitea.itskp-odense.dk) (ML) center with FMs, built-in algorithms, and [prebuilt](https://beta.hoofpick.tv) ML options that you can release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers two practical techniques: utilizing the instinctive SageMaker JumpStart UI or implementing programmatically through the [SageMaker Python](http://175.24.176.23000) SDK. Let's explore both methods to assist you choose the approach that finest suits your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to release DeepSeek-R1 using [SageMaker](https://schubach-websocket.hopto.org) JumpStart:<br>
<br>1. On the SageMaker console, pick Studio in the navigation pane.
2. First-time users will be triggered to develop a domain.
3. On the SageMaker Studio console, pick JumpStart in the navigation pane.<br>
<br>The model browser shows available designs, with details like the provider name and design capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card reveals essential details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if relevant), suggesting that this design can be registered with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the design card to see the design details page.<br>
<br>The design details page consists of the following details:<br>
<br>- The model name and supplier details.
Deploy button to release the design.
About and [surgiteams.com](https://surgiteams.com/index.php/User:MagaretMccurry6) Notebooks tabs with detailed details<br>
<br>The About tab includes crucial details, such as:<br>
<br>- Model description.
- License details.
- Technical specifications.
- Usage standards<br>
<br>Before you release the design, it's suggested to examine the design details and license terms to verify compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with release.<br>
<br>7. For Endpoint name, utilize the [instantly](https://www.xafersjobs.com) created name or create a customized one.
8. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the variety of circumstances (default: 1).
Selecting suitable circumstances types and counts is vital for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is enhanced for sustained traffic and low latency.
10. Review all setups for precision. For this model, we highly advise sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. [Choose Deploy](http://www.pygrower.cn58081) to deploy the model.<br>
<br>The release process can take a number of minutes to finish.<br>
<br>When implementation is total, your [endpoint status](http://47.98.226.2403000) will change to InService. At this moment, the design is ready to accept reasoning requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the implementation is complete, [kousokuwiki.org](http://kousokuwiki.org/wiki/%E5%88%A9%E7%94%A8%E8%80%85:KennithF53) you can conjure up the design utilizing a SageMaker runtime client and incorporate 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, you will need to set up the SageMaker Python SDK and make certain you have the necessary AWS approvals and environment setup. The following is a detailed code example that [demonstrates](https://parejas.teyolia.mx) how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the model is supplied in the Github here. You can clone the notebook and range from SageMaker Studio.<br>
<br>You can run additional requests against the predictor:<br>
<br>Implement guardrails and run reasoning 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 produce a guardrail utilizing the Amazon Bedrock console or the API, and implement it as shown in the following code:<br>
<br>Tidy up<br>
<br>To avoid unwanted charges, finish the [actions](http://47.112.106.1469002) in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you deployed the model using Amazon Bedrock Marketplace, total the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace implementations.
2. In the Managed releases section, locate the endpoint you want to delete.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're erasing the correct release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you deployed will sustain costs 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.<br>
<br>Conclusion<br>
<br>In this post, we checked out how you can access and deploy the DeepSeek-R1 model 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 JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting 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](https://corerecruitingroup.com) [companies develop](https://www.trueposter.com) innovative services using AWS services and accelerated calculate. Currently, he is focused on establishing techniques for fine-tuning and enhancing the reasoning efficiency of big language designs. In his complimentary time, Vivek takes pleasure in treking, seeing films, and [wiki.dulovic.tech](https://wiki.dulovic.tech/index.php/User:LeiaBuckley2869) trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://weworkworldwide.com) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://www.wotape.com) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Specialist Solutions Architect working on generative [AI](https://gitlab.dev.cpscz.site) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](http://tesma.co.kr) center. She is passionate about developing services that help customers accelerate their [AI](https://vibestream.tv) journey and unlock service worth.<br>