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

Buck Brock 2025-02-08 22:41:41 +08:00
commit 014365203b
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 deploy DeepSeek [AI](https://recruitment.transportknockout.com)'s first-generation frontier design, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your [generative](https://trustemployement.com) [AI](https://scfr-ksa.com) ideas on AWS.<br>
<br>In this post, we show how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled versions of the models as well.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) established by DeepSeek [AI](http://funnydollar.ru) that uses reinforcement learning to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial differentiating function is its reinforcement learning (RL) action, which was utilized to refine the design's reactions beyond the basic pre-training and tweak process. By [integrating](https://gitlab.oc3.ru) RL, DeepSeek-R1 can adapt more effectively to user feedback and goals, ultimately boosting both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, implying it's geared up to break down intricate queries and reason through them in a detailed manner. This guided thinking process allows the design to produce more accurate, transparent, and detailed responses. This model combines RL-based [fine-tuning](https://kaymack.careers) with CoT capabilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has caught the market's attention as a versatile text-generation design that can be [incorporated](https://projobs.dk) into different workflows such as representatives, logical thinking and data analysis jobs.<br>
<br>DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion specifications, making it possible for effective reasoning by routing queries to the most appropriate expert "clusters." This method enables the model to concentrate on various problem domains while maintaining overall performance. DeepSeek-R1 requires 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 release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the reasoning capabilities of the main R1 model to more efficient architectures based upon 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 effective models to simulate the behavior and thinking patterns of the larger DeepSeek-R1 design, using it as an instructor model.<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 location. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent hazardous material, and [evaluate models](https://www.assistantcareer.com) against key security requirements. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce several guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls across your generative [AI](http://120.79.218.168:3000) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 design, you require 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 verify you're using ml.p5e.48 xlarge for [endpoint usage](http://t93717yl.bget.ru). Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are [releasing](https://akinsemployment.ca). To ask for a limitation increase, create a limit boost demand and reach out to your account team.<br>
<br>Because you will be deploying 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 instructions, see Establish approvals to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid harmful material, and assess designs against key safety [criteria](https://gl.b3ta.pl). You can carry out security measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and model reactions 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 [circulation involves](https://git.revoltsoft.ru) 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](https://gitlab.iue.fh-kiel.de) 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 as the result. However, if either the input or output is intervened by the guardrail, a message is returned showing the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following sections show 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 foundation models (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, [larsaluarna.se](http://www.larsaluarna.se/index.php/User:AlineCox0079049) select 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 design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and pick the DeepSeek-R1 design.<br>
<br>The model detail page supplies essential details about the design's capabilities, rates structure, and application guidelines. You can find [detailed usage](http://66.85.76.1223000) directions, including sample API calls and code bits for integration. The model supports various text generation jobs, including content development, code generation, and concern answering, using its reinforcement finding out optimization and CoT reasoning capabilities.
The page also includes implementation options and licensing details to assist you begin with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to set up the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of instances, get in a number of instances (in between 1-100).
6. For example type, choose your instance type. For optimal performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can set up advanced security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service role permissions, and encryption settings. For the majority of use cases, the default settings will work well. However, for production releases, you might wish to evaluate these settings to align with your company's security and compliance requirements.
7. Choose Deploy to start utilizing the design.<br>
<br>When the deployment is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in play ground to access an interactive user interface where you can experiment with different triggers and adjust design criteria like temperature and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimum outcomes. For example, material for reasoning.<br>
<br>This is an excellent method to explore the design's thinking and text [generation capabilities](https://gitlab.dndg.it) before [integrating](http://www.radioavang.org) it into your applications. The play ground provides instant feedback, assisting you comprehend how the [design reacts](https://puming.net) to numerous inputs and letting you tweak your triggers for ideal results.<br>
<br>You can quickly test the design in the play ground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run utilizing guardrails with the [deployed](https://projectblueberryserver.com) DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning using a deployed DeepSeek-R1 model through Amazon Bedrock [utilizing](http://8.130.52.45) the invoke_model and ApplyGuardrail API. You can create a guardrail [utilizing](https://git.revoltsoft.ru) 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, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference parameters, and sends out a demand to generate text based on a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an [artificial intelligence](https://abilliontestimoniesandmore.org) (ML) hub with FMs, built-in algorithms, and prebuilt ML [solutions](https://gitlab.grupolambda.info.bo) that you can [release](http://1.117.194.11510080) with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and deploy them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart offers two practical methods: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you choose 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 using SageMaker JumpStart:<br>
<br>1. On the SageMaker console, select Studio in the navigation pane.
2. First-time users will be [prompted](http://27.154.233.18610080) to [develop](http://app.vellorepropertybazaar.in) a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The design browser displays available designs, with details like the supplier name and model capabilities.<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each design card shows crucial details, consisting of:<br>
<br>[- Model](https://thedatingpage.com) name
- Provider name
- Task category (for example, Text Generation).
Bedrock Ready badge (if suitable), showing that this model can be signed up with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the model card to view the [model details](http://hualiyun.cc3568) page.<br>
<br>The design details page consists of the following details:<br>
<br>- The model name and service provider details.
Deploy button to release 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 specifications.
- Usage standards<br>
<br>Before you deploy the design, it's advised to examine the design details and license terms to confirm compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with implementation.<br>
<br>7. For Endpoint name, utilize the immediately created name or [produce](http://jenkins.stormindgames.com) a custom one.
8. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the number of instances (default: 1).
Selecting suitable [instance](https://phoebe.roshka.com) types and counts is crucial for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time inference is picked by default. This is enhanced for sustained traffic and low latency.
10. Review all setups for accuracy. For this model, we strongly 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 implementation process can take several minutes to finish.<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 track of the deployment progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the [implementation](https://thedatingpage.com) is complete, you can conjure up 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 begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the necessary AWS consents 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 design is supplied in the Github here. You can clone the note pad and run from SageMaker Studio.<br>
<br>You can run extra 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 execute it as displayed in the following code:<br>
<br>Clean up<br>
<br>To prevent undesirable charges, complete the actions in this section to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you [released](http://66.85.76.1223000) the design utilizing Amazon Bedrock Marketplace, [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:KarissaGleason) complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, select Marketplace deployments.
2. In the Managed deployments section, find the endpoint you want to erase.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're [erasing](https://scfr-ksa.com) the proper implementation: 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 costs if you leave it [running](http://120.79.94.1223000). Use the following code to erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and [yewiki.org](https://www.yewiki.org/User:WinifredHassell) Resources.<br>
<br>Conclusion<br>
<br>In this post, we checked out how you can access and deploy the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, [Amazon SageMaker](http://hmzzxc.com3000) JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going 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.limework.net) companies construct innovative services using AWS services and sped up compute. Currently, he is focused on developing techniques for fine-tuning and optimizing the reasoning efficiency of big language models. In his leisure time, Vivek enjoys hiking, seeing films, and attempting different foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://merimnagloballimited.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://ifairy.world) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect working on [generative](https://gitea.urkob.com) [AI](http://bolsatrabajo.cusur.udg.mx) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://mychampionssport.jubelio.store) center. She is enthusiastic about developing options that help customers accelerate their [AI](https://2ubii.com) journey and unlock organization worth.<br>