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

التعليقات · 120 الآراء

Today, we are thrilled to announce that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart.

Today, we are delighted to reveal 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's first-generation frontier model, DeepSeek-R1, along with the distilled variations ranging from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative AI concepts on AWS.


In this post, we show how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled variations of the designs as well.


Overview of DeepSeek-R1


DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that utilizes support learning to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential identifying function is its support knowing (RL) action, which was utilized to improve the design's actions beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually improving both relevance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, suggesting it's equipped to break down complex queries and reason through them in a detailed way. This guided thinking process enables the design to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to create structured reactions while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has recorded the industry's attention as a flexible text-generation model that can be integrated into numerous workflows such as representatives, sensible thinking and information analysis tasks.


DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion parameters, enabling effective inference by routing inquiries to the most appropriate professional "clusters." This approach enables the model to focus on various issue domains while maintaining general performance. DeepSeek-R1 requires 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 to deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.


DeepSeek-R1 distilled models bring the reasoning abilities of the main R1 design to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more efficient models to simulate the habits and thinking patterns of the bigger DeepSeek-R1 model, using it as an instructor model.


You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this model with guardrails in location. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent hazardous content, and assess models against key safety criteria. 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 develop several guardrails tailored to various use cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative AI applications.


Prerequisites


To deploy the DeepSeek-R1 model, you require access to an ml.p5e instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and confirm you're using ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are releasing. To ask for a limitation boost, develop a limitation increase request and systemcheck-wiki.de reach out to your account team.


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) consents to utilize Amazon Bedrock Guardrails. For directions, see Set up approvals to utilize guardrails for material filtering.


Implementing guardrails with the ApplyGuardrail API


Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, and assess designs against crucial safety requirements. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to evaluate user inputs and model responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo.


The basic flow involves the following steps: First, the system gets an input for the design. 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 getting the model's output, another guardrail check is applied. If the output passes this final check, it's returned as the final 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 happened at the input or output stage. The examples showcased in the following sections demonstrate reasoning utilizing this API.


Deploy DeepSeek-R1 in Amazon Bedrock Marketplace


Amazon Bedrock Marketplace provides 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:


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 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.


The design detail page offers essential details about the design's abilities, rates structure, and application standards. You can find detailed use instructions, including sample API calls and code bits for combination. The model supports various text generation jobs, including content creation, code generation, and question answering, using its reinforcement finding out optimization and CoT reasoning capabilities.
The page also includes release choices and licensing details to help you start with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, select Deploy.


You will be prompted to set up the deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of circumstances, enter a variety of circumstances (in between 1-100).
6. For example type, choose your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can configure innovative security and facilities settings, including virtual private cloud (VPC) networking, service role consents, and file encryption settings. For a lot of utilize cases, the default settings will work well. However, for production implementations, you may wish to review these settings to line up with your company's security and compliance requirements.
7. Choose Deploy to begin using the design.


When the release is total, you can test DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in playground to access an interactive interface where you can experiment with different triggers and adjust design parameters like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal results. For example, <|begin▁of▁sentence|><|User|>content for reasoning<|Assistant|>.


This is an outstanding way to explore the model's reasoning and text generation abilities before integrating it into your applications. The play area supplies immediate feedback, assisting you comprehend how the model reacts to different inputs and letting you fine-tune your triggers for optimum results.


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.


Run reasoning using guardrails with the released DeepSeek-R1 endpoint


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 utilizing 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 execute guardrails. The script initializes the bedrock_runtime client, sets up inference criteria, and sends out a demand to create text based upon a user timely.


Deploy DeepSeek-R1 with SageMaker JumpStart


SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML solutions that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and release them into production utilizing either the UI or SDK.


Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 convenient methods: using the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both techniques to help you choose the approach that finest suits your requirements.


Deploy DeepSeek-R1 through SageMaker JumpStart UI


Complete the following steps to release DeepSeek-R1 utilizing SageMaker JumpStart:


1. On the SageMaker console, pick Studio in the navigation pane.
2. First-time users will be prompted to produce a domain.
3. On the SageMaker Studio console, pipewiki.org pick JumpStart in the navigation pane.


The design browser shows available designs, with details like the service provider name and design capabilities.


4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card shows essential details, including:


- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if appropriate), suggesting that this model can be signed up with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to invoke the model


5. Choose the model card to view the model details page.


The model details page includes the following details:


- The model name and provider details.
Deploy button to deploy the model.
About and wiki.rolandradio.net Notebooks tabs with detailed details


The About tab includes crucial details, such as:


- Model description.
- License details.
- Technical specs.
- Usage guidelines


Before you release the design, it's advised to evaluate the model details and license terms to verify compatibility with your usage case.


6. Choose Deploy to continue with release.


7. For Endpoint name, utilize the instantly generated name or develop a custom-made one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, get in the variety of instances (default: 1).
Selecting appropriate instance types and counts is vital 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 precision. For this model, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to release the model.


The release procedure can take numerous minutes to finish.


When release is complete, your endpoint status will alter to InService. At this moment, the model is all set to accept reasoning demands through the endpoint. You can keep an eye on the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is total, you can invoke the model utilizing a SageMaker runtime customer and incorporate it with your applications.


Deploy DeepSeek-R1 utilizing the SageMaker Python SDK


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 required AWS approvals and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the model is supplied in the Github here. You can clone the note pad and range from SageMaker Studio.


You can run extra demands against the predictor:


Implement guardrails and run reasoning with your SageMaker JumpStart predictor


Similar to Amazon Bedrock, you can also use the ApplyGuardrail API 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:


Tidy up


To avoid undesirable charges, finish the steps in this section to tidy up your resources.


Delete the Amazon Bedrock Marketplace implementation


If you released the model using Amazon Bedrock Marketplace, complete the following actions:


1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace implementations.
2. In the Managed implementations section, locate the endpoint you wish to erase.
3. Select the endpoint, and on the Actions menu, pick Delete.
4. Verify the endpoint details to make certain you're deleting the right release: 1. Endpoint name.
2. Model name.
3. Endpoint status


Delete the SageMaker JumpStart predictor


The SageMaker JumpStart model you deployed will sustain costs 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.


Conclusion


In this post, we explored how you can access and deploy 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 Beginning with Amazon SageMaker JumpStart.


About the Authors


Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He helps emerging generative AI companies build innovative services using AWS services and sped up calculate. Currently, he is concentrated on developing strategies for fine-tuning and optimizing the inference performance of large language models. In his leisure time, Vivek delights in treking, seeing films, and trying various cuisines.


Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.


Jonathan Evans is a Professional Solutions Architect working on generative AI with the Third-Party Model Science team at AWS.


Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about constructing services that assist customers accelerate their AI journey and unlock company value.

التعليقات