Deleting the wiki page 'DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart' cannot be undone. Continue?
Today, we are delighted to announce 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‘s first-generation frontier design, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative AI concepts on AWS.
In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled variations of the models also.
Overview of DeepSeek-R1
DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that utilizes support learning to improve reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial differentiating function is its support knowing (RL) action, which was used to improve the design’s reactions beyond the basic pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adjust more effectively to user feedback and goals, ultimately boosting both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, indicating it’s equipped to break down complicated queries and factor through them in a detailed manner. This directed thinking procedure permits the model to produce more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has captured the market’s attention as a versatile text-generation design that can be integrated into numerous workflows such as agents, sensible reasoning and information interpretation tasks.
DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion specifications, enabling effective reasoning by routing inquiries to the most appropriate expert “clusters.” This method permits the model to concentrate on various problem domains while maintaining total performance. DeepSeek-R1 needs at least 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 comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.
DeepSeek-R1 distilled models bring the thinking abilities of the main R1 model to more effective architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more efficient designs to mimic the habits and reasoning patterns of the larger DeepSeek-R1 model, using it as a teacher model.
You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend deploying this model with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous material, and assess designs against crucial safety requirements. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop several guardrails tailored to different use cases and use 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 need access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and verify 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 deploying. To ask for a limit increase, develop a limitation increase request and connect to your account group.
Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and higgledy-piggledy.xyz Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For instructions, see Set up authorizations to use guardrails for material filtering.
Implementing guardrails with the ApplyGuardrail API
Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, and evaluate designs against crucial security criteria. You can implement safety procedures for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to examine user inputs and design reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.
The general flow involves 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 model for inference. After receiving the model’s output, another guardrail check is applied. If the output passes this final check, it’s returned as the result. However, wiki.whenparked.com if either the input or output is intervened by the guardrail, a message is returned showing the nature of the intervention and whether it took place at the input or output stage. The examples showcased in the following areas show reasoning using this API.
Deploy DeepSeek-R1 in Amazon Bedrock Marketplace
Amazon Bedrock Marketplace 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, total the following steps:
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 utilize the InvokeModel API to conjure up the design. It doesn’t support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.
The model detail page offers necessary details about the model’s abilities, prices structure, and application standards. You can discover detailed usage instructions, including sample API calls and code snippets for integration. The design supports various text generation tasks, consisting of material creation, code generation, and question answering, utilizing its support learning optimization and CoT reasoning capabilities.
The page also consists of release alternatives and licensing details to help you start with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, select Deploy.
You will be triggered to configure the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of circumstances, go into a number of instances (between 1-100).
6. For example type, choose your instance type. For optimal performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended.
Optionally, you can configure advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service role authorizations, and file encryption settings. For most utilize cases, the default settings will work well. However, for production deployments, you might desire to examine these settings to align with your company’s security and compliance requirements.
7. Choose Deploy to begin using the design.
When the release is total, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock play area.
8. Choose Open in play area to access an interactive user interface where you can experiment with various prompts and adjust model criteria like temperature level and maximum length.
When using R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat design template for optimal results. For example, material for inference.
This is an exceptional way to explore the model’s reasoning and text generation abilities before incorporating it into your applications. The play area provides instant feedback, helping you understand how the design reacts to numerous inputs and letting you fine-tune your triggers for optimum outcomes.
You can rapidly evaluate the design in the play ground through the UI. However, to invoke the released model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.
Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint
The following code example demonstrates how to perform inference using a deployed DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can create a guardrail using 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 the bedrock_runtime client, configures reasoning criteria, and sends out a request to generate text based on a user prompt.
Deploy DeepSeek-R1 with SageMaker JumpStart
SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML solutions that you can release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your data, and release them into production using either the UI or SDK.
Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 practical techniques: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let’s check out both methods to help you pick the technique that finest fits your requirements.
Deploy DeepSeek-R1 through SageMaker JumpStart UI
Complete the following actions to release DeepSeek-R1 utilizing SageMaker JumpStart:
1. On the SageMaker console, choose Studio in the navigation pane.
2. First-time users will be triggered to develop a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.
The model web browser shows available designs, with details like the provider name and model capabilities.
4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card reveals crucial details, including:
- Model name
Deleting the wiki page 'DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart' cannot be undone. Continue?