1
DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Adrianna Apodaca edited this page 2025-02-13 18:06:48 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


Today, we are thrilled 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 criteria to construct, experiment, and properly 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 comparable actions to release the distilled variations of the designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses support learning to enhance reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential identifying feature is its support knowing (RL) action, hb9lc.org which was utilized to improve the model's actions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adapt better to user feedback and goals, eventually improving both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, indicating it's geared up to break down complex questions and factor through them in a detailed way. This directed reasoning process enables the design to produce more precise, transparent, and detailed responses. This design integrates RL-based fine-tuning with CoT abilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has caught the market's attention as a versatile text-generation design that can be integrated into various workflows such as representatives, rational reasoning and information interpretation jobs.

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 efficient inference by routing inquiries to the most appropriate specialist "clusters." This method enables the design to focus on different issue domains while maintaining general effectiveness. DeepSeek-R1 requires at least 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 model. ml.p5e.48 xlarge includes 8 Nvidia H200 1128 GB of GPU memory.

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

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or bytes-the-dust.com Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise releasing this design with guardrails in place. In this blog site, wavedream.wiki we will use Amazon Bedrock Guardrails to present safeguards, avoid damaging material, and examine models against key safety requirements. At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and larsaluarna.se Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce multiple guardrails tailored to various usage cases and use them to the DeepSeek-R1 model, 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 instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and confirm you're using ml.p5e.48 xlarge for endpoint usage. 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 increase, produce a limitation increase request and reach out to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, larsaluarna.se prevent harmful content, and examine models against crucial safety requirements. You can implement safety procedures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to examine user inputs and model responses released 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 general circulation involves the following steps: 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 design'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 intervened by the guardrail, a message is returned showing the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following sections show inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers you access to over 100 popular, 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, pick Model brochure under Foundation models in the navigation pane. At the time of composing this post, you can use the InvokeModel API to conjure up the model. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a service provider and choose the DeepSeek-R1 model.

The design detail page provides important details about the model's capabilities, pricing structure, and application standards. You can discover detailed usage instructions, including sample API calls and code snippets for integration. The model supports numerous text generation jobs, including material creation, code generation, and question answering, utilizing its support finding out optimization and CoT reasoning abilities. The page likewise includes release alternatives and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, select Deploy.

You will be prompted to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of instances, enter a number of instances (in between 1-100). 6. For example type, pick your instance type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can set up sophisticated security and facilities settings, including virtual private cloud (VPC) networking, service role consents, and encryption settings. For a lot of use cases, the default settings will work well. However, for production implementations, you might want to evaluate these settings to align with your company's security and it-viking.ch compliance requirements. 7. Choose Deploy to start using the design.

When the release is total, you can check DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can experiment with various triggers and adjust model specifications like temperature level and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for ideal results. For example, content for inference.

This is an excellent method to check out the model's reasoning and text generation capabilities before incorporating it into your applications. The playground supplies immediate feedback, assisting you understand how the model reacts to various inputs and letting you tweak your prompts for optimum outcomes.

You can quickly test the model in the playground through the UI. However, to invoke the released 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 carry out reasoning 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 develop the guardrail, see the GitHub repo. After you have actually produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, configures reasoning specifications, and sends a request to generate text based upon a user timely.

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 release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and deploy them into production using either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart offers two hassle-free approaches: utilizing the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both methods to help you choose the approach that finest matches your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

The design internet browser shows available designs, with details like the company name and design abilities.

4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows crucial details, consisting of:

- Model name

  • Provider name
  • Task category (for instance, Text Generation). Bedrock Ready badge (if appropriate), showing that this design can be signed up with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to invoke the model

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

    The model details page includes the following details:

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

    The About tab includes crucial details, such as:

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

    Before you deploy the design, it's advised to examine the model details and license terms to confirm compatibility with your use case.

    6. Choose Deploy to proceed with deployment.

    7. For Endpoint name, utilize the immediately generated name or produce a custom one.
  1. For Instance type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the number of circumstances (default: 1). Selecting proper instance types and counts is crucial for cost and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time inference is chosen by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this design, we highly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the model.

    The deployment procedure can take several minutes to complete.

    When deployment is complete, your endpoint status will alter to InService. At this moment, the model is all set to accept reasoning demands through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is total, you can conjure up the design using a SageMaker runtime customer and incorporate 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 need to install the SageMaker Python SDK and make certain you have the necessary AWS permissions and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for reasoning programmatically. The code for deploying the model is supplied in the Github here. You can clone the note pad and range from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Tidy up

    To avoid undesirable charges, complete the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you released the model using Amazon Bedrock Marketplace, complete the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace implementations.
  5. In the Managed releases section, find the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, pick Delete.
  7. Verify the endpoint details to make certain you're deleting the appropriate deployment: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you released 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, disgaeawiki.info we checked out how you can access and release 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, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting begun 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 construct innovative services using AWS services and accelerated calculate. Currently, he is concentrated on developing methods for fine-tuning and optimizing the inference efficiency of large language models. In his spare time, Vivek enjoys hiking, seeing films, and trying various foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology 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 item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about developing solutions that assist clients accelerate their AI journey and unlock company worth.