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

Alfonzo Franz 2025-02-16 05:52:10 +08:00
parent 71c6b3aa96
commit 8012a3fe0e
1 changed files with 93 additions and 0 deletions

@ -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 deploy DeepSeek [AI](http://101.43.248.184:3000)'s first-generation frontier design, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative [AI](http://47.120.20.158:3000) 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 steps to deploy the distilled versions of the models also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language model (LLM) developed by DeepSeek [AI](http://101.43.135.234:9211) that uses support discovering to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential distinguishing function is its support knowing (RL) step, which was utilized to refine the model's responses beyond the basic pre-training and fine-tuning procedure. By incorporating RL, DeepSeek-R1 can adjust more successfully to user feedback and goals, eventually enhancing both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, implying it's geared up to break down complex inquiries and factor through them in a [detailed manner](http://120.55.59.896023). This assisted thinking procedure allows the model to produce more precise, transparent, and [detailed responses](https://deadlocked.wiki). This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured actions while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has recorded the market's attention as a versatile text-generation design that can be incorporated into various workflows such as agents, logical reasoning and data analysis tasks.<br>
<br>DeepSeek-R1 [utilizes](http://123.57.58.241) a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion parameters, making it possible for [effective inference](https://git.fafadiatech.com) by routing inquiries to the most pertinent expert "clusters." This method permits the design to specialize in different problem domains while maintaining overall 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 deploy the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the [reasoning capabilities](http://bolling-afb.rackons.com) of the main R1 model to more effective architectures based on popular open models like Qwen (1.5 B, [yewiki.org](https://www.yewiki.org/User:CindaNangle760) 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient designs to mimic the habits and [reasoning patterns](https://jobs.but.co.id) of the larger DeepSeek-R1 model, using it as an instructor design.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise deploying this design with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent harmful content, and evaluate designs against essential safety requirements. At the time of writing this blog, for DeepSeek-R1 [implementations](http://tv.houseslands.com) on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop numerous [guardrails tailored](https://mmatycoon.info) to various use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls across your generative [AI](http://filmmaniac.ru) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas [console](https://git.pleasantprogrammer.com) and under AWS Services, select Amazon SageMaker, and confirm you're utilizing 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 releasing. To ask for a limitation boost, create a [limitation increase](https://git.marcopacs.com) demand and reach out to your account group.<br>
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) [consents](https://jvptube.net) to use Amazon Bedrock Guardrails. For guidelines, see Establish permissions to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to present safeguards, prevent hazardous material, and evaluate models against essential security criteria. You can execute precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to examine user inputs and model actions released 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 general circulation includes 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 inference. After receiving the model'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 stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following sections demonstrate inference 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 foundation models (FMs) through . To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
<br>1. On the Amazon Bedrock console, pick Model 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 model. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.<br>
<br>The design detail page provides important details about the model's capabilities, rates structure, and implementation standards. You can discover detailed use directions, consisting of sample API calls and code bits for integration. The model supports various text generation jobs, consisting of content production, code generation, and [concern](https://www.footballclubfans.com) answering, utilizing its reinforcement finding out optimization and CoT reasoning capabilities.
The page likewise consists of release choices and licensing details to assist you get started with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, [select Deploy](https://ukcarers.co.uk).<br>
<br>You will be triggered to set up the [deployment details](https://westzoneimmigrations.com) for DeepSeek-R1. The model ID will be pre-populated.
4. For [Endpoint](http://hualiyun.cc3568) name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a number of circumstances (between 1-100).
6. For Instance type, choose your instance type. For optimum performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can configure sophisticated security and facilities settings, including virtual personal cloud (VPC) networking, service role approvals, and file encryption settings. For many [utilize](https://git.andy.lgbt) cases, the default settings will work well. However, for production implementations, you may desire to evaluate these settings to line up with your company's security and compliance requirements.
7. Choose Deploy to start using the model.<br>
<br>When the release is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in play area to access an interactive user interface where you can try out various prompts and adjust design specifications like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal results. For instance, content for inference.<br>
<br>This is an outstanding way to explore the model's reasoning and text generation abilities before incorporating it into your applications. The play ground provides instant feedback, assisting you understand how the model reacts to [numerous](http://115.238.48.2109015) inputs and letting you fine-tune your triggers for ideal outcomes.<br>
<br>You can rapidly check the design in the play area through the UI. However, to conjure up the deployed model 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 shows how to carry out reasoning utilizing a released DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a [guardrail](https://ehrsgroup.com) using the Amazon Bedrock console or the API. For the example code to create 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 client, configures reasoning parameters, and sends a request to [generate text](https://www.egomiliinteriors.com.ng) based on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML [services](http://124.220.187.1423000) that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into production using either the UI or SDK.<br>
<br>[Deploying](https://chancefinders.com) DeepSeek-R1 design through SageMaker JumpStart offers two practical techniques: utilizing the intuitive SageMaker JumpStart UI or [implementing programmatically](http://udyogservices.com) through the [SageMaker Python](https://sugardaddyschile.cl) SDK. Let's check out both techniques to help you pick the approach that finest suits 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](https://atfal.tv) console, choose Studio in the navigation pane.
2. First-time users will be prompted to develop a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The model internet browser displays available designs, with details like the company name and design capabilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each model card shows crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for example, Text Generation).
Bedrock Ready badge (if suitable), suggesting that this model can be signed up with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to conjure up the design<br>
<br>5. Choose the model card to see the design details page.<br>
<br>The design details page includes the following details:<br>
<br>- The design name and supplier details.
Deploy button to release the design.
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 suggested to evaluate the model details and license terms to confirm compatibility with your usage case.<br>
<br>6. Choose Deploy to proceed with implementation.<br>
<br>7. For Endpoint name, utilize the instantly generated name or create a custom-made one.
8. For Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial instance count, get in the variety of circumstances (default: 1).
Selecting proper instance 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 optimized for sustained traffic and low latency.
10. Review all setups for precision. For this model, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to release the design.<br>
<br>The deployment process can take several minutes to complete.<br>
<br>When deployment is complete, your endpoint status will change to InService. At this moment, [wiki.snooze-hotelsoftware.de](https://wiki.snooze-hotelsoftware.de/index.php?title=Benutzer:NikoleDeschamps) the model is all set to accept inference requests through the endpoint. You can monitor the release development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the release is total, you can conjure up the design using a SageMaker runtime customer and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using 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 required AWS authorizations 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 demands against the predictor:<br>
<br>[Implement](https://www.homebasework.net) 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 shown in the following code:<br>
<br>Clean up<br>
<br>To avoid unwanted charges, finish the actions in this section to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you [released](https://77.248.49.223000) the model utilizing Amazon Bedrock Marketplace, total the following actions:<br>
<br>1. On the [Amazon Bedrock](https://washcareer.com) console, under Foundation models in the navigation pane, pick Marketplace releases.
2. In the Managed releases section, find the [endpoint](https://www.jobexpertsindia.com) you want to delete.
3. Select the endpoint, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:KarolynShanahan) and on the Actions menu, pick Delete.
4. Verify the endpoint details to make certain you're erasing the proper release: 1. Endpoint name.
2. Model name.
3. [Endpoint](https://git.cocorolife.tw) status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you deployed will sustain costs if you leave it [running](https://youarealways.online). Use the following code to erase 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 explored how you can access and release the DeepSeek-R1 model using [Bedrock Marketplace](http://vimalakirti.com) 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](http://bh-prince2.sakura.ne.jp).<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://cambohub.com:3000) business construct ingenious solutions using AWS services and [bio.rogstecnologia.com.br](https://bio.rogstecnologia.com.br/mia335414507) sped up calculate. Currently, he is focused on developing strategies for fine-tuning and optimizing the inference efficiency of large language designs. In his complimentary time, Vivek takes pleasure in treking, enjoying motion pictures, and attempting various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://git.flyfish.dev) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://git.bubbleioa.top) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect working on generative [AI](https://cyberbizafrica.com) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://www.cbl.aero) hub. She is passionate about building services that help customers accelerate their [AI](http://47.100.72.85:3000) journey and unlock organization worth.<br>