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

Virginia Moll 2025-02-13 08:40:20 +08:00
commit 147bdfb8ec
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are delighted 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://www.olsitec.de)'s first-generation frontier model, DeepSeek-R1, in addition to the [distilled](https://git.lewd.wtf) versions varying from 1.5 to 70 billion [criteria](https://gitlab.zogop.com) to develop, experiment, and properly scale your generative [AI](https://www.dataalafrica.com) 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 actions to release the distilled variations of the models too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) [established](http://git.yang800.cn) by DeepSeek [AI](http://52.23.128.62:3000) that uses reinforcement finding out to enhance thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential distinguishing feature is its reinforcement learning (RL) action, which was utilized to fine-tune the design's responses beyond the [standard pre-training](http://jatushome.myqnapcloud.com8090) and fine-tuning process. By integrating RL, DeepSeek-R1 can adjust more successfully to user feedback and goals, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) approach, suggesting it's equipped to break down intricate questions and factor through them in a detailed way. This directed reasoning process enables the model to produce more precise, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT capabilities, aiming to generate structured reactions while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has caught the industry's attention as a flexible text-generation model that can be incorporated into numerous workflows such as agents, logical reasoning and data analysis jobs.<br>
<br>DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion specifications, allowing efficient inference by routing questions to the most pertinent professional "clusters." This technique permits the design to specialize in different problem domains while maintaining overall effectiveness. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 model to more efficient architectures based upon popular 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](https://sos.shinhan.ac.kr) to imitate the habits and thinking patterns of the larger DeepSeek-R1 model, utilizing it as an instructor design.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Marketplace. Because DeepSeek-R1 is an emerging model, we suggest releasing this model with guardrails in place. In this blog, we will [utilize Amazon](http://183.238.195.7710081) Bedrock Guardrails to present safeguards, prevent hazardous material, and assess models against essential safety requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce multiple guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls throughout your generative [AI](http://code.bitahub.com) [applications](https://aladin.tube).<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you require access to an ml.p5e [circumstances](https://sos.shinhan.ac.kr). To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and validate 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 limit boost, create a limitation increase request and reach out to your account group.<br>
<br>Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To Management (IAM) consents to utilize Amazon Bedrock Guardrails. For directions, see Set up authorizations to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to present safeguards, [prevent damaging](http://www.chemimart.kr) material, and assess models against essential safety requirements. You can carry out security procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine user inputs and design actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock [console](https://suomalaistajalkapalloa.com) or the API. For the example code to create the guardrail, see the GitHub repo.<br>
<br>The basic circulation [involves](https://careers.webdschool.com) 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 getting the model's output, another [guardrail check](http://39.106.177.1608756) is applied. If the output passes this last check, it's returned as the outcome. However, if either the input or output is stepped in by the guardrail, a message is returned indicating the nature of the intervention and whether it happened at the input or [garagesale.es](https://www.garagesale.es/author/kierakeys13/) 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 models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
<br>1. On the Amazon Bedrock console, choose Model brochure under Foundation designs in the navigation pane.
At the time of writing this post, you can utilize the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and select the DeepSeek-R1 design.<br>
<br>The design detail page [supplies](https://www.hireprow.com) important details about the model's capabilities, rates structure, and execution standards. You can discover detailed usage instructions, consisting of sample API calls and code snippets for combination. The design supports various text generation jobs, including content development, code generation, and concern answering, using its reinforcement discovering optimization and CoT reasoning capabilities.
The page likewise consists of implementation alternatives and [licensing details](https://han2.kr) to assist you start with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, pick Deploy.<br>
<br>You will be triggered to configure the deployment details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a number of instances (between 1-100).
6. For example type, choose your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can set up advanced security and facilities 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 deployments, you may want to review these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to begin utilizing the model.<br>
<br>When the implementation is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play ground to access an interactive interface where you can experiment with various triggers and adjust design specifications like temperature and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, material for reasoning.<br>
<br>This is an excellent method to check out the design's reasoning and text generation capabilities before integrating it into your applications. The play ground offers instant feedback, assisting you understand how the design responds to various inputs and letting you fine-tune your [triggers](http://www.jimtangyh.xyz7002) for ideal results.<br>
<br>You can quickly check the model in the playground through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to carry out inference utilizing a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can [develop](https://git.watchmenclan.com) a guardrail utilizing the Amazon Bedrock [console](https://jobsportal.harleysltd.com) or the API. For the example code to [develop](https://livesports808.biz) the guardrail, see the GitHub repo. After you have developed the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime customer, sets up inference parameters, and sends a demand 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, integrated algorithms, and prebuilt ML services that you can release with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 convenient methods: utilizing the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to help you select the technique that finest fits 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, pick JumpStart in the navigation pane.<br>
<br>The model browser displays available models, with details like the service provider name and model abilities.<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each model card shows key details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if relevant), suggesting that this design can be registered with Amazon Bedrock, enabling you to use [Amazon Bedrock](https://www.contraband.ch) APIs to conjure up the design<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The model details page includes the following details:<br>
<br>- The model name and [company details](https://proputube.com).
Deploy button to release the design.
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 specs.
- Usage standards<br>
<br>Before you deploy the model, it's [recommended](http://git.motr-online.com) to evaluate the model details and license terms to validate compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with implementation.<br>
<br>7. For Endpoint name, use the automatically created name or produce a customized one.
8. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, go into the number of circumstances (default: 1).
Selecting appropriate circumstances types and counts is crucial for expense and performance optimization. Monitor your deployment to adjust 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 design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
11. Choose Deploy to deploy the model.<br>
<br>The release process can take several minutes to finish.<br>
<br>When deployment is total, your endpoint status will alter to InService. At this point, the design is all set to accept inference requests through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the implementation is total, you can invoke the design utilizing a SageMaker runtime client and [wavedream.wiki](https://wavedream.wiki/index.php/User:AdriannaBranch) integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the necessary AWS approvals and environment setup. The following is a detailed code example that demonstrates how to release and utilize DeepSeek-R1 for inference programmatically. The code for deploying the model is provided in the Github here. You can clone the notebook and range from SageMaker Studio.<br>
<br>You can run extra requests against the predictor:<br>
<br>Implement guardrails and run inference with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also use the [ApplyGuardrail API](https://adsall.net) with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:<br>
<br>Clean up<br>
<br>To avoid undesirable charges, finish the steps in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock [Marketplace](https://tangguifang.dreamhosters.com) implementation<br>
<br>If you deployed the design using Amazon Bedrock Marketplace, total the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
2. In the Managed implementations area, locate 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 release: [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:DonWickens347) 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you [deployed](https://wiki.roboco.co) will sustain costs if you leave it running. 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 and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, 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 assists emerging generative [AI](https://myafritube.com) companies develop ingenious services using AWS services and sped up calculate. Currently, he is focused on establishing methods for fine-tuning and optimizing the inference efficiency of big language models. In his free time, Vivek enjoys treking, watching movies, and attempting various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://gitea.alexandermohan.com) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area of focus is AWS [AI](https://git.apps.calegix.net) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>[Jonathan Evans](https://galsenhiphop.com) is an Expert Solutions Architect working on generative [AI](https://speeddating.co.il) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial [intelligence](https://revinr.site) and generative [AI](http://39.106.43.96) center. She is enthusiastic about building services that assist customers accelerate their [AI](https://complexityzoo.net) journey and unlock service worth.<br>