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

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 thrilled 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 release DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled versions varying from 1.5 to 70 billion criteria to build, experiment, and properly scale your generative AI concepts on AWS.


In this post, we demonstrate 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 models also.


Overview of DeepSeek-R1


DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that uses reinforcement learning to enhance reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial identifying feature is its reinforcement learning (RL) action, which was used to refine the design's reactions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adapt more successfully to user feedback and goals, ultimately improving both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, suggesting it's geared up to break down complicated inquiries and reason through them in a detailed way. This assisted thinking procedure permits the model to produce more accurate, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT abilities, aiming to create structured reactions while focusing on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has captured the industry's attention as a flexible text-generation design that can be incorporated into numerous workflows such as representatives, sensible reasoning and information interpretation jobs.


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, enabling effective reasoning by routing queries to the most pertinent expert "clusters." This method permits the model to specialize in different problem domains while maintaining general effectiveness. 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 deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.


DeepSeek-R1 distilled designs bring the reasoning abilities of the main R1 design to more effective 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, more efficient models to imitate the habits and thinking patterns of the larger DeepSeek-R1 model, using it as an instructor design.


You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend deploying this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging material, and evaluate models against crucial security criteria. At the time of composing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop several 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 applications.


Prerequisites


To release the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and confirm 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 deploying. To request a limit boost, develop a limitation boost demand and reach out to your account team.


Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) approvals to use Amazon Bedrock Guardrails. For instructions, see Set up approvals to use guardrails for content filtering.


Implementing guardrails with the ApplyGuardrail API


Amazon Bedrock Guardrails allows you to introduce safeguards, avoid harmful material, and examine models against essential security criteria. You can implement safety measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and design reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.


The basic flow involves the following actions: 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 out to the design for inference. After getting the model's output, another guardrail check is applied. If the output passes this final check, it's returned as the last result. 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 areas demonstrate reasoning utilizing this API.


Deploy DeepSeek-R1 in Amazon Bedrock Marketplace


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 actions:


1. On the Amazon Bedrock console, pick Model catalog under Foundation designs in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to conjure up the model. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 model.


The model detail page offers essential details about the model's capabilities, pricing structure, and execution guidelines. You can find detailed use directions, consisting of sample API calls and code snippets for combination. The design supports different text generation jobs, including material production, code generation, and question answering, utilizing its support discovering optimization and CoT thinking abilities.
The page also includes deployment alternatives and licensing details to help you get going with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, wiki.rolandradio.net select Deploy.


You will be prompted to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated.
4. For pipewiki.org Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, enter a variety of instances (in between 1-100).
6. For example type, pick your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can configure innovative security and infrastructure settings, including virtual private cloud (VPC) networking, service role authorizations, and file encryption settings. For a lot of utilize cases, the default settings will work well. However, for production deployments, you might wish to evaluate these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to start using the design.


When the deployment is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play area to access an interactive user interface where you can explore different prompts and change model specifications like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum outcomes. For example, <|begin▁of▁sentence|><|User|>content for inference<|Assistant|>.


This is an excellent way to explore the model's thinking and text generation capabilities before integrating it into your applications. The play area supplies immediate feedback, helping you comprehend how the model reacts to various inputs and letting you fine-tune your triggers for ideal results.


You can rapidly test the model in the playground through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.


Run inference using guardrails with the released DeepSeek-R1 endpoint


The following code example shows how to carry out inference utilizing a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For higgledy-piggledy.xyz the example code to develop the guardrail, see the GitHub repo. After you have developed the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime customer, sets up inference criteria, and sends a demand to generate text based on a user timely.


Deploy DeepSeek-R1 with SageMaker JumpStart


SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML options 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 data, and deploy them into production using either the UI or SDK.


Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical methods: utilizing the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both methods to help you choose the technique that finest suits your needs.


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 create a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.


The design web browser shows available models, with details like the company name and setiathome.berkeley.edu model capabilities.


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


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


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


The design details page includes the following details:


- The design name and company details.
Deploy button to release the model.
About and Notebooks tabs with detailed details


The About tab includes important details, such as:


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


Before you deploy the design, it's recommended to review the model details and license terms to validate compatibility with your usage case.


6. Choose Deploy to proceed with implementation.


7. For Endpoint name, use the immediately produced name or create a custom-made one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the variety of circumstances (default: 1).
Selecting suitable circumstances types and counts is essential for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is optimized for forum.altaycoins.com sustained traffic and low latency.
10. Review all configurations for precision. For this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to release the model.


The deployment process can take numerous minutes to finish.


When implementation is complete, your endpoint status will change to InService. At this point, the model is ready to accept reasoning demands through the endpoint. You can keep track of the implementation progress on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the deployment is complete, you can invoke the model utilizing a SageMaker runtime client and integrate it with your applications.


Deploy DeepSeek-R1 utilizing the SageMaker Python SDK


To get begun with DeepSeek-R1 using the SageMaker Python SDK, you will require 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 release and use DeepSeek-R1 for reasoning programmatically. The code for deploying the design is offered in the Github here. You can clone the notebook and run from SageMaker Studio.


You can run extra demands against the predictor:


Implement guardrails and run inference with your SageMaker JumpStart predictor


Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail utilizing the Amazon Bedrock console or larsaluarna.se the API, and execute it as shown in the following code:


Tidy up


To avoid unwanted charges, complete the actions in this area to tidy up your resources.


Delete the Amazon Bedrock Marketplace deployment


If you deployed the model using Amazon Bedrock Marketplace, complete the following steps:


1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace implementations.
2. In the Managed implementations area, locate the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're erasing the appropriate deployment: 1. Endpoint name.
2. Model name.
3. Endpoint status


Delete the SageMaker JumpStart predictor


The SageMaker JumpStart design you deployed will sustain expenses if you leave it running. Use the following code to erase the endpoint if you desire to stop sustaining charges. For more details, see Delete Endpoints and Resources.


Conclusion


In this post, we explored how you can access and release the DeepSeek-R1 model utilizing 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 models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting begun with Amazon SageMaker JumpStart.


About the Authors


Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI business construct ingenious solutions utilizing AWS services and accelerated compute. Currently, he is focused on developing methods for fine-tuning and enhancing the reasoning performance of big language designs. In his free time, Vivek delights in treking, watching movies, and trying different foods.


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


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


Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about building services that help clients accelerate their AI journey and unlock company value.


dawnbeebe01013

7 Blog posts

Comments