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

master
Alisa Mcewen 1 month ago
parent
commit
40e45418bf
  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://git.tbaer.de)'s first-generation frontier design, DeepSeek-R1, together with the distilled versions varying from 1.5 to 70 billion specifications to construct, experiment, and responsibly scale your generative [AI](https://www.truckjob.ca) concepts 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 actions to deploy the [distilled variations](http://182.230.209.608418) of the models also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) developed by DeepSeek [AI](https://dinle.online) that uses support discovering to boost reasoning abilities through a multi-stage training procedure from a DeepSeek-V3[-Base structure](https://bcstaffing.co). An essential differentiating function is its support knowing (RL) action, which was utilized to refine the design's actions beyond the basic pre-training and [tweak procedure](https://notewave.online). By including RL, DeepSeek-R1 can adapt more effectively to user feedback and objectives, ultimately enhancing both relevance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, implying it's equipped to break down complex inquiries and reason through them in a detailed way. This guided thinking process permits the design to produce more precise, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has captured the industry's attention as a [versatile](https://signedsociety.com) text-generation design that can be incorporated into various workflows such as agents, sensible thinking and information analysis tasks.<br>
<br>DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion specifications, making it possible for efficient reasoning by routing questions to the most relevant specialist "clusters." This approach allows the design to specialize in different issue domains while maintaining total performance. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge features 8 Nvidia H200 [GPUs supplying](http://www.jobteck.co.in) 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the [reasoning](http://suvenir51.ru) capabilities 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 procedure of training smaller, more efficient designs to simulate the behavior and reasoning patterns of the larger DeepSeek-R1 model, utilizing it as an instructor design.<br>
<br>You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this design with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid hazardous material, and evaluate models against essential safety criteria. At the time of composing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:ElmaAfford18621) Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop 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](https://body-positivity.org) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 model, you require access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, [choose Amazon](https://www.groceryshopping.co.za) 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 deploying. To ask for a limitation boost, develop a limitation boost demand and connect to your account team.<br>
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) approvals to use Amazon Bedrock Guardrails. For [surgiteams.com](https://surgiteams.com/index.php/User:HannaBard5) instructions, 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 present safeguards, avoid damaging content, and examine designs against essential safety [criteria](http://47.103.29.1293000). You can [implement](https://git.dsvision.net) precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to evaluate user inputs and model reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail utilizing the Amazon [Bedrock console](https://www.linkedaut.it) or the API. For the example code to create the guardrail, see the GitHub repo.<br>
<br>The basic circulation involves the following steps: 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 out to the design for . After getting the design's output, another guardrail check is applied. If the output passes this last 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 took place at the input or output phase. The examples showcased in the following areas demonstrate 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](http://47.119.128.713000) designs (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 brochure under Foundation designs in the navigation pane.
At the time of writing this post, you can use the InvokeModel API to conjure up the model. It does not support Converse APIs and other [Amazon Bedrock](https://bgzashtita.es) tooling.
2. Filter for [yewiki.org](https://www.yewiki.org/User:LienBlakeley38) DeepSeek as a [service provider](https://gitea.shoulin.net) and pick the DeepSeek-R1 design.<br>
<br>The design detail page provides essential details about the model's capabilities, rates structure, and implementation guidelines. You can find detailed use instructions, including sample API calls and code bits for integration. The design supports numerous text generation jobs, consisting of content production, code generation, and question answering, utilizing its support finding out [optimization](https://git.manu.moe) and CoT thinking abilities.
The page also consists of release alternatives and licensing details to assist you get begun with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to configure the deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of instances, go into a variety of instances (between 1-100).
6. For example type, select your circumstances type. For optimum performance 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, including virtual personal cloud (VPC) networking, service function approvals, and [trademarketclassifieds.com](https://trademarketclassifieds.com/user/profile/2793353) encryption settings. For many utilize cases, the default settings will work well. However, for production releases, you may want to evaluate these settings to align with your company's security and [compliance](http://221.131.119.210030) requirements.
7. Choose Deploy to start using the model.<br>
<br>When the implementation is complete, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play area to access an interactive interface where you can explore different triggers and change design criteria like temperature level and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimal results. For instance, content for reasoning.<br>
<br>This is an excellent way to explore the design's thinking and text generation abilities before incorporating it into your applications. The play ground supplies immediate feedback, helping you understand how the design reacts to different inputs and letting you fine-tune your prompts for ideal results.<br>
<br>You can quickly check the model in the play area through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference using guardrails with the released DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to perform reasoning using a released DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, 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://acetamide.net) (ML) hub with FMs, [built-in](https://raovatonline.org) algorithms, and prebuilt ML solutions that you can [release](https://body-positivity.org) with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your information, and [release](http://admin.youngsang-tech.com) them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart provides 2 convenient techniques: using the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to help you choose the method that best matches your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to release DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, choose Studio in the navigation pane.
2. First-time users will be prompted to produce a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model internet browser shows available models, with details like the [service provider](https://source.lug.org.cn) name and model capabilities.<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 [model card](https://www.acaclip.com).
Each model card [reveals essential](https://gitlab.optitable.com) details, including:<br>
<br>- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if relevant), suggesting that this model can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the design<br>
<br>5. Choose the model card to see the model details page.<br>
<br>The model details page includes the following details:<br>
<br>- The model name and service provider details.
Deploy button to deploy the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of important details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you deploy the design, it's advised to evaluate the [design details](https://gl.b3ta.pl) and license terms to verify compatibility with your use case.<br>
<br>6. Choose Deploy to continue with [implementation](https://jobs.ahaconsultant.co.in).<br>
<br>7. For Endpoint name, use the instantly produced name or create a customized one.
8. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the variety of circumstances (default: 1).
Selecting proper instance types and counts is vital for cost and performance optimization. Monitor your implementation to change these settings as needed.Under Inference type, Real-time inference is selected by default. This is optimized for sustained traffic and low latency.
10. Review all configurations for accuracy. For this design, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to deploy the design.<br>
<br>The release process can take a number of minutes to complete.<br>
<br>When release is complete, your endpoint status will alter to InService. At this point, the model is all set to accept reasoning demands through the endpoint. You can monitor the deployment progress on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the implementation is total, you can conjure up the design utilizing a SageMaker runtime client and integrate it with your applications.<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 required AWS consents and environment setup. The following is a [detailed](https://rightlane.beparian.com) code example that shows how to deploy and use DeepSeek-R1 for reasoning programmatically. The code for deploying 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 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 shown in the following code:<br>
<br>Clean up<br>
<br>To prevent unwanted charges, finish the steps in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you released the design utilizing Amazon Bedrock Marketplace, total the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
2. In the Managed implementations section, locate the endpoint you desire to erase.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're deleting the appropriate release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you released will sustain expenses 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 design using Bedrock Marketplace and SageMaker JumpStart. 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 JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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://git.electrosoft.hr) companies develop ingenious options utilizing AWS services and accelerated calculate. Currently, he is focused on establishing techniques for fine-tuning and enhancing the reasoning efficiency of large language designs. In his spare time, Vivek delights in treking, watching motion pictures, and attempting various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://8.137.54.213:9000) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://bvbborussiadortmundfansclub.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](https://pakkjob.com) 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://101.35.184.155:3000) hub. She is passionate about building services that help customers accelerate their [AI](https://eukariyer.net) journey and unlock business value.<br>
Loading…
Cancel
Save