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

Fiona Smoot 2025-02-22 17:11:01 +08:00
commit 38e273013d
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 [designs](https://givebackabroad.org) are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](https://equipifieds.com)'s first-generation frontier design, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion parameters to construct, experiment, and responsibly scale your generative [AI](https://eschoolgates.com) 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 comparable actions to release 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](https://elmerbits.com) that utilizes support discovering to boost reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A crucial distinguishing feature is its support knowing (RL) step, [hb9lc.org](https://www.hb9lc.org/wiki/index.php/User:MatthewOconner5) which was used to improve the design's reactions beyond the basic pre-training and tweak process. By including RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately improving both relevance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, implying it's geared up to break down intricate queries and factor through them in a detailed manner. This directed reasoning [procedure](https://git.adminkin.pro) allows the design to produce more accurate, transparent, and detailed responses. This design integrates RL-based [fine-tuning](https://lifeinsuranceacademy.org) with CoT abilities, aiming to generate structured responses while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has actually caught the market's attention as a versatile text-generation design that can be incorporated into various workflows such as representatives, sensible reasoning and [it-viking.ch](http://it-viking.ch/index.php/User:ArnetteV70) data interpretation jobs.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion criteria, making it possible for efficient reasoning by routing inquiries to the most appropriate professional "clusters." This approach allows the design to focus on different problem domains while maintaining general performance. DeepSeek-R1 requires at least 800 GB of [HBM memory](https://virtualoffice.com.ng) in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 [GPUs providing](https://tradingram.in) 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 [distilled](http://www.pygrower.cn58081) models bring the thinking abilities of the main R1 model to more efficient architectures based on popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a [process](https://wiki.vifm.info) of training smaller sized, more efficient models to simulate the behavior and thinking patterns of the larger DeepSeek-R1 design, using it as an instructor design.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, prevent hazardous material, [bytes-the-dust.com](https://bytes-the-dust.com/index.php/User:NannetteOdell3) and assess models against essential security requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create several guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls throughout your generative [AI](http://www.kotlinx.com:3000) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and confirm you're utilizing 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 request a limitation increase, develop a limitation boost demand and connect to your account team.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and [Gain Access](https://andyfreund.de) To Management (IAM) permissions to use Amazon Bedrock Guardrails. For instructions, see Set up approvals to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails permits you to introduce safeguards, prevent harmful material, and assess models against essential safety requirements. You can execute precaution for the DeepSeek-R1 model using the [Amazon Bedrock](http://greenmk.co.kr) ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.<br>
<br>The basic flow involves the following actions: First, the system receives 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 model for [inference](https://partyandeventjobs.com). After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the result. However, if either the input or output is intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following sections show reasoning utilizing this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, [forum.altaycoins.com](http://forum.altaycoins.com/profile.php?id=1089696) and specialized foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, pick Model catalog under Foundation models in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to conjure up the model. It doesn't APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a service provider and choose the DeepSeek-R1 model.<br>
<br>The model detail page provides necessary details about the design's abilities, prices structure, and application guidelines. You can discover detailed use guidelines, including sample API calls and code snippets for combination. The design supports numerous text generation jobs, consisting of material creation, code generation, and question answering, utilizing its reinforcement discovering optimization and CoT reasoning capabilities.
The page also consists of deployment choices and licensing details to help you start with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to configure 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 Number of instances, get in a [variety](https://virnal.com) of circumstances (between 1-100).
6. For example type, select your [instance type](https://www.stormglobalanalytics.com). For optimal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can configure advanced security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function approvals, and encryption settings. For most use cases, the default settings will work well. However, for [it-viking.ch](http://it-viking.ch/index.php/User:RaphaelLodewyckx) production deployments, you might want to review these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to start using the model.<br>
<br>When the release is complete, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in playground to access an interactive user interface where you can try out various prompts and adjust design specifications like temperature level and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal results. For instance, material for reasoning.<br>
<br>This is an outstanding method to check out the model's thinking and text generation abilities before integrating it into your applications. The play ground supplies immediate feedback, assisting you understand how the [model reacts](https://nuswar.com) to [numerous](https://lovn1world.com) inputs and letting you tweak your [triggers](http://194.87.97.823000) for [ideal outcomes](https://www.mpowerplacement.com).<br>
<br>You can quickly test the model in the play area through the UI. However, to invoke the deployed model programmatically with any [Amazon Bedrock](https://sportworkplace.com) APIs, you require 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 carry out reasoning utilizing a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can create 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 produced the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference criteria, and sends out a demand to create text based on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an [artificial intelligence](https://dolphinplacements.com) (ML) hub with FMs, integrated algorithms, and prebuilt ML services that you can release with simply a few clicks. With SageMaker JumpStart, [wiki-tb-service.com](http://wiki-tb-service.com/index.php?title=Benutzer:GregoryNixon45) you can tailor pre-trained models to your use case, with your information, and deploy them into [production](https://niaskywalk.com) using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart provides 2 hassle-free approaches: utilizing the instinctive SageMaker JumpStart UI or [implementing programmatically](http://maitri.adaptiveit.net) through the SageMaker Python SDK. Let's check out both techniques to assist you select the method that best fits your requirements.<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, select 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 internet browser shows available designs, with details like the supplier name and model capabilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each design card reveals key details, consisting of:<br>
<br>- Model name
- Provider name
- Task [category](https://git.nagaev.pro) (for example, Text Generation).
Bedrock Ready badge (if appropriate), showing that this design can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the model card to view the model details page.<br>
<br>The model details page includes 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 consists of essential details, such as:<br>
<br>- Model description.
- License details.
- Technical specifications.
- Usage guidelines<br>
<br>Before you deploy the model, it's advised to examine the model details and license terms to confirm compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with release.<br>
<br>7. For Endpoint name, use the immediately produced name or create a customized one.
8. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the number of circumstances (default: 1).
Selecting appropriate circumstances types and counts is important for cost and [efficiency optimization](https://www.dutchsportsagency.com). Monitor your [implementation](http://59.110.68.1623000) to adjust 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 configurations for precision. For this model, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to deploy the model.<br>
<br>The deployment process can take a number of minutes to finish.<br>
<br>When deployment is total, your endpoint status will change to [InService](http://stackhub.co.kr). At this point, the model is prepared to accept reasoning requests through the endpoint. You can keep track of the implementation progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is complete, you can conjure up the [model utilizing](https://git.trov.ar) a SageMaker runtime customer and incorporate it with your [applications](https://www.aspira24.com).<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the [essential AWS](http://124.16.139.223000) permissions 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 releasing the design is provided in the Github here. You can clone the notebook and run from [SageMaker Studio](https://empleos.dilimport.com).<br>
<br>You can run extra demands 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 create a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:<br>
<br>Tidy up<br>
<br>To avoid undesirable charges, complete the steps in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you released the model utilizing Amazon Bedrock Marketplace, total the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, select Marketplace releases.
2. In the Managed deployments area, [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:GrazynaKoss711) find the endpoint you desire to delete.
3. Select the endpoint, and on the [Actions](https://www.jgluiggi.xyz) menu, [choose Delete](https://rami-vcard.site).
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 model you released will sustain expenses if you leave it [running](http://pplanb.co.kr). 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 explored 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](https://gitlab.t-salon.cc) now to get begun. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart [pretrained](https://social1776.com) models, 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 [Architect](https://sunrise.hireyo.com) for Inference at AWS. He assists emerging generative [AI](http://tigg.1212321.com) business construct ingenious [services utilizing](http://globalnursingcareers.com) AWS services and accelerated calculate. Currently, he is concentrated on establishing methods for fine-tuning and enhancing the inference performance of big language models. In his spare time, Vivek delights in treking, enjoying films, and attempting various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://social.instinxtreme.com) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area of focus is AWS [AI](http://wecomy.co.kr) [accelerators](https://app.deepsoul.es) (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](http://42.192.130.83:3000) with the Third-Party Model [Science](http://ribewiki.dk) 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://local.wuanwanghao.top:3000) hub. She is enthusiastic about constructing options that assist [clients accelerate](http://harimuniform.co.kr) their [AI](https://igit.heysq.com) journey and unlock business value.<br>