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

Tony Ruby 2025-02-17 08:41:54 +08:00
commit 6e777ce5b5

@ -0,0 +1,93 @@
<br>Today, we are thrilled to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](https://southwales.com)'s first-generation frontier design, DeepSeek-R1, together with the distilled versions varying from 1.5 to 70 billion [parameters](http://profilsjob.com) to develop, experiment, and properly scale your generative [AI](https://adsall.net) 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 similar actions to release the distilled versions of the models too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](http://120.25.165.207:3000) that utilizes reinforcement discovering to boost reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A [crucial](http://47.101.46.1243000) identifying function is its reinforcement knowing (RL) action, which was utilized to [improve](https://asixmusik.com) the design's responses beyond the basic pre-training and fine-tuning process. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately boosting both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, meaning it's geared up to break down complicated inquiries and reason through them in a detailed way. This directed reasoning procedure [permits](https://test1.tlogsir.com) the model to produce more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT capabilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has actually [recorded](http://47.101.46.1243000) the market's attention as a versatile text-generation model that can be integrated into numerous workflows such as agents, rational thinking and data interpretation jobs.<br>
<br>DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion [criteria](https://dating.checkrain.co.in) in size. The MoE architecture allows activation of 37 billion parameters, enabling efficient reasoning by routing inquiries to the most appropriate specialist "clusters." This method enables the model 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 circumstances to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the reasoning abilities of the main R1 design to more [efficient architectures](https://integramais.com.br) based on popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller sized, more efficient models to [imitate](https://juryi.sn) the behavior and thinking patterns of the larger DeepSeek-R1 model, utilizing it as an instructor design.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we [recommend deploying](http://47.119.27.838003) this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, avoid damaging content, and [wiki.snooze-hotelsoftware.de](https://wiki.snooze-hotelsoftware.de/index.php?title=Benutzer:DenishaHolyfield) evaluate models against key safety criteria. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and [Bedrock](https://jobs.com.bn) 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 design, enhancing user experiences and [standardizing safety](https://writerunblocks.com) controls throughout your [generative](http://grainfather.asia) [AI](https://topdubaijobs.ae) [applications](https://syndromez.ai).<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 design, you need 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 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 deploying. To request a limitation increase, produce a limitation increase demand and reach out 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://git.hitchhiker-linux.org) To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For directions, see Establish approvals to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to introduce safeguards, avoid hazardous content, and assess designs against essential security criteria. You can implement precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to examine user inputs and model reactions deployed 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](https://code.3err0.ru) the guardrail, see the [GitHub repo](http://8.138.173.1953000).<br>
<br>The general flow [involves](http://139.224.253.313000) 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 to the design for inference. After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the final outcome. 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 stage. The examples showcased in the following sections demonstrate inference 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](https://accc.rcec.sinica.edu.tw). To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, [select Model](https://younetwork.app) brochure under Foundation designs in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and select the DeepSeek-R1 design.<br>
<br>The design detail page provides important details about the design's capabilities, pricing structure, and execution standards. You can discover detailed use instructions, including sample API calls and code snippets for integration. The model supports different text generation jobs, including material development, code generation, and concern answering, using its reinforcement discovering optimization and CoT reasoning capabilities.
The page likewise includes deployment options and licensing details to help you start with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to set up 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 number of instances (in between 1-100).
6. For Instance type, select your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can set up advanced security and facilities settings, consisting of virtual private cloud (VPC) networking, service function approvals, and file encryption settings. For most use cases, the default settings will work well. However, for production deployments, you might wish to review these settings to line up with your company's security and compliance requirements.
7. Choose Deploy to start utilizing the model.<br>
<br>When the deployment is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play ground to access an interactive interface where you can experiment with various prompts and adjust model specifications like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, material for reasoning.<br>
<br>This is an outstanding method to check out the design's thinking and text generation abilities before integrating it into your applications. The play area offers instant feedback, assisting you understand how the design reacts to various inputs and letting you fine-tune your triggers for optimal results.<br>
<br>You can rapidly test the model in the play ground through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock 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 perform reasoning using a deployed 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 produce the guardrail, see the GitHub repo. After you have actually produced the guardrail, utilize the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends a demand to produce text based upon 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 deploy with simply a few clicks. With SageMaker 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 model through [SageMaker JumpStart](https://supardating.com) uses 2 practical techniques: using the instinctive SageMaker [JumpStart](https://code.3err0.ru) UI or executing programmatically through the [SageMaker Python](https://champ217.flixsterz.com) SDK. Let's check out both techniques to assist you choose the technique that [finest suits](https://sistemagent.com8081) your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to deploy DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, choose Studio in the navigation pane.
2. First-time users will be triggered to produce a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The design browser displays available models, with details like the service provider name and [model capabilities](https://wiki.whenparked.com).<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each [design card](https://www.celest-interim.fr) reveals crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if suitable), indicating that this design can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the design<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The design name and service provider details.
Deploy button to deploy the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes crucial details, such as:<br>
<br>- Model [description](https://gitlab.isc.org).
- License details.
- Technical specs.
- Usage guidelines<br>
<br>Before you deploy the model, it's advised to examine the design details and license terms to validate compatibility with your usage case.<br>
<br>6. [Choose Deploy](http://89.234.183.973000) to continue with implementation.<br>
<br>7. For Endpoint name, use the immediately created name or develop a custom one.
8. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the number of instances (default: 1).
Selecting suitable circumstances types and counts is crucial for cost and performance optimization. [Monitor](http://udyogservices.com) your release to adjust these settings as needed.Under type, Real-time inference is selected by default. This is enhanced for sustained traffic and low latency.
10. Review all configurations for precision. For this design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to release the design.<br>
<br>The deployment procedure can take a number of minutes to finish.<br>
<br>When [release](https://jobboat.co.uk) is total, your endpoint status will change to [InService](https://sundaycareers.com). At this point, the design is ready to accept reasoning demands through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the deployment is complete, you can invoke the design utilizing a SageMaker runtime client and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To begin with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS 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 model is provided in the Github here. You can clone the notebook and range from SageMaker Studio.<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 develop a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:<br>
<br>Tidy up<br>
<br>To avoid unwanted charges, complete the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you released the model using Amazon Bedrock Marketplace, total the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace implementations.
2. In the Managed releases section, locate the endpoint you desire to delete.
3. Select the endpoint, and on the Actions menu, [choose Delete](https://gitlab.anc.space).
4. Verify the endpoint details to make certain you're erasing the right 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 expenses if you leave it running. Use the following code to delete 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](https://git.cooqie.ch) Bedrock Marketplace and SageMaker [JumpStart](https://git.jzcscw.cn). Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart [pretrained](https://marcosdumay.com) 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 helps emerging generative [AI](http://app.vellorepropertybazaar.in) business build ingenious services using AWS services and [trademarketclassifieds.com](https://trademarketclassifieds.com/user/profile/2684771) sped up compute. Currently, [larsaluarna.se](http://www.larsaluarna.se/index.php/User:BettyS407541305) he is focused on developing techniques for fine-tuning and enhancing the inference performance of large language models. In his leisure time, [wiki.snooze-hotelsoftware.de](https://wiki.snooze-hotelsoftware.de/index.php?title=Benutzer:KristeenBurkhart) Vivek takes pleasure in treking, enjoying movies, and trying various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://abstaffs.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](https://adsall.net) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect dealing with generative [AI](http://47.76.141.28:3000) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and [tactical collaborations](http://185.5.54.226) for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://www.2dudesandalaptop.com) center. She is [enthusiastic](https://www.pickmemo.com) about [constructing options](http://mangofarm.kr) that assist customers accelerate their [AI](http://stockzero.net) journey and unlock service worth.<br>