DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
Judson Tarr ha modificato questa pagina 2 settimane fa


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 deploy DeepSeek AI’s first-generation frontier model, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion specifications to develop, experiment, and properly scale your generative AI ideas 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 designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that utilizes reinforcement finding out to enhance thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial differentiating function is its reinforcement learning (RL) step, which was used to fine-tune the design’s actions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adapt better to user and goals, eventually boosting both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, suggesting it’s geared up to break down complicated questions and factor through them in a detailed way. This assisted reasoning process permits the design to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually captured the industry’s attention as a flexible text-generation model that can be integrated into various workflows such as representatives, sensible thinking and data interpretation tasks.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, enabling effective reasoning by routing questions to the most appropriate professional “clusters.” This method allows the design to concentrate on different issue domains while maintaining total efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the model. 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 effective architectures based on popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient designs to simulate the habits and reasoning patterns of the bigger DeepSeek-R1 model, using it as a teacher model.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful material, disgaeawiki.info and yewiki.org assess models against key safety requirements. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create several 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 design, you require access to an ml.p5e instance. To inspect 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 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 limitation boost, produce a limitation increase request and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, avoid damaging content, and assess designs against crucial safety criteria. You can carry out precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to apply guardrails to examine user inputs and model reactions deployed 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 develop the guardrail, see the GitHub repo.

The general circulation includes the following actions: First, the system gets an input for the design. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it’s sent out to the model for inference. After receiving the design’s output, another guardrail check is applied. 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 showing the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following sections demonstrate 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 steps:

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 use the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling.

  1. Filter for DeepSeek as a supplier and links.gtanet.com.br choose the DeepSeek-R1 design.

    The design detail page supplies vital details about the design’s capabilities, rates structure, bytes-the-dust.com and implementation guidelines. You can find detailed use guidelines, including sample API calls and code bits for integration. The design supports numerous text generation tasks, consisting of content development, code generation, and question answering, utilizing its reinforcement learning optimization and CoT thinking capabilities. The page likewise consists of deployment options and licensing details to assist you begin with DeepSeek-R1 in your applications.
  2. To begin utilizing DeepSeek-R1, choose Deploy.

    You will be triggered to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated.
  3. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
  4. For Number of instances, go into a number of instances (in between 1-100).
  5. For example type, select your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up sophisticated security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function permissions, and file encryption settings. For many use cases, the default settings will work well. However, for production implementations, you may desire to review these settings to line up with your organization’s security and compliance requirements.
  6. Choose Deploy to begin using the model.

    When the release is complete, you can test DeepSeek-R1’s abilities straight in the Amazon Bedrock playground.
  7. Choose Open in playground to access an interactive user interface where you can try out various prompts and change model parameters like temperature level and optimum length. When using R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat template for optimal results. For example, content for inference.

    This is an excellent way to explore the design’s thinking and text generation capabilities before incorporating it into your applications. The playground offers immediate feedback, assisting you comprehend how the model responds to numerous inputs and letting you tweak your prompts for optimal outcomes.

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

    Run inference utilizing guardrails with the released DeepSeek-R1 endpoint

    The following code example shows how to perform inference utilizing a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have produced the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime customer, configures reasoning parameters, and sends a request to produce text based on a user prompt.

    Deploy DeepSeek-R1 with SageMaker JumpStart

    SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML solutions that you can release with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models 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 provides 2 hassle-free techniques: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let’s explore both techniques to help you pick 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.
  8. First-time users will be triggered to produce a domain.
  9. On the SageMaker Studio console, pick JumpStart in the navigation pane.

    The design browser displays available models, with details like the service provider name and design capabilities.

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

    - Model name
  10. Provider name
  11. Task classification (for example, Text Generation). Bedrock Ready badge (if suitable), indicating that this design can be signed up with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to invoke the design

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

    The design 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 includes essential details, such as:

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

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, utilize the automatically created name or develop a custom one.
  15. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
  16. For Initial circumstances count, get in the variety of circumstances (default: 1). Selecting proper instance types and counts is vital for expense and performance optimization. Monitor your implementation 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 design, we strongly advise sticking to SageMaker JumpStart default settings and oeclub.org making certain that network seclusion remains in location.
  18. Choose Deploy to deploy the model.

    The implementation process can take several minutes to complete.

    When release is total, your endpoint status will alter to InService. At this point, the model is prepared to accept inference demands through the endpoint. You can keep track of the implementation progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is complete, you can invoke the design utilizing a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the essential AWS permissions and environment setup. The following is a detailed code example that shows how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for releasing the design is supplied in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run additional demands 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 develop a guardrail utilizing the Amazon Bedrock console or the API, and implement it as displayed in the following code:

    Clean up

    To prevent undesirable charges, finish the steps in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you released the model using Amazon Bedrock Marketplace, total the following actions:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace releases.
  19. In the Managed implementations area, find the endpoint you want to delete.
  20. Select the endpoint, and on the Actions menu, choose Delete.
  21. Verify the endpoint details to make certain you’re deleting the appropriate deployment: 1. Endpoint name.
  22. Model name.
  23. 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 wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we checked out 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 start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, wiki.dulovic.tech 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 helps emerging generative AI companies develop ingenious options utilizing AWS services and accelerated compute. Currently, he is concentrated on establishing strategies for fine-tuning and enhancing the reasoning performance of large language models. In his totally free time, Vivek takes pleasure in treking, watching films, and attempting various cuisines.

    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 Specialist Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker’s artificial intelligence and generative AI hub. She is enthusiastic about building solutions that assist consumers accelerate their AI journey and unlock company value.