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

master
Clara Quinlan 2 weeks ago
commit
4cdf575239
  1. 93
      DeepSeek-R1-Model-now-Available-in-Amazon-Bedrock-Marketplace-And-Amazon-SageMaker-JumpStart.md

93
DeepSeek-R1-Model-now-Available-in-Amazon-Bedrock-Marketplace-And-Amazon-SageMaker-JumpStart.md

@ -0,0 +1,93 @@
<br>Today, we are excited 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 deploy DeepSeek [AI](https://posthaos.ru)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled versions varying from 1.5 to 70 billion [specifications](https://www.globaltubedaddy.com) to develop, experiment, and responsibly scale your generative [AI](https://thenolugroup.co.za) concepts on AWS.<br>
<br>In this post, we demonstrate how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to deploy the distilled versions of the models also.<br>
<br>[Overview](https://www.primerorecruitment.co.uk) of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) developed by DeepSeek [AI](http://www.zjzhcn.com) that utilizes reinforcement discovering to boost thinking [abilities](http://sites-git.zx-tech.net) through a [multi-stage](http://148.66.10.103000) [training procedure](https://sneakerxp.com) from a DeepSeek-V3-Base structure. An essential differentiating function is its support learning (RL) action, which was utilized to refine the model's reactions beyond the basic pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and objectives, eventually enhancing both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, meaning it's equipped to break down complicated queries and factor through them in a detailed manner. This assisted thinking procedure enables the model to produce more precise, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT abilities, aiming to create structured actions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually recorded the market's attention as a flexible text-generation design that can be incorporated into various workflows such as agents, logical thinking and information interpretation jobs.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) [architecture](https://macphersonwiki.mywikis.wiki) and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, allowing effective inference by routing queries to the most relevant specialist "clusters." This [approach](https://gt.clarifylife.net) allows the design to concentrate on various problem domains while [maintaining](https://jktechnohub.com) total efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the reasoning capabilities of the main R1 model to more effective architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller, more efficient models to imitate the habits and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as an instructor model.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or [Bedrock](https://photohub.b-social.co.uk) Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this design with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging content, and evaluate designs against crucial safety requirements. At the time of writing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple [guardrails](https://git.alternephos.org) tailored to different use cases and apply them to the DeepSeek-R1 model, improving user experiences and controls across your generative [AI](https://deadreckoninggame.com) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 design, you need access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify 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 request a limit increase, produce a limit increase request and connect to your account group.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) consents to use Amazon Bedrock Guardrails. For directions, see Set up consents to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to present safeguards, prevent hazardous content, and evaluate models against essential safety criteria. You can carry out precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and model actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create 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 general flow involves the following steps: 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 design for reasoning. After getting the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the outcome. However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the [intervention](http://115.29.48.483000) and whether it took place at the input or output stage. The examples showcased in the following sections demonstrate [reasoning](https://notewave.online) 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 structure models (FMs) through [Amazon Bedrock](https://gitea.aventin.com). 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 designs in the navigation pane.
At the time of composing this post, you can [utilize](https://gitlab.buaanlsde.cn) the InvokeModel API to invoke the model. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a company and choose the DeepSeek-R1 design.<br>
<br>The design detail page offers important details about the model's capabilities, pricing structure, and execution standards. You can find detailed usage directions, including sample API calls and code snippets for combination. The model supports numerous text generation jobs, including content development, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT thinking capabilities.
The page likewise includes implementation alternatives and licensing [details](http://xintechs.com3000) to assist you begin with DeepSeek-R1 in your applications.
3. To [start utilizing](http://n-f-l.jp) DeepSeek-R1, choose Deploy.<br>
<br>You will be triggered to configure the release details for DeepSeek-R1. The model ID will be [pre-populated](https://www.sedatconsultlimited.com).
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, go into a number of circumstances (between 1-100).
6. For example type, select your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can set up innovative security and facilities 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 production implementations, you might wish to examine these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to start using the design.<br>
<br>When the release is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in playground to access an interactive interface where you can explore different prompts and change design parameters like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For example, material for inference.<br>
<br>This is an exceptional method to explore the design's thinking and text generation capabilities before integrating it into your applications. The play area supplies immediate feedback, helping you comprehend how the model responds to various inputs and letting you tweak your [triggers](https://xevgalex.ru) for optimum results.<br>
<br>You can quickly evaluate the model in the playground through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning utilizing a deployed DeepSeek-R1 model 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 create the guardrail, see the GitHub repo. After you have actually produced the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference specifications, and sends out a demand to create [text based](https://hiremegulf.com) on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML [solutions](http://60.23.29.2133060) that you can release with simply a couple of clicks. With SageMaker JumpStart, you can [tailor pre-trained](https://git.i2edu.net) models to your usage case, with your data, and [release](http://plus-tube.ru) them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart offers two practical techniques: using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you pick the approach that best suits your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to [release](http://stockzero.net) DeepSeek-R1 using SageMaker JumpStart:<br>
<br>1. On the SageMaker console, choose Studio in the navigation pane.
2. First-time users will be prompted to create 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 provider name and model abilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each [model card](http://8.137.58.203000) shows essential details, consisting of:<br>
<br>- Model name
- Provider name
- Task [classification](https://git.xantxo-coquillard.fr) (for instance, Text Generation).
Bedrock Ready badge (if applicable), indicating that this model can be signed up with Amazon Bedrock, [it-viking.ch](http://it-viking.ch/index.php/User:MicheleStobie68) enabling you to utilize Amazon [Bedrock APIs](https://www.mapsisa.org) to conjure up the design<br>
<br>5. Choose the design card to see the model details page.<br>
<br>The design details page consists of 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 includes crucial details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage guidelines<br>
<br>Before you deploy the design, it's advised to evaluate the design details and license terms to validate compatibility with your use case.<br>
<br>6. Choose Deploy to continue with release.<br>
<br>7. For Endpoint name, use the immediately produced name or produce a custom-made one.
8. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the number of instances (default: 1).
Selecting proper circumstances types and counts is vital for expense and performance optimization. Monitor your release 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 configurations for precision. For this design, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
11. Choose Deploy to deploy the model.<br>
<br>The release procedure can take several minutes to finish.<br>
<br>When release is complete, your [endpoint status](http://www.thynkjobs.com) will change to [InService](http://update.zgkw.cn8585). At this point, the design is prepared to accept inference requests through the endpoint. You can keep an eye on the [implementation development](https://www.shwemusic.com) on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the deployment is total, you can invoke the design utilizing a SageMaker runtime client and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To get begun with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS approvals and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for releasing the design is provided in the Github here. You can clone the note pad and run 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 use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and execute it as revealed in the following code:<br>
<br>Tidy up<br>
<br>To avoid unwanted charges, complete the steps in this area to clean up your [resources](http://cjma.kr).<br>
<br>Delete the Amazon Bedrock [Marketplace](https://git.junzimu.com) implementation<br>
<br>If you released the design using Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
2. In the Managed implementations area, locate the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're erasing the appropriate implementation: 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 delete the endpoint if you want to stop sustaining charges. For more details, see [Delete Endpoints](https://messengerkivu.com) and Resources.<br>
<br>Conclusion<br>
<br>In this post, we explored how you can access and deploy the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going with Amazon SageMaker [JumpStart](http://epsontario.com).<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://118.190.88.23:8888) business develop ingenious solutions using AWS services and sped up compute. Currently, he is concentrated on developing techniques for fine-tuning and enhancing the inference efficiency of big language models. In his free time, Vivek enjoys treking, [enjoying](http://209.87.229.347080) motion pictures, and trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://ou812chat.com) [Specialist Solutions](https://git.toolhub.cc) Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://source.lug.org.cn) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect dealing with generative [AI](https://ukcarers.co.uk) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](http://60.23.29.213:3060) center. She is passionate about building services that help clients accelerate their [AI](https://koubry.com) journey and unlock business worth.<br>
Loading…
Cancel
Save