1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
shirleenmbo791 edited this page 2025-02-21 13:26:03 +00:00
This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.


Today, we are thrilled 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 model, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion specifications to build, experiment, and systemcheck-wiki.de properly scale your generative AI concepts on AWS.

In this post, we show 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 designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that uses support learning to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key identifying feature is its reinforcement knowing (RL) action, which was utilized to improve the model's actions beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately boosting both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, implying it's equipped to break down intricate inquiries and reason through them in a detailed manner. This directed reasoning process enables the design to produce more accurate, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured actions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has recorded the market's attention as a flexible text-generation design that can be integrated into various workflows such as agents, rational reasoning and data analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient reasoning by routing queries to the most appropriate specialist "clusters." This technique allows the model to concentrate on various problem domains while maintaining overall 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 design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 design to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more efficient models to mimic the behavior and thinking patterns of the larger DeepSeek-R1 design, utilizing it as an instructor model.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging material, and examine designs against essential safety criteria. 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 produce several guardrails tailored to various 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 design, 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, select Amazon SageMaker, and verify you're using 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 releasing. To ask for a limitation increase, produce a limitation increase request and reach out to your account group.

Because you will be releasing this design 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 instructions, see Establish authorizations to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid harmful material, photorum.eclat-mauve.fr and assess designs against essential safety requirements. You can execute precaution for bytes-the-dust.com the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to examine user inputs and model 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 produce the guardrail, see the GitHub repo.

The basic circulation includes the following actions: First, the system receives an input for higgledy-piggledy.xyz 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 receiving the model's output, another guardrail check is applied. If the output passes this last check, it's returned as the outcome. However, if either the input or output is stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it occurred 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, complete the following steps:

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

The design detail page offers necessary details about the model's abilities, rates structure, and execution standards. You can discover detailed usage instructions, including sample API calls and code snippets for integration. The model supports numerous text generation tasks, consisting of material development, code generation, and question answering, using its reinforcement finding out optimization and CoT thinking abilities. The page likewise consists of implementation choices and licensing details to assist you start with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, pick Deploy.

You will be triggered to configure the implementation details for ratemywifey.com DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters). 5. For Number of circumstances, get in a number of circumstances (between 1-100). 6. For Instance type, choose your circumstances type. For optimal performance with DeepSeek-R1, a GPU-based instance 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 function approvals, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production implementations, you may desire to evaluate these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to begin using the design.

When the release is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock playground. 8. Choose Open in play area to access an interactive interface where you can experiment with various prompts and change design parameters like temperature level and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum outcomes. For example, content for inference.

This is an to check out the model's thinking and text generation abilities before incorporating it into your applications. The play area supplies instant feedback, assisting you comprehend how the design reacts to different inputs and letting you tweak your triggers for ideal outcomes.

You can quickly check the design in the play ground through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference using guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to perform inference using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have developed the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime customer, engel-und-waisen.de sets up inference specifications, and sends out a demand to produce 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 services that you can deploy 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 model through SageMaker JumpStart offers two practical approaches: using the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both approaches to help you select the technique that best matches your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to deploy DeepSeek-R1 using 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, select JumpStart in the navigation pane.

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

4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card. Each model card reveals essential details, including:

- Model name

  • Provider name
  • Task classification (for example, Text Generation). Bedrock Ready badge (if relevant), suggesting that this design can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the model

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

    The design details page consists of the following details:

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

    The About tab consists of important details, such as:

    - Model description.
  • License details.
  • Technical specifications.
  • Usage guidelines

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

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, utilize the automatically produced name or produce a customized one.
  1. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the variety of instances (default: 1). Selecting appropriate instance types and counts is important for expense and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time inference is selected by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for precision. For this design, we strongly advise sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to release the model.

    The release procedure can take numerous minutes to finish.

    When deployment is total, your endpoint status will alter to InService. At this moment, the model is prepared to accept inference requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is total, you can invoke the model using a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS consents and environment setup. The following is a detailed code example that demonstrates how to release and use DeepSeek-R1 for inference programmatically. The code for releasing the design is offered in the Github here. You can clone the note pad and range from SageMaker Studio.

    You can run additional requests against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

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

    Clean up

    To prevent unwanted charges, finish the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you released the design utilizing Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace deployments.
  5. In the Managed deployments section, find the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting the proper release: 1. Endpoint name.
  8. Model name.
  9. 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 erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we explored how you can access and deploy the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting started with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies build innovative options utilizing AWS services and sped up calculate. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the inference efficiency of large language models. In his leisure time, Vivek takes pleasure in treking, enjoying motion pictures, and trying different cuisines.

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

    Jonathan Evans is a Professional Solutions Architect dealing with 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 hub. She is passionate about building services that help clients accelerate their AI journey and unlock organization value.