Add DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
commit
cde709f7be
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](http://tmdwn.net3000) JumpStart. With this launch, you can now release DeepSeek [AI](https://kolei.ru)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion parameters to construct, experiment, and responsibly scale your generative [AI](https://ivebo.co.uk) ideas on AWS.<br>
|
||||||
|
<br>In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled variations of the designs also.<br>
|
||||||
|
<br>Overview of DeepSeek-R1<br>
|
||||||
|
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](https://opedge.com) that uses support discovering to enhance reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential differentiating feature is its reinforcement knowing (RL) action, which was utilized to improve the model's actions beyond the standard pre-training and [tweak process](https://www.sintramovextrema.com.br). By incorporating RL, DeepSeek-R1 can adapt more successfully to user feedback and objectives, ultimately improving both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, suggesting it's geared up to break down complicated queries and reason through them in a detailed manner. This guided reasoning process permits the model to produce more accurate, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT abilities, aiming to create structured reactions while concentrating on [interpretability](https://uniondaocoop.com) and user interaction. With its comprehensive capabilities DeepSeek-R1 has captured the market's attention as a flexible text-generation design that can be incorporated into [numerous workflows](https://talentup.asia) such as agents, logical reasoning and information interpretation 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 parameters, making it possible for effective reasoning by routing questions to the most appropriate [professional](https://www.majalat2030.com) "clusters." This technique allows the model to concentrate on various issue domains while maintaining overall effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 [xlarge circumstances](https://wiki.aipt.group) 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 designs bring the reasoning abilities of the main R1 model to more efficient architectures based upon [popular](https://www.milegajob.com) open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more effective designs to simulate the behavior and reasoning patterns of the bigger DeepSeek-R1 model, using it as a teacher design.<br>
|
||||||
|
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise deploying this model with guardrails in location. In this blog, we will utilize Amazon [Bedrock Guardrails](http://47.97.6.98081) to present safeguards, prevent damaging material, and evaluate models against essential security requirements. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and [Bedrock](https://mediawiki1263.00web.net) Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop multiple guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls across your generative [AI](http://47.113.125.203:3000) applications.<br>
|
||||||
|
<br>Prerequisites<br>
|
||||||
|
<br>To deploy the DeepSeek-R1 design, you need access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're using 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 deploying. To request a limit boost, develop a limitation boost request and connect to your account team.<br>
|
||||||
|
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For instructions, see Set up authorizations to utilize guardrails for content filtering.<br>
|
||||||
|
<br>Implementing guardrails with the ApplyGuardrail API<br>
|
||||||
|
<br>Amazon Bedrock Guardrails permits you to present safeguards, avoid damaging material, and evaluate designs against essential safety criteria. You can [execute precaution](https://git.szrcai.ru) for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to evaluate user inputs and design reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock [console](https://sound.descreated.com) or the API. For the example code to create 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 to the design for reasoning. After receiving the design's output, another guardrail check is applied. If the output passes this final check, it's returned as the [outcome](http://coastalplainplants.org). However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the intervention and whether it took place at the input or output stage. The examples showcased in the following sections demonstrate inference using this API.<br>
|
||||||
|
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
|
||||||
|
<br>Amazon Bedrock Marketplace offers you access to over 100 popular, emerging, and specialized foundation designs (FMs) through Amazon Bedrock. To [gain access](http://xn--ok0b850bc3bx9c.com) to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
|
||||||
|
<br>1. On the Amazon Bedrock console, pick Model catalog under Foundation models in the navigation pane.
|
||||||
|
At the time of composing this post, you can use the InvokeModel API to conjure up the design. It doesn't 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 design detail page offers essential details about the model's capabilities, prices structure, and implementation standards. You can discover detailed usage directions, consisting of sample API calls and code bits for integration. The design supports numerous text generation jobs, consisting of content production, code generation, and concern answering, using its support learning optimization and CoT reasoning abilities.
|
||||||
|
The page likewise consists of implementation choices and licensing details to assist you get going with DeepSeek-R1 in your applications.
|
||||||
|
3. To start using DeepSeek-R1, select Deploy.<br>
|
||||||
|
<br>You will be prompted to set up the deployment 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.lazyka.ru) characters).
|
||||||
|
5. For Number of circumstances, enter a variety of instances (in between 1-100).
|
||||||
|
6. For Instance type, pick your instance type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
|
||||||
|
Optionally, you can configure innovative security and facilities settings, including virtual private cloud (VPC) networking, service role consents, and file encryption settings. For many utilize cases, the default settings will work well. However, for production implementations, you might wish to examine 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 test DeepSeek-R1's capabilities straight in the Amazon Bedrock playground.
|
||||||
|
8. Choose Open in play area to access an interactive interface where you can explore various prompts and adjust model specifications like temperature and maximum length.
|
||||||
|
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum results. For instance, material for reasoning.<br>
|
||||||
|
<br>This is an excellent way to check out the model's thinking and text generation abilities before integrating it into your applications. The playground offers immediate feedback, helping you comprehend how the design reacts to numerous inputs and letting you tweak your prompts for optimum outcomes.<br>
|
||||||
|
<br>You can quickly check the model in the play area 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 reasoning utilizing guardrails with the released DeepSeek-R1 endpoint<br>
|
||||||
|
<br>The following code example shows how to carry out reasoning using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock [console](http://183.221.101.893000) or the API. For the example code to produce the guardrail, see the GitHub repo. After you have created the guardrail, [utilize](http://154.64.253.773000) the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures reasoning specifications, and sends out a request to create text based on a user timely.<br>
|
||||||
|
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
|
||||||
|
<br>[SageMaker JumpStart](https://szmfettq2idi.com) is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can release with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your data, and deploy them into production utilizing either the UI or SDK.<br>
|
||||||
|
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers two convenient approaches: using the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both techniques to assist you choose the method that finest fits your needs.<br>
|
||||||
|
<br>Deploy DeepSeek-R1 through [SageMaker JumpStart](https://www.assistantcareer.com) UI<br>
|
||||||
|
<br>Complete the following steps to release DeepSeek-R1 utilizing SageMaker JumpStart:<br>
|
||||||
|
<br>1. On the SageMaker console, choose Studio in the navigation pane.
|
||||||
|
2. First-time users will be prompted to produce a domain.
|
||||||
|
3. On the SageMaker Studio console, pick JumpStart in the navigation pane.<br>
|
||||||
|
<br>The design browser shows available designs, with details like the supplier name and [model abilities](https://gitea.ws.adacts.com).<br>
|
||||||
|
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card.
|
||||||
|
Each model card shows key details, consisting of:<br>
|
||||||
|
<br>- Model name
|
||||||
|
- Provider name
|
||||||
|
- Task category (for example, Text Generation).
|
||||||
|
[Bedrock Ready](http://81.70.24.14) badge (if relevant), indicating that this model can be registered with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to conjure up the model<br>
|
||||||
|
<br>5. Choose the [design card](https://git.brainycompanion.com) to view the design details page.<br>
|
||||||
|
<br>The design details page includes the following details:<br>
|
||||||
|
<br>- The design name and provider details.
|
||||||
|
Deploy button to release the model.
|
||||||
|
About and Notebooks tabs with detailed details<br>
|
||||||
|
<br>The About tab consists of crucial details, such as:<br>
|
||||||
|
<br>- Model description.
|
||||||
|
- License details.
|
||||||
|
- Technical requirements.
|
||||||
|
- Usage standards<br>
|
||||||
|
<br>Before you release the model, it's [suggested](https://gitlab.innive.com) to evaluate the design details and license terms to verify compatibility with your usage case.<br>
|
||||||
|
<br>6. Choose Deploy to continue with deployment.<br>
|
||||||
|
<br>7. For Endpoint name, use the instantly generated name or produce a customized one.
|
||||||
|
8. For Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
|
||||||
|
9. For [Initial circumstances](https://candays.com) count, [wiki.snooze-hotelsoftware.de](https://wiki.snooze-hotelsoftware.de/index.php?title=Benutzer:VickiPethard) get in the number of instances (default: 1).
|
||||||
|
Selecting appropriate instance types and counts is important for cost and performance optimization. Monitor your deployment to change 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 setups for precision. For this model, we strongly suggest adhering to SageMaker JumpStart [settings](https://natgeophoto.com) and making certain that network isolation remains in place.
|
||||||
|
11. Choose Deploy to release the design.<br>
|
||||||
|
<br>The release process can take numerous minutes to complete.<br>
|
||||||
|
<br>When release is total, your endpoint status will change to InService. At this moment, the model is all set to accept inference [demands](https://ransomware.design) through the endpoint. You can keep an eye on the deployment progress on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the implementation is total, you can conjure up the design using a SageMaker runtime customer and integrate it with your [applications](https://vieclamangiang.net).<br>
|
||||||
|
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
|
||||||
|
<br>To get begun with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the essential AWS authorizations 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 the design is provided in the Github here. You can clone the note pad and run from SageMaker Studio.<br>
|
||||||
|
<br>You can run additional demands 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](http://gsend.kr) the ApplyGuardrail API with your SageMaker JumpStart predictor. You can [produce](http://1.14.71.1033000) a guardrail utilizing the Amazon Bedrock console or the API, and execute it as shown in the following code:<br>
|
||||||
|
<br>Tidy 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 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, pick Marketplace implementations.
|
||||||
|
2. In the Managed deployments section, find the endpoint you want to delete.
|
||||||
|
3. Select the endpoint, and on the Actions menu, pick Delete.
|
||||||
|
4. Verify the endpoint details to make certain you're erasing the correct 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 delete 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 design using 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 designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, [wavedream.wiki](https://wavedream.wiki/index.php/User:QJEJesus8453118) Amazon Bedrock Marketplace, and Starting 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://omegat.dmu-medical.de) business construct ingenious options utilizing [AWS services](https://gulfjobwork.com) and sped up compute. Currently, he is focused on developing methods for fine-tuning and optimizing the inference performance of large language designs. In his free time, Vivek takes pleasure in hiking, enjoying motion pictures, and attempting various cuisines.<br>
|
||||||
|
<br>Niithiyn Vijeaswaran is a Generative [AI](http://supervipshop.net) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://asw.alma.cl) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
|
||||||
|
<br>Jonathan Evans is a Specialist Solutions Architect working on generative [AI](http://101.33.234.216:3000) with the Third-Party Model Science group at AWS.<br>
|
||||||
|
<br>Banu Nagasundaram leads item, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://oerdigamers.info) center. She is passionate about constructing options that help [consumers accelerate](https://www.virtuosorecruitment.com) their [AI](https://www.canaddatv.com) journey and unlock company value.<br>
|
Loading…
Reference in a new issue