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

Jason Fegan 2025-02-15 10:52:23 +08:00
commit 19f31f2fd8

@ -0,0 +1,93 @@
<br>Today, we are delighted 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 deploy DeepSeek [AI](http://aiot7.com:3000)'s first-generation frontier model, DeepSeek-R1, together with the distilled versions ranging from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative [AI](http://162.55.45.54:3000) ideas on AWS.<br>
<br>In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and [SageMaker JumpStart](http://hoenking.cn3000). You can follow similar actions to release the distilled versions of the [designs](http://git.bkdo.net) too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) established by DeepSeek [AI](https://git.logicloop.io) that utilizes support [discovering](http://182.92.196.181) to improve thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key identifying function is its reinforcement knowing (RL) action, which was utilized to improve the model's reactions beyond the standard pre-training and tweak procedure. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and objectives, eventually improving both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, suggesting it's equipped to break down intricate questions and reason through them in a detailed way. This assisted reasoning process permits the model to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to produce structured reactions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has [recorded](https://notewave.online) the industry's attention as a flexible text-generation model that can be integrated into numerous workflows such as representatives, sensible thinking and information interpretation tasks.<br>
<br>DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion parameters, allowing effective inference by routing queries to the most pertinent professional "clusters." This [technique](http://hmkjgit.huamar.com) allows the design to concentrate on various problem domains while maintaining overall performance. DeepSeek-R1 requires 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 features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 design 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 sized, more efficient designs to simulate the habits and reasoning patterns of the larger DeepSeek-R1 design, using it as a teacher model.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we [recommend releasing](http://gungang.kr) this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful material, and assess designs against essential safety requirements. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce multiple guardrails tailored to different usage cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls across your generative [AI](https://git.mtapi.io) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you need access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas [console](https://dev-members.writeappreviews.com) and under AWS Services, pick Amazon SageMaker, and [confirm](https://timviecvtnjob.com) you're utilizing 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 releasing. To ask for a limitation increase, produce a limitation increase request and connect to your account group.<br>
<br>Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To Management (IAM) approvals to utilize Amazon Bedrock Guardrails. For guidelines, see Set up consents to utilize guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to present safeguards, [wiki.dulovic.tech](https://wiki.dulovic.tech/index.php/User:Juliet04U595) avoid damaging material, and evaluate designs against key security requirements. You can carry out safety measures for the DeepSeek-R1 model using the Amazon Bedrock [ApplyGuardrail](https://hot-chip.com) API. This enables you to use guardrails to assess user inputs and model 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 create the guardrail, see the GitHub repo.<br>
<br>The basic flow involves the following actions: [larsaluarna.se](http://www.larsaluarna.se/index.php/User:HelenTennyson48) 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 inference. After receiving the model's output, another guardrail check is applied. If the output passes this final check, it's [returned](https://www.refermee.com) 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 occurred at the input or output phase. The examples showcased in the following areas show inference 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 designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following steps:<br>
<br>1. On the Amazon Bedrock console, choose Model brochure under Foundation designs in the navigation pane.
At the time of writing this post, you can utilize the InvokeModel API to conjure up the model. It doesn't support Converse APIs and other Amazon Bedrock [tooling](https://asicwiki.org).
2. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.<br>
<br>The design detail page provides necessary details about the model's abilities, rates structure, and [execution guidelines](https://git.serenetia.com). You can find detailed usage guidelines, including sample API calls and code bits for [combination](https://www.airemploy.co.uk). The model supports different text generation tasks, consisting of material production, code generation, and concern answering, utilizing its support learning optimization and CoT thinking capabilities.
The page likewise includes [deployment choices](https://seenoor.com) and licensing details to help you start with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, select Deploy.<br>
<br>You will be prompted to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Variety of instances, enter a number of instances (between 1-100).
6. For Instance type, select your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up innovative security and [facilities](https://git.fracturedcode.net) settings, consisting of virtual private cloud (VPC) networking, [service function](http://tmdwn.net3000) authorizations, and file encryption settings. For many utilize cases, the [default settings](https://git.profect.de) will work well. However, for production implementations, you may wish to evaluate these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to begin using the design.<br>
<br>When the implementation is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play ground.
8. Choose Open in playground to access an interactive interface where you can try out different prompts and adjust model criteria like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal results. For example, content for inference.<br>
<br>This is an excellent way to explore the design's reasoning and text generation abilities before integrating it into your applications. The play ground supplies instant feedback, assisting you understand how the design reacts to numerous inputs and letting you fine-tune your prompts for optimal outcomes.<br>
<br>You can rapidly check the design in the play area through the UI. However, to conjure up the released design [programmatically](https://optimaplacement.com) with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning utilizing a released DeepSeek-R1 model through [Amazon Bedrock](https://armconnection.com) using the invoke_model and ApplyGuardrail API. You can develop 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 actually developed the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime client, configures reasoning criteria, and sends out a demand 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 release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and release them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 practical methods: utilizing the [instinctive SageMaker](https://www.4bride.org) JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both approaches to assist you select the approach that finest fits your requirements.<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](https://login.discomfort.kz) console, select Studio in the navigation pane.
2. First-time users will be triggered to create a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The model browser displays available models, with details like the service provider name and model abilities.<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each model card reveals crucial details, including:<br>
<br>- Model name
[- Provider](https://whotube.great-site.net) name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if suitable), showing that this model can be signed up with Amazon Bedrock, [permitting](https://thisglobe.com) you to use Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the model card to see the model details page.<br>
<br>The design details page consists of the following details:<br>
<br>- The design name and supplier details.
Deploy button to release the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes important details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage guidelines<br>
<br>Before you release the model, it's suggested to review the design details and license terms to confirm compatibility with your use case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, use the automatically produced name or [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11909475) produce a custom one.
8. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the number of instances (default: 1).
Selecting proper circumstances types and counts is vital for cost and efficiency optimization. Monitor your release to adjust 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 strongly recommend sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
11. Choose Deploy to release the model.<br>
<br>The release procedure can take a number of minutes to complete.<br>
<br>When deployment is total, your endpoint status will change to InService. At this point, the model is prepared to [accept reasoning](https://speeddating.co.il) demands through the [endpoint](https://repo.komhumana.org). You can keep an eye on the release development on the [SageMaker console](https://git.jerl.dev) [Endpoints](https://www.jobindustrie.ma) page, which will show relevant metrics and status details. When the release is complete, you can invoke the [design utilizing](https://music.michaelmknight.com) a SageMaker runtime customer and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 the SageMaker Python SDK<br>
<br>To get going 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 deploy and utilize DeepSeek-R1 for reasoning programmatically. The code for releasing the model is provided in the Github here. You can clone the notebook and run from SageMaker Studio.<br>
<br>You can run additional 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](https://africasfaces.com) JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and execute it as displayed in the following code:<br>
<br>Tidy up<br>
<br>To prevent unwanted charges, finish the actions in this section to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you deployed the model utilizing Amazon Bedrock Marketplace, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
2. In the Managed implementations area, find the endpoint you desire to delete.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're erasing the right implementation: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the [SageMaker JumpStart](http://profilsjob.com) predictor<br>
<br>The SageMaker JumpStart model you released will sustain costs 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.<br>
<br>Conclusion<br>
<br>In this post, we checked out 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, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting begun with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging [generative](https://fishtanklive.wiki) [AI](https://betalk.in.th) companies develop ingenious solutions using AWS services and sped up compute. Currently, he is [concentrated](https://mediawiki.hcah.in) on developing methods for fine-tuning and enhancing the inference efficiency of large language models. In his spare time, Vivek enjoys hiking, watching films, and [forum.pinoo.com.tr](http://forum.pinoo.com.tr/profile.php?id=1324171) attempting various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://jobs.fabumama.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](https://peekz.eu) 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://103.242.56.35:10080) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic partnerships for [hb9lc.org](https://www.hb9lc.org/wiki/index.php/User:TracieCoats00) Amazon SageMaker JumpStart, SageMaker's artificial intelligence and [larsaluarna.se](http://www.larsaluarna.se/index.php/User:BerylTazewell8) generative [AI](http://missima.co.kr) hub. She is passionate about constructing services that assist consumers accelerate their [AI](http://git.the-archive.xyz) journey and unlock company worth.<br>