|
|
@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
<br>Today, we are delighted to announce 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://120.79.218.168:3000)'s first-generation frontier model, DeepSeek-R1, together with the distilled variations ranging from 1.5 to 70 billion specifications to develop, experiment, and responsibly scale your generative [AI](https://body-positivity.org) ideas 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 release the distilled variations of the models too.<br>
|
|
|
|
|
|
|
|
<br>Overview of DeepSeek-R1<br>
|
|
|
|
|
|
|
|
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](http://gnu5.hisystem.com.ar) that uses support learning to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3[-Base structure](http://106.15.41.156). A key differentiating function is its reinforcement learning (RL) step, which was utilized to fine-tune the model's reactions beyond the basic pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately boosting both importance and clarity. In addition, DeepSeek-R1 employs 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 assisted reasoning procedure enables the model to produce more accurate, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to create structured responses while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has caught the market's attention as a versatile text-generation design that can be incorporated into different [workflows](https://git.tbaer.de) such as agents, sensible reasoning and data analysis jobs.<br>
|
|
|
|
|
|
|
|
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion parameters, allowing [effective inference](https://gitlab.ucc.asn.au) by routing [queries](https://raumlaborlaw.com) to the most appropriate professional "clusters." This technique enables the model to concentrate on different issue domains while maintaining general performance. DeepSeek-R1 needs 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 release the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.<br>
|
|
|
|
|
|
|
|
<br>DeepSeek-R1 distilled models bring the thinking abilities of the main R1 model to more efficient architectures based upon [popular](https://www.uaehire.com) open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient designs to imitate the habits and reasoning patterns of the bigger DeepSeek-R1 design, utilizing it as an instructor design.<br>
|
|
|
|
|
|
|
|
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend releasing this model with guardrails in location. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent harmful content, and [evaluate designs](http://123.57.58.241) against key safety requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create multiple guardrails tailored to various usage cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls across your generative [AI](http://jobshut.org) applications.<br>
|
|
|
|
|
|
|
|
<br>Prerequisites<br>
|
|
|
|
|
|
|
|
<br>To deploy the DeepSeek-R1 model, you need access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and validate you're using 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 limit boost, produce a limit boost request 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) [approvals](https://play.uchur.ru) to utilize Amazon Bedrock Guardrails. For instructions, see Establish approvals to utilize guardrails for content filtering.<br>
|
|
|
|
|
|
|
|
<br>Implementing guardrails with the ApplyGuardrail API<br>
|
|
|
|
|
|
|
|
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid harmful material, and evaluate designs against key safety requirements. You can implement precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to [apply guardrails](http://gitlab.signalbip.fr) to user inputs and design reactions deployed on Amazon Bedrock [Marketplace](https://islamichistory.tv) and SageMaker JumpStart. You can develop a guardrail utilizing the Amazon Bedrock [console](http://152.136.187.229) or the API. For the example code to produce the guardrail, see the GitHub repo.<br>
|
|
|
|
|
|
|
|
<br>The basic flow involves the following steps: First, the system [receives](https://zudate.com) an input for the design. This input is then processed through the [ApplyGuardrail API](http://leovip125.ddns.net8418). 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 last check, it's returned as the outcome. However, if either the input or output is intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following areas demonstrate reasoning 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 to DeepSeek-R1 in Amazon Bedrock, complete the following steps:<br>
|
|
|
|
|
|
|
|
<br>1. On the Amazon Bedrock console, choose Model catalog under Foundation designs in the navigation pane.
|
|
|
|
|
|
|
|
At the time of [writing](https://www.ayc.com.au) this post, you can utilize the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling.
|
|
|
|
|
|
|
|
2. Filter for DeepSeek as a company and pick the DeepSeek-R1 model.<br>
|
|
|
|
|
|
|
|
<br>The design detail page provides essential details about the design's abilities, rates structure, and application standards. You can find detailed use guidelines, including sample API calls and code snippets for combination. The model supports numerous text generation jobs, including material development, code generation, and concern answering, utilizing its support discovering optimization and CoT thinking abilities.
|
|
|
|
|
|
|
|
The page also consists of deployment alternatives and licensing details to help you get started with DeepSeek-R1 in your applications.
|
|
|
|
|
|
|
|
3. To begin using DeepSeek-R1, select Deploy.<br>
|
|
|
|
|
|
|
|
<br>You will be prompted to set up the release details for DeepSeek-R1. The model ID will be pre-populated.
|
|
|
|
|
|
|
|
4. For [Endpoint](https://parissaintgermainfansclub.com) name, enter an endpoint name (between 1-50 alphanumeric characters).
|
|
|
|
|
|
|
|
5. For Number of circumstances, go into a variety of circumstances (between 1-100).
|
|
|
|
|
|
|
|
6. For example type, pick your instance type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
|
|
|
|
|
|
|
|
Optionally, you can set up sophisticated security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function consents, and encryption settings. For the majority of use cases, the default settings will work well. However, for production implementations, you may wish to evaluate these settings to line up with your [organization's security](https://ruraltv.co.za) and compliance requirements.
|
|
|
|
|
|
|
|
7. [Choose Deploy](https://git.nosharpdistinction.com) to begin utilizing the design.<br>
|
|
|
|
|
|
|
|
<br>When the release is complete, you can evaluate 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 explore different prompts and change design criteria like temperature and maximum length.
|
|
|
|
|
|
|
|
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimum outcomes. For instance, content for reasoning.<br>
|
|
|
|
|
|
|
|
<br>This is an exceptional method to explore the design's reasoning and text generation abilities before integrating it into your applications. The play ground offers immediate feedback, helping you understand how the design reacts to different inputs and letting you tweak your triggers for ideal results.<br>
|
|
|
|
|
|
|
|
<br>You can quickly test the model in the playground through the UI. However, to conjure up the released design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
|
|
|
|
|
|
|
|
<br>Run inference using guardrails with the released DeepSeek-R1 endpoint<br>
|
|
|
|
|
|
|
|
<br>The following code example demonstrates how to perform reasoning utilizing 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 create the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime client, [configures reasoning](https://jobs.cntertech.com) parameters, and sends a request to create 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, built-in algorithms, and prebuilt ML options that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and release them into production utilizing either the UI or SDK.<br>
|
|
|
|
|
|
|
|
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart provides 2 practical approaches: utilizing the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both [methods](http://8.130.52.45) to help you select the technique that best suits your needs.<br>
|
|
|
|
|
|
|
|
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
|
|
|
|
|
|
|
|
<br>Complete the following steps to deploy 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 develop a domain.
|
|
|
|
|
|
|
|
3. On the SageMaker Studio console, [select JumpStart](https://git.fpghoti.com) in the navigation pane.<br>
|
|
|
|
|
|
|
|
<br>The [model internet](http://211.117.60.153000) browser shows available models, with details like the supplier name and design capabilities.<br>
|
|
|
|
|
|
|
|
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 design card.
|
|
|
|
|
|
|
|
Each design card reveals key details, including:<br>
|
|
|
|
|
|
|
|
<br>- Model name
|
|
|
|
|
|
|
|
- Provider name
|
|
|
|
|
|
|
|
- Task classification (for example, Text Generation).
|
|
|
|
|
|
|
|
Bedrock Ready badge (if suitable), indicating that this design can be registered with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to invoke 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 model name and service provider details.
|
|
|
|
|
|
|
|
Deploy button to deploy the design.
|
|
|
|
|
|
|
|
About and [Notebooks tabs](http://git.cxhy.cn) with detailed details<br>
|
|
|
|
|
|
|
|
<br>The About tab consists of important details, such as:<br>
|
|
|
|
|
|
|
|
<br>- Model description.
|
|
|
|
|
|
|
|
- License details.
|
|
|
|
|
|
|
|
- Technical specs.
|
|
|
|
|
|
|
|
- Usage standards<br>
|
|
|
|
|
|
|
|
<br>Before you release the model, it's recommended to review the [model details](https://repo.amhost.net) 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, utilize the immediately produced name or produce a custom-made one.
|
|
|
|
|
|
|
|
8. For Instance type [¸ pick](https://git.chocolatinie.fr) an instance type (default: ml.p5e.48 xlarge).
|
|
|
|
|
|
|
|
9. For Initial circumstances count, enter the number of circumstances (default: 1).
|
|
|
|
|
|
|
|
Selecting proper instance types and counts is important for cost and performance optimization. Monitor your implementation to change these settings as needed.Under Inference type, [Real-time reasoning](https://wiki.contextgarden.net) is chosen by default. This is enhanced for [sustained traffic](https://www.styledating.fun) and [low latency](http://www.xyais.cn).
|
|
|
|
|
|
|
|
10. Review all setups for precision. For this model, we highly recommend [sticking](http://39.108.93.0) to SageMaker JumpStart default settings and making certain that network isolation remains in location.
|
|
|
|
|
|
|
|
11. Choose Deploy to deploy the model.<br>
|
|
|
|
|
|
|
|
<br>The release process can take several minutes to finish.<br>
|
|
|
|
|
|
|
|
<br>When [release](http://89.234.183.973000) is complete, [pipewiki.org](https://pipewiki.org/wiki/index.php/User:BrigetteComeaux) your endpoint status will change to InService. At this point, the design is prepared to accept reasoning requests through the endpoint. You can keep an eye on the implementation progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the release is complete, you can conjure up the model using a SageMaker runtime client and integrate it with your applications.<br>
|
|
|
|
|
|
|
|
<br>Deploy DeepSeek-R1 [utilizing](http://gogs.dev.fudingri.com) 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 permissions and environment setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for [reasoning programmatically](http://34.236.28.152). The code for deploying the design is offered in the Github here. You can clone the notebook and range from SageMaker Studio.<br>
|
|
|
|
|
|
|
|
<br>You can run additional requests against the predictor:<br>
|
|
|
|
|
|
|
|
<br>Implement guardrails and run reasoning with your [SageMaker JumpStart](http://1.12.255.88) predictor<br>
|
|
|
|
|
|
|
|
<br>Similar to Amazon Bedrock, you can likewise use the ApplyGuardrail API with your SageMaker JumpStart [predictor](http://xn--9t4b21gtvab0p69c.com). You can develop a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:<br>
|
|
|
|
|
|
|
|
<br>Tidy up<br>
|
|
|
|
|
|
|
|
<br>To prevent unwanted charges, complete the actions in this area to clean up your resources.<br>
|
|
|
|
|
|
|
|
<br>Delete the Amazon Bedrock Marketplace release<br>
|
|
|
|
|
|
|
|
<br>If you deployed 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, choose Marketplace releases.
|
|
|
|
|
|
|
|
2. In the Managed deployments area, find the endpoint you wish 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 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 deployed will sustain costs if you leave it running. Use the following code to erase the [endpoint](https://gitea.v-box.cn) 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 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get started. 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](https://asicwiki.org) Solutions Architect for Inference at AWS. He assists emerging generative [AI](http://release.rupeetracker.in) companies build innovative solutions utilizing AWS services and accelerated compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the reasoning performance of large language models. In his downtime, Vivek takes pleasure in hiking, watching films, and trying different foods.<br>
|
|
|
|
|
|
|
|
<br>Niithiyn Vijeaswaran is a Generative [AI](https://prosafely.com) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area of focus is AWS [AI](http://poscotech.co.kr) 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://www.vmeste-so-vsemi.ru) 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://git.hichinatravel.com) center. She is enthusiastic about developing options that assist clients accelerate their [AI](https://git.luoui.com:2443) journey and unlock organization value.<br>
|