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

Alissa Kolb 2025-02-18 01:32:18 +08:00
parent 87765a69ed
commit ffecfb1f07
1 changed files with 93 additions and 0 deletions

@ -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://tj.kbsu.ru)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion [criteria](https://video.etowns.ir) to construct, experiment, and properly scale your generative [AI](https://axc.duckdns.org:8091) concepts on AWS.<br>
<br>In this post, we demonstrate how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled versions of the models as well.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](https://code.oriolgomez.com) that utilizes reinforcement discovering to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential differentiating feature is its support knowing (RL) action, which was utilized to improve the model's reactions beyond the basic pre-training and fine-tuning process. By integrating RL, DeepSeek-R1 can adapt more successfully to user feedback and goals, ultimately improving both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, suggesting it's equipped to break down complex queries and reason through them in a detailed manner. This guided reasoning process enables the model to produce more precise, transparent, and detailed answers. This model integrates [RL-based fine-tuning](https://esunsolar.in) with CoT capabilities, aiming to create structured responses while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has caught the market's attention as a [flexible text-generation](https://www.milegajob.com) model that can be incorporated into numerous workflows such as agents, sensible thinking and information interpretation jobs.<br>
<br>DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows [activation](https://publiccharters.org) of 37 billion criteria, making it possible for effective inference by routing inquiries to the most relevant professional "clusters." This approach enables the model to focus on various problem domains while [maintaining](http://vimalakirti.com) overall [efficiency](http://101.34.228.453000). DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge circumstances to deploy the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of [GPU memory](https://optimiserenergy.com).<br>
<br>DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 model to more efficient architectures based upon [popular](https://evertonfcfansclub.com) open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more effective designs to [imitate](http://jialcheerful.club3000) the habits and reasoning patterns of the bigger DeepSeek-R1 design, using it as a teacher model.<br>
<br>You can release 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 place. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous material, and evaluate designs against essential safety requirements. At the time of composing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to different usage cases and use them to the DeepSeek-R1 model, improving user experiences and standardizing security controls throughout your generative [AI](https://gitea.johannes-hegele.de) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 model, you need access to an ml.p5e instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and confirm you're using ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To ask for a limitation increase, create a limit increase demand and connect to your account group.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To [Management](https://src.dziura.cloud) (IAM) approvals to use Amazon Bedrock Guardrails. For guidelines, see Establish authorizations to utilize guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid damaging content, and assess designs against crucial safety requirements. You can implement precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to examine user inputs and design responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.<br>
<br>The basic flow involves the following actions: 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 out to the design for reasoning. After getting the design's output, another guardrail check is used. If the output passes this last check, it's [returned](http://udyogservices.com) as the outcome. However, if either the input or output is stepped in by the guardrail, a is [returned suggesting](https://gertsyhr.com) the nature of the intervention and whether it took place at the input or output stage. The examples showcased in the following areas show reasoning utilizing 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](http://gitea.digiclib.cn801). To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
<br>1. On the Amazon Bedrock console, choose Model catalog under [Foundation](https://tiktokbeans.com) models in the navigation pane.
At the time of composing this post, you can use 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 service provider and choose the DeepSeek-R1 design.<br>
<br>The model detail page supplies necessary [details](http://git.cnibsp.com) about the [design's](http://chkkv.cn3000) abilities, prices structure, and implementation standards. You can discover detailed use guidelines, consisting of sample API calls and [wiki.myamens.com](http://wiki.myamens.com/index.php/User:MarylynEsmond) code bits for integration. The design supports various text generation tasks, [including](https://lms.digi4equality.eu) content creation, code generation, and concern answering, utilizing its support finding out optimization and CoT thinking capabilities.
The page likewise includes release options and licensing details to assist you begin with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, select Deploy.<br>
<br>You will be prompted to configure the implementation details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (in between 1-50 [alphanumeric](https://git.daviddgtnt.xyz) characters).
5. For Variety of instances, enter a number of instances (in between 1-100).
6. For example type, select your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up advanced security and facilities settings, [consisting](https://git.cocorolife.tw) of virtual personal cloud (VPC) networking, [trademarketclassifieds.com](https://trademarketclassifieds.com/user/profile/2672496) service role approvals, and encryption [settings](https://www.teacircle.co.in). For many use cases, the default settings will work well. However, for production implementations, you may desire to evaluate these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to start utilizing the design.<br>
<br>When the deployment is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play ground.
8. Choose Open in play ground to access an interactive user interface where you can experiment with different prompts and adjust design parameters like temperature level and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal outcomes. For instance, content for reasoning.<br>
<br>This is an outstanding method to explore the model's thinking and text generation capabilities before incorporating it into your applications. The play area supplies instant feedback, assisting you comprehend how the [design responds](https://thevesti.com) to different inputs and letting you tweak your triggers for ideal results.<br>
<br>You can rapidly evaluate the design in the playground 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 utilizing guardrails with the released DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning using a deployed DeepSeek-R1 design through Amazon Bedrock [utilizing](http://82.156.184.993000) the invoke_model and ApplyGuardrail API. You can create a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, sets up inference parameters, and sends a request to create text based upon a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML solutions that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your information, and deploy them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 hassle-free approaches: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both techniques to help you pick the approach that best matches your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to release DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, [select Studio](https://gitlab-dev.yzone01.com) in the navigation pane.
2. First-time users will be triggered to develop a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model browser shows available designs, with details like the company name and model capabilities.<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each design card shows key details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if relevant), indicating that this model can be registered with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the design card to view the model details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The model name and provider details.
Deploy button to deploy the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes essential details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you release the model, it's recommended to review the design details and license terms to confirm compatibility with your usage case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, utilize the instantly created name or produce a customized one.
8. For Instance type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, go into the variety of circumstances (default: [forum.altaycoins.com](http://forum.altaycoins.com/profile.php?id=1085681) 1).
Selecting suitable circumstances types and counts is crucial for cost and performance optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time reasoning is selected by default. This is optimized for sustained traffic and low latency.
10. Review all configurations for accuracy. For this model, we highly suggest adhering 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 several minutes to finish.<br>
<br>When implementation is total, your endpoint status will change to InService. At this point, the model is ready to accept inference requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the deployment is total, you can conjure up the model using a SageMaker runtime customer and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To start with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the required AWS permissions and environment setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for [deploying](https://10-4truckrecruiting.com) the model is offered in the Github here. You can clone the note pad and range from SageMaker Studio.<br>
<br>You can run extra requests against the predictor:<br>
<br>Implement guardrails and run inference with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:<br>
<br>Clean up<br>
<br>To prevent unwanted charges, complete the steps in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you deployed the model using Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace releases.
2. In the Managed releases section, find the endpoint you wish to delete.
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 model you released will sustain expenses if you leave it running. Use the following code to erase the endpoint if you want to stop sustaining charges. For more details, see Delete Endpoints and [Resources](http://120.237.152.2188888).<br>
<br>Conclusion<br>
<br>In this post, we [checked](https://git.peaksscrm.com) out how you can access and [release](https://git.mikecoles.us) the DeepSeek-R1 design using Bedrock Marketplace and [wiki.asexuality.org](https://wiki.asexuality.org/w/index.php?title=User_talk:GonzaloVue84412) SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock [Marketplace](http://182.92.143.663000) now to get started. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going with Amazon [SageMaker JumpStart](https://git.mikecoles.us).<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative [AI](https://andonovproltd.com) companies develop ingenious services using AWS services and sped up [calculate](http://1138845-ck16698.tw1.ru). Currently, he is concentrated on establishing methods for [yewiki.org](https://www.yewiki.org/User:WinifredHassell) fine-tuning and enhancing the inference performance of big language designs. In his downtime, [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11860868) Vivek delights in hiking, viewing films, and attempting different cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://jobteck.com) Specialist Solutions [Architect](https://www.wow-z.com) with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://git.nazev.eu) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect dealing with generative [AI](https://twittx.live) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, [bio.rogstecnologia.com.br](https://bio.rogstecnologia.com.br/mia335414507) and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://www.naukrinfo.pk) center. She is passionate about developing solutions that assist customers accelerate their [AI](https://172.105.135.218) journey and unlock company worth.<br>