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

Oscar McEachern 2025-04-05 04:36:14 +08:00
commit b5d22a9128
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are delighted to announce 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://code.52abp.com)'s first-generation frontier design, DeepSeek-R1, together with the distilled variations ranging from 1.5 to 70 billion parameters to construct, experiment, and properly scale your generative [AI](http://gkpjobs.com) ideas on AWS.<br>
<br>In this post, we show how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and [SageMaker JumpStart](http://devhub.dost.gov.ph). You can follow similar steps to deploy the distilled variations of the designs too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) established by DeepSeek [AI](http://119.167.221.14:60000) that uses reinforcement learning to boost reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential differentiating function is its support knowing (RL) action, which was utilized to refine the design's responses beyond the basic pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually boosting both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, meaning it's geared up to break down complicated inquiries and reason through them in a detailed manner. This guided thinking procedure permits the model to [produce](https://git.rell.ru) more accurate, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually captured the industry's attention as a flexible text-generation model that can be integrated into various workflows such as representatives, sensible reasoning and information [analysis tasks](http://111.35.141.53000).<br>
<br>DeepSeek-R1 uses a Mixture 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 questions to the most pertinent expert "clusters." This approach permits the design to concentrate on various problem 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 instance to deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the [reasoning abilities](http://git.cxhy.cn) of the main R1 design to more efficient architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller sized, more effective designs to simulate the behavior and reasoning patterns of the larger DeepSeek-R1 design, using 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 model, we advise releasing this model with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, prevent hazardous material, and examine designs against crucial safety requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and [Bedrock](http://gite.limi.ink) Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to various use cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls throughout your generative [AI](https://git.rungyun.cn) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you require access to an ml.p5e instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and verify you're using ml.p5e.48 xlarge for endpoint usage. 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, develop a limit boost request and reach out to your account team.<br>
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock [Guardrails](https://gitlab.econtent.lu). For instructions, see Establish permissions to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid harmful content, and assess designs against crucial safety requirements. You can implement precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to [apply guardrails](https://git2.nas.zggsong.cn5001) to assess user inputs and [design reactions](https://ideezy.com) deployed 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 produce the guardrail, see the GitHub repo.<br>
<br>The basic flow includes the following actions: First, the system gets an input for the design. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent to the design for reasoning. After getting the model's output, another guardrail check is used. If the output passes this final check, it's returned as the final result. However, if either the input or output is stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following areas [demonstrate inference](https://soehoe.id) using 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 structure designs (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 designs in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and select the DeepSeek-R1 design.<br>
<br>The model detail page provides necessary details about the model's capabilities, prices structure, and execution standards. You can discover detailed usage instructions, including sample API calls and code snippets for integration. The model supports various text generation tasks, including content production, code generation, and question answering, using its support learning optimization and CoT thinking capabilities.
The page also includes [implementation choices](http://www.lebelleclinic.com) and licensing details to help you begin with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, select Deploy.<br>
<br>You will be triggered to configure the release details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a variety of circumstances (in between 1-100).
6. For Instance type, choose your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service role permissions, and encryption settings. For many use cases, the default settings will work well. However, for production deployments, you may wish to evaluate these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to begin using the design.<br>
<br>When the deployment is complete, you can test DeepSeek-R1's abilities straight in the Amazon Bedrock play ground.
8. Choose Open in play ground to access an interactive interface where you can try out various prompts and change model parameters like temperature and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum results. For example, material 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 instant feedback, assisting you comprehend how the model reacts to various inputs and letting you tweak your prompts for ideal outcomes.<br>
<br>You can quickly evaluate the model in the play ground through the UI. However, [kousokuwiki.org](http://kousokuwiki.org/wiki/%E5%88%A9%E7%94%A8%E8%80%85:AnkeStarnes867) to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning using a deployed DeepSeek-R1 model through Amazon Bedrock utilizing 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 actually created the guardrail, use the following code to [implement guardrails](https://notitia.tv). The script initializes the bedrock_runtime client, sets up inference specifications, and sends a request to create text based upon a user prompt.<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](http://59.56.92.3413000) that you can deploy with just a few clicks. With [SageMaker](https://git.dev-store.ru) JumpStart, you can tailor pre-trained designs 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 uses 2 hassle-free approaches: utilizing the user-friendly SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both techniques to help you choose the method that finest matches your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to release DeepSeek-R1 using SageMaker JumpStart:<br>
<br>1. On the SageMaker console, pick Studio in the navigation pane.
2. [First-time](https://www.cbmedics.com) users will be triggered to produce a domain.
3. On the SageMaker Studio console, [choose JumpStart](http://43.136.17.1423000) in the navigation pane.<br>
<br>The model web browser shows available designs, with details like the provider name and design abilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each [model card](https://git.dev-store.ru) shows key details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if relevant), suggesting that this model can be registered with Amazon Bedrock, [enabling](http://git.cxhy.cn) you to utilize Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The design details page includes the following details:<br>
<br>- The design name and service provider details.
Deploy button to release the design.
About and Notebooks tabs with [detailed](https://www.eadvisor.it) details<br>
<br>The About tab includes crucial details, such as:<br>
<br>- Model description.
- License details.
- Technical specs.
- Usage guidelines<br>
<br>Before you release the model, it's suggested to evaluate the model details and license terms to verify compatibility with your use case.<br>
<br>6. Choose Deploy to continue with implementation.<br>
<br>7. For Endpoint name, use the immediately produced name or produce a custom-made one.
8. For example type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, enter the variety of instances (default: 1).
Selecting proper [instance](http://47.110.248.4313000) types and counts is essential for expense and performance optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time reasoning is selected by default. This is optimized for sustained traffic and low latency.
10. Review all setups for precision. For this model, we highly advise [sticking](http://president-park.co.kr) to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to release the design.<br>
<br>The deployment procedure can take numerous minutes to complete.<br>
<br>When implementation is total, your endpoint status will alter to InService. At this moment, the model is all set to accept inference demands through the endpoint. You can monitor the deployment progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the deployment is complete, you can invoke the model utilizing a [SageMaker](https://gitlab-heg.sh1.hidora.com) runtime client and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To get begun with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS permissions and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for . The code for deploying the model is supplied in the Github here. You can clone the note pad and range from SageMaker Studio.<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 likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as revealed in the following code:<br>
<br>Tidy up<br>
<br>To avoid [undesirable](http://101.42.90.1213000) charges, complete the steps in this area to tidy up your [resources](https://www.refermee.com).<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you released the model utilizing Amazon Bedrock Marketplace, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the [navigation](https://www.ejobsboard.com) pane, pick Marketplace deployments.
2. In the Managed deployments section, find the endpoint you wish 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 deployment: 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 costs 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 or Amazon Bedrock Marketplace now to get begun. For more details, refer to Use Amazon Bedrock [tooling](http://swwwwiki.coresv.net) with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting started with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist [Solutions](https://projob.co.il) Architect for Inference at AWS. He helps emerging generative [AI](https://git.youxiner.com) companies develop innovative options utilizing AWS services and accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and enhancing the reasoning efficiency of large [language designs](https://www.fightdynasty.com). In his totally free time, Vivek delights in treking, viewing motion pictures, and attempting various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://kohentv.flixsterz.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](https://afrocinema.org) accelerators (AWS Neuron). He holds a [Bachelor's degree](http://xrkorea.kr) in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect dealing with generative [AI](https://www.mgtow.tv) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://cloudsound.ideiasinternet.com) hub. She is enthusiastic about developing solutions that assist consumers accelerate their [AI](http://gitlab.qu-in.com) journey and unlock service worth.<br>