1 DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
laverne6777617 が 1週間前 にこのページを編集


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, along with the distilled versions ranging from 1.5 to 70 billion parameters to construct, experiment, and responsibly scale your generative AI concepts on AWS.

In this post, we show how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release the distilled versions of the models too.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that utilizes support finding out to improve thinking abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key identifying feature is its reinforcement learning (RL) action, which was utilized to refine the design’s responses beyond the basic pre-training and wiki.dulovic.tech fine-tuning process. By integrating RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately improving both importance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, indicating it’s geared up to break down complex queries and higgledy-piggledy.xyz reason through them in a detailed manner. This assisted reasoning process enables the design to produce more precise, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to generate structured reactions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has recorded the industry’s attention as a versatile text-generation design that can be incorporated into numerous workflows such as agents, sensible reasoning and information 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 parameters, enabling efficient inference by routing questions to the most relevant expert “clusters.” This approach enables the design to concentrate on various issue domains while maintaining general performance. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning capabilities of the main R1 design to more efficient architectures based on popular open models like Qwen (1.5 B, 7B, systemcheck-wiki.de 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more efficient designs to mimic the behavior and thinking patterns of the larger DeepSeek-R1 design, utilizing it as a teacher model.

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 place. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful content, and examine designs against crucial security criteria. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and gratisafhalen.be Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 model, user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, you require access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and validate 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 request a limit increase, produce a limit increase request and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent harmful content, and examine designs against key security criteria. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to evaluate user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.

The general flow includes 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 out 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 result. However, if either the input or larsaluarna.se output is stepped in 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 demonstrate reasoning 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, complete the following actions:

1. On the Amazon Bedrock console, select Model brochure under Foundation designs in the navigation pane. At the time of writing this post, you can use the InvokeModel API to invoke the model. It doesn’t support Converse APIs and other Amazon Bedrock tooling.

  1. Filter for DeepSeek as a company and select the DeepSeek-R1 design.

    The design detail page supplies necessary details about the design’s abilities, rates structure, and implementation guidelines. You can find detailed use instructions, including sample API calls and code snippets for combination. The model supports various text generation tasks, consisting of content production, code generation, and concern answering, using its reinforcement learning optimization and CoT reasoning abilities. The page also consists of implementation choices and licensing details to help you get started with DeepSeek-R1 in your applications.
  2. To begin using DeepSeek-R1, select Deploy.

    You will be prompted to set up the deployment details for DeepSeek-R1. The model ID will be pre-populated.
  3. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
  4. For Variety of instances, enter a number of circumstances (between 1-100).
  5. For example type, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, higgledy-piggledy.xyz you can configure sophisticated security and facilities settings, including virtual personal cloud (VPC) networking, service role permissions, and encryption settings. For many utilize cases, the default settings will work well. However, for production releases, you might wish to review these settings to line up with your organization’s security and compliance requirements.
  6. Choose Deploy to start utilizing the design.

    When the deployment is complete, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock play ground.
  7. Choose Open in playground to access an interactive interface where you can explore various prompts and adjust design criteria like temperature and maximum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat design template for optimum outcomes. For instance, content for inference.

    This is an excellent method to explore the design’s reasoning and text generation capabilities before incorporating it into your applications. The play ground supplies immediate feedback, assisting you comprehend how the model reacts to numerous inputs and letting you tweak your triggers for optimum results.

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

    Run reasoning utilizing guardrails with the released DeepSeek-R1 endpoint

    The following code example demonstrates how to carry out reasoning using a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can produce 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 produced the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, configures inference specifications, and sends a demand to generate text based on 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 solutions that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and deploy them into production utilizing either the UI or SDK.

    Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical methods: utilizing the user-friendly SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let’s check out both approaches to help you choose the approach that best suits your requirements.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

    Complete the following steps to release DeepSeek-R1 using SageMaker JumpStart:

    1. On the SageMaker console, pick Studio in the navigation pane.
  8. First-time users will be prompted to produce a domain.
  9. On the SageMaker Studio console, select JumpStart in the navigation pane.

    The model internet browser displays available designs, with details like the provider name and design abilities.

    4. Search for DeepSeek-R1 to see the DeepSeek-R1 design card. Each design card reveals key details, consisting of:

    - Model name
  10. Provider name
  11. Task category (for example, Text Generation). Bedrock Ready badge (if suitable), suggesting that this model can be registered with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to conjure up the model

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

    The model details page includes the following details:

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

    The About tab consists of crucial details, such as:

    - Model description.
  12. License details.
  13. Technical requirements.
  14. Usage guidelines

    Before you release the model, it’s recommended to review the design details and license terms to confirm compatibility with your use case.

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the instantly created name or develop a custom-made one.
  15. For Instance type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial circumstances count, go into the variety of instances (default: 1). Selecting appropriate circumstances types and counts is essential for cost and efficiency optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time reasoning is selected by default. This is optimized for sustained traffic and low latency.
  17. Review all configurations for accuracy. For this model, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  18. Choose Deploy to deploy the model.

    The implementation procedure can take several minutes to complete.

    When deployment is complete, your endpoint status will alter to InService. At this point, the design is prepared to accept reasoning requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the release is total, you can invoke the design using a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the essential 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 releasing the design is supplied in the Github here. You can clone the notebook and range from SageMaker Studio.

    You can run additional demands against the predictor:

    Implement guardrails and run reasoning 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:

    Clean up

    To avoid unwanted charges, finish the actions in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you released the design using Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace releases.
  19. In the Managed deployments area, locate the endpoint you wish to delete.
  20. Select the endpoint, and on the Actions menu, ratemywifey.com select Delete.
  21. Verify the endpoint details to make certain you’re erasing the correct deployment: 1. Endpoint name.
  22. Model name.
  23. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed will sustain expenses if you leave it running. Use the following code to erase 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 using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He helps emerging generative AI business build ingenious services using AWS services and accelerated calculate. Currently, he is concentrated on developing techniques for fine-tuning and enhancing the inference performance of large language designs. In his downtime, 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 location of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor’s degree in Computer technology and Bioinformatics.

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

    Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker’s artificial intelligence and generative AI center. She is passionate about building services that help clients accelerate their AI journey and unlock service worth.