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

Komentar · 153 Tampilan

Today, we are excited to reveal that DeepSeek R1 distilled Llama and Qwen models 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, in addition to the distilled variations ranging from 1.5 to 70 billion specifications to build, 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 versions of the models also.


Overview of DeepSeek-R1


DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that utilizes reinforcement learning to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key distinguishing feature is its support learning (RL) step, which was used to refine the design's reactions beyond the standard pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately improving both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, suggesting it's equipped to break down complex questions and factor through them in a detailed manner. This assisted thinking process permits the design to produce more precise, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT capabilities, aiming to generate structured actions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually recorded the market's attention as a flexible text-generation model that can be incorporated into numerous workflows such as agents, sensible reasoning and data analysis tasks.


DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion specifications, making it possible for effective inference by routing inquiries to the most pertinent specialist "clusters." This approach enables the design to specialize in various problem domains while maintaining overall performance. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge instance to release the design. ml.p5e.48 xlarge features 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 on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller, more efficient models to simulate the behavior and reasoning patterns of the bigger DeepSeek-R1 design, utilizing it as an instructor model.


You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest deploying this model with guardrails in place. In this blog site, bytes-the-dust.com we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid harmful content, and evaluate models against key safety criteria. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce several guardrails tailored to various use 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 design, you require access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate 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 releasing. To ask for a limit boost, develop a limit increase demand and reach out to your account group.


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


Implementing guardrails with the ApplyGuardrail API


Amazon Bedrock Guardrails permits you to introduce safeguards, prevent hazardous content, and assess designs against crucial security criteria. You can carry out security measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to examine user inputs and design actions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.


The general flow involves the following steps: pipewiki.org 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 model for reasoning. After getting the model's output, another guardrail check is used. 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 took place at the input or output stage. The examples showcased in the following sections 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 structure models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:


1. On the Amazon Bedrock console, choose Model catalog under Foundation models in the navigation pane.
At the time of composing this post, you can use 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 pick the DeepSeek-R1 design.


The design detail page supplies important details about the design's capabilities, rates structure, and implementation standards. You can discover detailed use guidelines, consisting of sample API calls and code snippets for combination. The model supports different text generation tasks, including content development, code generation, and concern answering, utilizing its support finding out optimization and CoT thinking abilities.
The page also consists of deployment alternatives and licensing details to assist you begin with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, select Deploy.


You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of circumstances, get in a number of instances (in between 1-100).
6. For example type, select your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can set up advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service role consents, and file encryption settings. For the majority of use cases, the default settings will work well. However, for production releases, oeclub.org you may want to examine these settings to align with your company's security and compliance requirements.
7. Choose Deploy to start using the model.


When the implementation is complete, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in play ground to access an interactive user interface where you can explore various triggers and adjust design parameters like temperature level and maximum length.
When using 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 method to check out the design's thinking and text generation abilities before integrating it into your applications. The play area offers immediate feedback, assisting you understand how the model reacts to various inputs and letting you fine-tune your triggers for optimal outcomes.


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


Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint


The following code example demonstrates how to perform inference using a released DeepSeek-R1 design 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 develop the guardrail, see the GitHub repo. After you have actually developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference parameters, and sends 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 services 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 information, and deploy them into production utilizing either the UI or SDK.


Deploying DeepSeek-R1 model through SageMaker JumpStart provides two practical methods: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both approaches to help you choose the approach that finest fits your requirements.


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


The design internet browser displays available models, hb9lc.org with details like the service provider name and design abilities.


4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card reveals essential details, consisting of:


- Model name
- Provider name
- Task category (for example, Text Generation).
Bedrock Ready badge (if applicable), indicating that this design can be registered with Amazon Bedrock, allowing you to use Amazon Bedrock APIs to conjure up the model


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


The model details page consists of the following details:


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


The About tab includes important details, such as:


- Model description.
- License details.
- Technical specifications.
- Usage standards


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


6. Choose Deploy to continue with implementation.


7. For Endpoint name, utilize the instantly created name or produce a customized one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the variety of circumstances (default: 1).
Selecting suitable instance 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 picked by default. This is enhanced 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 seclusion remains in location.
11. Choose Deploy to deploy the model.


The deployment procedure can take a number of minutes to finish.


When implementation is total, your endpoint status will change to InService. At this point, the design is all set to accept reasoning requests through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the release is total, you can invoke the design utilizing a SageMaker runtime customer and integrate it with your applications.


Deploy DeepSeek-R1 using 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 necessary AWS authorizations and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for inference programmatically. The code for deploying the design is supplied in the Github here. You can clone the notebook and range from SageMaker Studio.


You can run extra requests against the predictor:


Implement guardrails and run reasoning with your SageMaker JumpStart predictor


Similar to Amazon Bedrock, you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:


Clean up


To prevent undesirable charges, finish the actions in this area to tidy up your resources.


Delete the Amazon Bedrock Marketplace release


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


1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace implementations.
2. In the Managed deployments area, locate the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're erasing the appropriate deployment: systemcheck-wiki.de 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 delete 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 release the DeepSeek-R1 design utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with Amazon SageMaker JumpStart.


About the Authors


Vivek Gangasani is a Lead Specialist Solutions Architect for wiki.snooze-hotelsoftware.de Inference at AWS. He assists emerging generative AI companies develop innovative solutions using AWS services and accelerated compute. Currently, he is concentrated on developing strategies for fine-tuning and enhancing the reasoning efficiency of big language models. In his leisure time, Vivek delights in treking, seeing films, and attempting various cuisines.


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 Science and engel-und-waisen.de Bioinformatics.


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


Banu Nagasundaram leads product, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about constructing solutions that help consumers accelerate their AI journey and unlock organization value.

Komentar