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

master
Janice Roesch 4 months ago
commit cf35a6560f
  1. 93
      DeepSeek-R1-Model-now-Available-in-Amazon-Bedrock-Marketplace-And-Amazon-SageMaker-JumpStart.md

@ -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://yourmoove.in)'s first-generation frontier model, DeepSeek-R1, in addition to the [distilled versions](https://local.wuanwanghao.top3000) ranging from 1.5 to 70 billion specifications to develop, experiment, and properly scale your generative [AI](https://www.ndule.site) concepts on AWS.<br>
<br>In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to deploy the distilled variations of the models also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) established by DeepSeek [AI](https://tradingram.in) that uses support finding out to boost thinking abilities through a multi-stage training [process](http://218.17.2.1033000) from a DeepSeek-V3-Base structure. An essential identifying feature is its support learning (RL) action, which was used to refine the model's actions beyond the standard pre-training and tweak process. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually boosting both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, implying it's equipped to break down intricate inquiries and factor through them in a detailed way. This guided reasoning process permits the model to [produce](https://git.jzcscw.cn) more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually captured the market's attention as a versatile [text-generation model](https://learn.ivlc.com) that can be incorporated into various workflows such as representatives, rational thinking and information analysis tasks.<br>
<br>DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion specifications, enabling efficient reasoning by routing inquiries to the most "clusters." This method allows the model to concentrate on different issue domains while maintaining overall efficiency. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 [xlarge instance](https://gl.cooperatic.fr) to release the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 model to more efficient architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller, more effective designs to [imitate](https://www.naukrinfo.pk) the habits and thinking patterns of the bigger DeepSeek-R1 design, using it as a teacher design.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, [pipewiki.org](https://pipewiki.org/wiki/index.php/User:Marcy4075626057) we advise releasing this design with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to [introduce](https://kcshk.com) safeguards, prevent harmful content, and evaluate designs against key safety criteria. At the time of writing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create numerous guardrails tailored to various use cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls across your generative [AI](https://www.zapztv.com) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose 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 releasing. To request a limitation increase, develop a [limit increase](http://154.40.47.1873000) demand and connect to your account team.<br>
<br>Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) approvals to use Amazon Bedrock Guardrails. For directions, see Set up approvals to utilize guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to present safeguards, prevent damaging content, and evaluate models against essential security criteria. You can carry out precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and model responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can [produce](https://gitea.qi0527.com) 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 circulation involves the following steps: 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 model for inference. After getting the model's output, another guardrail check is [applied](https://git.thunraz.se). If the [output passes](http://52.23.128.623000) this final check, it's returned as the outcome. 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 stage. The examples showcased in the following areas demonstrate inference using this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon [Bedrock Marketplace](http://101.42.41.2543000) gives 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, select Model catalog under Foundation models in the navigation pane.
At the time of writing 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 [company](https://gitea.ashcloud.com) and select the DeepSeek-R1 model.<br>
<br>The design detail page supplies vital details about the design's capabilities, prices structure, and [execution standards](http://162.19.95.943000). You can find detailed use directions, including sample API calls and code bits for combination. The design supports different text generation jobs, including content creation, code generation, and concern answering, [utilizing](http://cgi3.bekkoame.ne.jp) its [reinforcement learning](https://btslinkita.com) optimization and CoT thinking capabilities.
The page also consists of release options and licensing [details](https://www.goodbodyschool.co.kr) to assist you start with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, choose Deploy.<br>
<br>You will be triggered to set up the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (in between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a number of instances (in between 1-100).
6. For example type, choose your [instance type](http://git.bkdo.net). For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can set up innovative security and infrastructure settings, consisting of [virtual personal](https://www.ausfocus.net) cloud (VPC) networking, service function authorizations, and file encryption settings. For a lot of use cases, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:MiquelAer064) the default settings will work well. However, for production releases, you may want to examine these settings to align with your [organization's security](http://git.edazone.cn) and [compliance requirements](https://hireblitz.com).
7. Choose Deploy to start using the design.<br>
<br>When the deployment is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in playground to access an interactive user interface where you can try out various triggers and adjust model parameters like temperature and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum outcomes. For instance, content for inference.<br>
<br>This is an excellent method to explore the design's thinking and text generation abilities before integrating it into your applications. The play area supplies immediate feedback, assisting you understand how the model reacts to different inputs and letting you tweak your triggers for ideal results.<br>
<br>You can quickly test the design in the playground 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 using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to carry out reasoning using a released DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can create a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have actually created the guardrail, utilize the following code to carry out [guardrails](https://peekz.eu). The script initializes the bedrock_runtime client, configures inference parameters, and sends a request to generate text based upon a user prompt.<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 services that you can [release](https://codes.tools.asitavsen.com) with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and release them into [production](https://meet.globalworshipcenter.com) using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart uses two hassle-free methods: utilizing the user-friendly SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you select the method that best suits your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions 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 to develop a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The model internet browser displays available models, with details like the service provider name and design capabilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card reveals key details, consisting of:<br>
<br>[- Model](http://120.77.209.1763000) name
- Provider name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if relevant), indicating that this design can be [registered](http://47.110.52.1323000) with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to conjure up the design<br>
<br>5. Choose the design card to see the model details page.<br>
<br>The [design details](https://villahandle.com) page consists of the following details:<br>
<br>- The design name and supplier details.
[Deploy button](https://git.lolilove.rs) to deploy the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of essential details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you release the model, it's advised to review the design details and license terms to [validate compatibility](http://zerovalueentertainment.com3000) with your usage case.<br>
<br>6. Choose Deploy to proceed with implementation.<br>
<br>7. For Endpoint name, utilize the instantly created name or develop a custom-made one.
8. For [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=12035368) Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the number of instances (default: 1).
Selecting proper circumstances types and counts is [essential](http://git.lovestrong.top) for cost and performance optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is selected by default. This is optimized for sustained traffic and low latency.
10. Review all setups for accuracy. For this model, we strongly suggest 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 release procedure can take several minutes to finish.<br>
<br>When deployment is total, your endpoint status will change to InService. At this moment, the design is all set to accept reasoning demands through the endpoint. You can keep track of the deployment development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is total, you can conjure up the model using a SageMaker runtime customer and incorporate it with your [applications](https://topbazz.com).<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To get started with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the required 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 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 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 unwanted](http://vk-mix.ru) charges, complete the steps in this section to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you deployed the design using Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace deployments.
2. In the Managed releases section, locate the endpoint you want to delete.
3. Select the endpoint, and on the Actions menu, [pick Delete](https://easterntalent.eu).
4. Verify the endpoint details to make certain you're [deleting](http://101.43.112.1073000) the appropriate implementation: 1. [Endpoint](http://209.141.61.263000) name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design 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 release 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, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker 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](http://170.187.182.121:3000) business construct innovative services utilizing AWS services and accelerated calculate. Currently, he is [concentrated](https://www.codple.com) on establishing methods for fine-tuning and enhancing the inference performance of big language models. In his downtime, Vivek takes pleasure in treking, watching movies, and attempting different cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://175.24.174.173:3000) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area of focus is AWS [AI](http://211.91.63.144:8088) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect dealing with generative [AI](https://www.k4be.eu) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://gitea.eggtech.net) hub. She is passionate about building options that help [clients](http://222.85.191.975000) [accelerate](https://gogocambo.com) their [AI](https://gitea.qi0527.com) journey and [unlock service](http://8.140.200.2363000) worth.<br>
Loading…
Cancel
Save