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

Adela Coffman 2025-06-02 05:01:15 +08:00
parent 4c442efe4a
commit 731b4af4d0
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://47.119.20.13:8300)'s first-generation frontier design, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative [AI](https://git.palagov.tv) concepts on AWS.<br>
<br>In this post, we demonstrate how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to [release](https://gogs.artapp.cn) the distilled versions of the models too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language model (LLM) developed by DeepSeek [AI](http://famedoot.in) that utilizes reinforcement finding out to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential identifying function is its reinforcement knowing (RL) step, which was used to fine-tune the model's reactions beyond the basic pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adapt more successfully to user feedback and objectives, ultimately boosting both importance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, implying it's geared up to break down complicated questions and factor through them in a detailed way. This [guided thinking](http://121.199.172.2383000) process permits the model to produce more precise, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually recorded the market's attention as a flexible text-generation model that can be integrated into different workflows such as representatives, sensible reasoning and information interpretation tasks.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion criteria, enabling effective reasoning by routing questions to the most relevant specialist "clusters." This method allows the model to [specialize](https://jobs.web4y.online) in different problem domains while maintaining general efficiency. DeepSeek-R1 needs a minimum of 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 comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 model to more effective architectures based upon popular open [designs](http://git.datanest.gluc.ch) like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller sized, more effective models to imitate the habits and reasoning patterns of the bigger DeepSeek-R1 design, utilizing it as an instructor design.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock [Marketplace](https://www.fionapremium.com). Because DeepSeek-R1 is an emerging model, we suggest deploying this model with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous content, and examine models against crucial security criteria. At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop multiple guardrails tailored to different use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls across your generative [AI](https://git.russell.services) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you require access to an ml.p5e [instance](https://rosaparks-ci.com). To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and [validate](https://code.smolnet.org) you're using 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 ask for a limitation increase, produce a limit boost demand and reach out to your account group.<br>
<br>Because you will be deploying this model with [Amazon Bedrock](https://noteswiki.net) Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For guidelines, see Set up permissions to use guardrails for content filtering.<br>
<br>[Implementing guardrails](http://gogs.funcheergame.com) with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to introduce safeguards, prevent hazardous content, and assess models against key security criteria. You can execute security steps for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This [enables](https://foxchats.com) you to apply guardrails to evaluate user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the [Amazon Bedrock](https://kahps.org) or the API. For the example code to develop the guardrail, see the GitHub repo.<br>
<br>The general [circulation](https://forsetelomr.online) includes the following steps: First, the system gets 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. After getting the model's output, another guardrail check is used. If the output passes this last check, it's returned as the last [outcome](https://gitlabdemo.zhongliangong.com). However, if either the input or output is stepped in by the guardrail, a message is returned indicating the nature of the [intervention](https://ttemployment.com) and whether it happened at the input or output stage. The examples showcased in the following sections demonstrate inference utilizing 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 structure models (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, pick Model brochure 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 provider and choose the DeepSeek-R1 design.<br>
<br>The model detail page offers necessary details about the model's abilities, pricing structure, and implementation guidelines. You can find detailed usage instructions, consisting of sample API calls and code snippets for integration. The design supports numerous text generation jobs, consisting of content production, code generation, and concern answering, using its support discovering optimization and CoT thinking capabilities.
The page likewise includes release options and licensing details to help you get going with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, select Deploy.<br>
<br>You will be triggered to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated.
4. For [systemcheck-wiki.de](https://systemcheck-wiki.de/index.php?title=Benutzer:Monte35P2532) Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of instances, go into a number of [circumstances](https://topbazz.com) (between 1-100).
6. For [Instance](https://co2budget.nl) type, pick your instance type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can configure innovative security and infrastructure settings, including virtual personal cloud (VPC) networking, service role authorizations, and file encryption settings. For a lot of utilize cases, the default settings will work well. However, for [production](https://gitea.aventin.com) releases, you might wish to examine these [settings](http://120.26.64.8210880) to line up with your company's security and compliance requirements.
7. Choose Deploy to begin utilizing the model.<br>
<br>When the release is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in play area to access an interactive interface where you can experiment with different prompts and change model specifications like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For instance, material for reasoning.<br>
<br>This is an excellent way to explore the model's reasoning and text generation capabilities before integrating it into your applications. The playground offers instant feedback, helping you [understand](http://8.134.38.1063000) how the design responds to various inputs and letting you tweak your prompts for optimal outcomes.<br>
<br>You can rapidly check the design in the play area through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run inference using guardrails with the released DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform inference using a deployed DeepSeek-R1 model through [Amazon Bedrock](https://my-sugar.co.il) using the invoke_model and ApplyGuardrail API. You can create a guardrail utilizing the [Amazon Bedrock](http://kousokuwiki.org) console or the API. For the example code to create the guardrail, see the GitHub repo. After you have actually created the guardrail, [utilize](http://31.184.254.1768078) the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures reasoning criteria, and sends out 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 release with just a couple of clicks. With SageMaker JumpStart, you can [tailor pre-trained](https://audioedu.kyaikkhami.com) 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 hassle-free methods: utilizing the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you pick the technique that finest fits your needs.<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 users will be prompted to develop a domain.
3. On the SageMaker Studio console, pick JumpStart in the navigation pane.<br>
<br>The model web browser shows available models, with details like the service provider name and design [abilities](https://centerdb.makorang.com).<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each model card shows crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if suitable), suggesting that this design can be registered with Amazon Bedrock, allowing 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 model details page includes the following details:<br>
<br>- The model name and supplier details.
Deploy button to deploy the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of crucial details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage guidelines<br>
<br>Before you release the design, it's advised to review the [design details](http://47.244.232.783000) and license terms to validate compatibility with your use case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, use the automatically created name or create a custom-made one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the number of instances (default: 1).
Selecting appropriate circumstances 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 selected by default. This is enhanced for sustained traffic and low latency.
10. Review all configurations for accuracy. For this model, we highly advise adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to deploy the design.<br>
<br>The deployment process can take several minutes to complete.<br>
<br>When release is complete, your endpoint status will alter to InService. At this moment, the model is prepared to accept reasoning demands through the endpoint. You can keep an eye on the implementation development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is complete, you can conjure up the model using a SageMaker runtime customer and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 [utilizing](http://8.130.72.6318081) the SageMaker Python SDK<br>
<br>To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the needed AWS authorizations and environment setup. The following is a detailed code example that [demonstrates](https://foxchats.com) how to deploy and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the model is provided in the Github here. You can clone the notebook and range from SageMaker Studio.<br>
<br>You can run additional demands against the predictor:<br>
<br>Implement guardrails and run reasoning with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can likewise utilize 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>Clean up<br>
<br>To avoid undesirable charges, complete the steps in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you [deployed](http://64.227.136.170) the design using Amazon Bedrock Marketplace, total the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
2. In the Managed deployments area, find the endpoint you wish to erase.
3. Select the endpoint, and on the Actions menu, [choose Delete](https://193.31.26.118).
4. Verify the endpoint details to make certain you're erasing the proper release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the [SageMaker JumpStart](http://git.datanest.gluc.ch) predictor<br>
<br>The SageMaker JumpStart model 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 deploy the DeepSeek-R1 design utilizing Bedrock Marketplace and [SageMaker JumpStart](http://87.98.157.123000). Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, describe Use Amazon Bedrock tooling with [Amazon SageMaker](https://puzzle.thedimeland.com) JumpStart models, 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 assists emerging generative [AI](http://gitlab.dstsoft.net) companies build ingenious options utilizing AWS services and sped up calculate. Currently, he is focused on developing methods for fine-tuning and enhancing the inference efficiency of big language models. In his spare time, Vivek delights in hiking, enjoying films, and trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://truejob.co) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His [location](https://gitea.robertops.com) of focus is AWS [AI](https://4stour.com) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Specialist Solutions Architect working on generative [AI](http://101.200.220.49:8001) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, [SageMaker's artificial](http://www.hxgc-tech.com3000) intelligence and generative [AI](https://git.isatho.me) hub. She is enthusiastic about constructing services that help clients accelerate their [AI](http://113.105.183.190:3000) journey and unlock organization value.<br>