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 announce 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, along with the distilled versions ranging from 1.5 to 70 billion parameters to build, experiment, and properly scale your generative AI ideas on AWS.
In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled versions of the models too.
Overview of DeepSeek-R1
DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that uses support learning to improve reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A key differentiating feature is its support learning (RL) action, which was utilized to refine the design's responses beyond the standard pre-training and fine-tuning process. By incorporating RL, DeepSeek-R1 can adjust more efficiently to user feedback and objectives, eventually boosting both importance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, indicating it's geared up to break down intricate queries and reason through them in a detailed manner. This guided reasoning process allows the design to produce more precise, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has caught the industry's attention as a versatile text-generation model that can be integrated into numerous workflows such as agents, logical reasoning and data analysis tasks.
DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion parameters, allowing effective reasoning by routing inquiries to the most appropriate professional "clusters." This technique allows the model to specialize in various issue domains while maintaining overall performance. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to release the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.
DeepSeek-R1 distilled models bring the thinking capabilities 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 describes a procedure of training smaller, more effective models to mimic the behavior and reasoning patterns of the bigger DeepSeek-R1 design, using it as a teacher design.
You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest deploying this design with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and evaluate models against key safety requirements. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to different usage cases and apply them to the DeepSeek-R1 design, improving user experiences and standardizing safety controls across your generative AI applications.
Prerequisites
To release the DeepSeek-R1 model, you need access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and validate you're utilizing 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 releasing. To ask for a limitation increase, create a limit boost demand and connect 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) permissions to use Amazon Bedrock Guardrails. For guidelines, see Establish authorizations to utilize guardrails for content filtering.
Implementing guardrails with the ApplyGuardrail API
Amazon Bedrock Guardrails allows you to introduce safeguards, prevent hazardous material, and assess designs against essential security requirements. You can carry out safety procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to assess user inputs and model actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, garagesale.es see the GitHub repo.
The basic circulation 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 to the model for inference. After receiving the model's output, another guardrail check is used. If the output passes this last check, it's returned as the result. However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following areas show inference using 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, total the following actions:
1. On the Amazon Bedrock console, choose Model catalog under Foundation designs in the navigation pane.
At the time of writing this post, you can utilize the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.
The design detail page provides important details about the design's abilities, prices structure, and implementation guidelines. You can find detailed usage guidelines, consisting of sample API calls and code snippets for integration. The model supports different text generation tasks, including material production, code generation, and concern answering, using its reinforcement discovering optimization and CoT reasoning capabilities.
The page also consists of deployment options and licensing details to assist you start with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, pick Deploy.
You will be prompted to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, go into a number of circumstances (in 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 recommended.
Optionally, you can set up innovative security and facilities settings, including virtual private cloud (VPC) networking, service function permissions, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production deployments, you may desire to review these settings to align with your company's security and compliance requirements.
7. Choose Deploy to begin utilizing the model.
When the release is total, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in playground to access an interactive user interface where you can experiment with different triggers and adjust model parameters like temperature and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for ideal results. For instance, material for reasoning.
This is an exceptional method to explore the model's thinking and text generation capabilities before integrating it into your applications. The play ground supplies instant feedback, helping you understand how the design reacts to numerous inputs and letting you tweak your triggers for ideal results.
You can quickly test the design in the play area through the UI. However, to conjure up the released model 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 shows how to perform inference utilizing a deployed DeepSeek-R1 design 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 actually produced the guardrail, utilize the following code to execute guardrails. The script initializes the bedrock_runtime client, configures inference criteria, and sends a request to produce text based on a user timely.
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 designs to your use case, with your data, and release them into production using either the UI or SDK.
Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical techniques: utilizing the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you choose the approach that best suits your requirements.
Deploy DeepSeek-R1 through SageMaker JumpStart UI
Complete the following steps to deploy DeepSeek-R1 using SageMaker JumpStart:
1. On the SageMaker console, select Studio in the navigation pane.
2. First-time users will be triggered to create a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.
The model internet browser shows available designs, with details like the provider name and model capabilities.
4. Search for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each model 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?
Powered by TurnKey Linux.