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

Judson Crittenden 2025-02-22 16:25:59 +08:00
commit 1e43d9c438
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 release DeepSeek [AI](https://gitea.baxir.fr)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations varying from 1.5 to 70 billion criteria to construct, experiment, and properly scale your [generative](https://nemoserver.iict.bas.bg) [AI](https://remote-life.de) ideas on AWS.<br>
<br>In this post, we show how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled versions of the designs as well.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) developed by DeepSeek [AI](https://app.theremoteinternship.com) that utilizes support discovering to improve reasoning abilities through a multi-stage training process from a DeepSeek-V3[-Base foundation](https://jp.harmonymart.in). A key identifying feature is its support knowing (RL) action, which was used to fine-tune the model's actions beyond the basic pre-training and [fine-tuning process](https://jobz0.com). By incorporating RL, DeepSeek-R1 can adjust more successfully to user feedback and goals, ultimately boosting both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, meaning it's geared up to break down complicated inquiries and factor through them in a detailed manner. This guided reasoning process allows the design to produce more accurate, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually caught the market's attention as a flexible text-generation model that can be integrated into different workflows such as agents, logical reasoning and data interpretation jobs.<br>
<br>DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient inference by routing inquiries to the most appropriate specialist "clusters." This method permits the design to focus on various problem domains while maintaining general effectiveness. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 [xlarge circumstances](https://git.junzimu.com) to deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 design to more effective architectures based upon [popular](http://linyijiu.cn3000) 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 effective models to imitate the behavior and thinking 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 advise releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful material, and evaluate designs against crucial safety criteria. At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop numerous guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout your generative [AI](https://crossroad-bj.com) 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, [forum.pinoo.com.tr](http://forum.pinoo.com.tr/profile.php?id=1324171) open the [Service Quotas](http://www.stes.tyc.edu.tw) console and under AWS Services, select Amazon SageMaker, and validate you're utilizing ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To ask for a limit boost, create a limit increase request 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 proper AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For directions, see Establish approvals to utilize guardrails for material filtering.<br>
<br>Implementing guardrails with the [ApplyGuardrail](http://101.34.211.1723000) API<br>
<br>Amazon Bedrock Guardrails allows you to introduce safeguards, avoid harmful content, and assess models against [key security](https://signedsociety.com) criteria. You can execute precaution for the DeepSeek-R1 design utilizing the Amazon [Bedrock ApplyGuardrail](https://dramatubes.com) API. This enables you to use guardrails to examine user inputs and design responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.<br>
<br>The basic flow includes the following actions: First, the system receives an input for the model. 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 getting the model's output, another guardrail check is used. If the output passes this last check, it's returned as the final outcome. However, if either the input or output is stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it happened 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 actions:<br>
<br>1. On the Amazon Bedrock console, choose Model catalog under Foundation models in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.<br>
<br>The design detail page provides vital details about the design's abilities, prices structure, and implementation standards. You can find detailed usage guidelines, including sample API calls and code bits for integration. The design supports different [text generation](http://106.55.61.1283000) tasks, including content creation, code generation, and question answering, utilizing its [reinforcement finding](https://sharefriends.co.kr) out optimization and CoT reasoning abilities.
The page also includes release choices and licensing details to assist you start with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to set up the [deployment details](https://git.epochteca.com) for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Number of instances, enter a variety of instances (in between 1-100).
6. For Instance type, choose your instance type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up innovative security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service role approvals, and [encryption settings](https://job4thai.com). For most utilize cases, the default settings will work well. However, for production implementations, you may desire to evaluate these settings to align with your company's security and compliance requirements.
7. Choose Deploy to begin 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 playground to access an interactive interface where you can try out various triggers and adjust design specifications like temperature and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For instance, content for reasoning.<br>
<br>This is an outstanding method to check out the design's thinking and text generation abilities before incorporating it into your applications. The [playground supplies](https://social.nextismyapp.com) immediate feedback, assisting you comprehend how the design responds to numerous inputs and letting you fine-tune your prompts for optimal results.<br>
<br>You can quickly check the design in the playground through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to carry out inference using a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have produced the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends a request to produce text 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 solutions that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your data, and release them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical techniques: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both methods to help you choose the method that best suits your [requirements](http://git.storkhealthcare.cn).<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, choose Studio 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 displays available models, with details like the provider name and design capabilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each design card shows crucial details, consisting of:<br>
<br>- Model name
[- Provider](https://pattondemos.com) name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if suitable), indicating that this model can be signed up with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to [conjure](https://dev-members.writeappreviews.com) up the model<br>
<br>5. Choose the design card to see the model details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The design name and provider details.
Deploy button to deploy the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes important details, such as:<br>
<br>- Model [description](https://git.zzxxxc.com).
- License details.
- Technical [specifications](https://git.chocolatinie.fr).
- Usage guidelines<br>
<br>Before you deploy the model, it's recommended to review the [model details](http://dev.nextreal.cn) and license terms to verify compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with deployment.<br>
<br>7. For [Endpoint](https://it-storm.ru3000) name, utilize the immediately created name or create a custom one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, go into the number of circumstances (default: 1).
Selecting appropriate [circumstances types](https://www.joboont.in) and counts is vital for expense and efficiency optimization. Monitor your release to change these settings as needed.Under Inference type, is chosen by [default](https://www.jobmarket.ae). This is optimized for sustained traffic and low latency.
10. Review all setups for accuracy. For this model, we strongly suggest sticking 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 numerous 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](https://jobsnotifications.com) demands through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will [display relevant](http://8.137.8.813000) metrics and status details. When the deployment is complete, you can conjure up the model utilizing a SageMaker runtime client and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To begin with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the required AWS consents and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for inference programmatically. The code for [deploying](https://www.jobmarket.ae) 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 reasoning with your [SageMaker JumpStart](https://www.so-open.com) predictor<br>
<br>Similar to Amazon Bedrock, you can also use 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>Tidy up<br>
<br>To avoid undesirable charges, complete the actions in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you released the model utilizing Amazon Bedrock Marketplace, total the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace deployments.
2. In the Managed releases section, find the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're erasing the proper deployment: 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.<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](https://integramais.com.br) in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, [SageMaker JumpStart](https://candays.com) pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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://106.55.61.128:3000) business construct ingenious services utilizing AWS services and sped up compute. Currently, he is concentrated on developing techniques for fine-tuning and optimizing the inference efficiency of large language designs. In his leisure time, Vivek takes pleasure in treking, watching motion pictures, and attempting different cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://boiler.ttoslinux.org:8888) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://eet3122salainf.sytes.net) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect working on generative [AI](http://20.198.113.167:3000) with the [Third-Party Model](https://skillfilltalent.com) Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](http://www.heart-hotel.com) center. She is passionate about developing services that help consumers accelerate their [AI](https://www.olsitec.de) journey and unlock organization value.<br>