Deleting the wiki page 'DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart' cannot be undone. Continue?
Today, we are excited 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 deploy DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion criteria to develop, experiment, and responsibly scale your generative AI concepts on AWS.
In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to deploy the distilled variations of the designs too.
Overview of DeepSeek-R1
DeepSeek-R1 is a large language model (LLM) established by DeepSeek AI that uses support discovering to boost thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential distinguishing function is its reinforcement knowing (RL) action, which was utilized to fine-tune the model's actions beyond the standard pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately enhancing both relevance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, implying it's geared up to break down complicated queries and reason through them in a detailed way. This guided thinking process allows the design to produce more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured reactions while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has captured the market's attention as a versatile text-generation design that can be integrated into numerous workflows such as agents, rational reasoning and data analysis tasks.
DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion specifications, making it possible for effective reasoning by routing queries to the most pertinent professional "clusters." This approach permits the design to specialize in different issue domains while maintaining total effectiveness. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.
DeepSeek-R1 distilled designs bring the thinking capabilities of the main R1 design to more efficient architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and wiki.whenparked.com Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient models to mimic the habits and reasoning patterns of the larger DeepSeek-R1 model, using it as a teacher design.
You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging content, and assess models against essential security criteria. At the time of writing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop multiple guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout your generative AI applications.
Prerequisites
To deploy the DeepSeek-R1 design, 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, select Amazon SageMaker, genbecle.com and validate 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 limit boost, produce a limitation increase request and connect to your account group.
Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) permissions to use Amazon Bedrock Guardrails. For directions, see Set up approvals to use guardrails for content filtering.
Implementing guardrails with the ApplyGuardrail API
Amazon Bedrock Guardrails permits you to present safeguards, prevent damaging content, and examine designs against essential security requirements. You can carry out precaution for the DeepSeek-R1 model utilizing 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 using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.
The basic circulation involves the following actions: 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 model 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 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 using this API.
Deploy DeepSeek-R1 in Amazon Bedrock Marketplace
Amazon Bedrock Marketplace provides you access to over 100 popular, wiki.whenparked.com emerging, and specialized structure models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:
1. On the Amazon Bedrock console, select Model catalog under Foundation designs in the navigation pane.
At the time of writing 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 supplier and pick the DeepSeek-R1 design.
The model detail page provides essential details about the model's abilities, pricing structure, and execution guidelines. You can discover detailed usage guidelines, including sample API calls and code bits for integration. The model supports numerous text generation tasks, consisting of material creation, code generation, and question answering, using its reinforcement finding out optimization and CoT reasoning capabilities.
The page also includes release alternatives 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 configure the deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of instances, get in a number of instances (between 1-100).
6. For example type, choose your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can set up innovative security and facilities settings, consisting of virtual personal cloud (VPC) networking, service role permissions, and file encryption settings. For many utilize cases, the default settings will work well. However, for production implementations, you may wish to review these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to begin utilizing the model.
When the implementation is complete, you can test DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in play area to access an interactive interface where you can try out different prompts and change design criteria like temperature level and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal outcomes. For example, material for inference.
This is an exceptional way to check out the model's reasoning and text generation capabilities before integrating it into your applications. The play area offers immediate feedback, assisting you comprehend how the design responds to numerous inputs and letting you fine-tune your triggers for ideal outcomes.
You can rapidly test the design in the play ground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.
Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint
The following code example demonstrates 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 the example code to create the guardrail, see the GitHub repo. After you have developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, configures inference specifications, and sends out a request to create text based on a user prompt.
Deploy DeepSeek-R1 with SageMaker JumpStart
SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML services that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models 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 convenient techniques: using the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you pick the approach that best fits your needs.
Deploy DeepSeek-R1 through SageMaker JumpStart UI
Complete the following steps to deploy 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, pick JumpStart in the navigation pane.
The model web browser shows available designs, with details like the service provider name and design abilities.
4. Look for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each design card shows 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?
Powered by TurnKey Linux.