DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
arnoldohalvors이(가) 1 개월 전에 이 페이지를 수정함


Today, we are excited 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 design, DeepSeek-R1, together with the distilled variations ranging from 1.5 to 70 billion parameters to develop, experiment, and responsibly scale your generative AI ideas on AWS.

In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled versions of the designs also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that uses support learning to boost thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A key differentiating function is its support knowing (RL) step, which was used to fine-tune the design’s responses beyond the standard pre-training and fine-tuning process. By including RL, DeepSeek-R1 can adapt better to user feedback and goals, ultimately enhancing both importance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, meaning it’s equipped to break down intricate inquiries and reason through them in a detailed way. This assisted thinking process permits the model to produce more accurate, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT capabilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has caught the market’s attention as a versatile text-generation design that can be integrated into various workflows such as agents, sensible thinking and data interpretation jobs.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion criteria, making it possible for effective inference by routing inquiries to the most appropriate specialist “clusters.” This technique permits the design to focus on various issue domains while maintaining overall performance. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning abilities 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 habits and thinking patterns of the larger DeepSeek-R1 model, using it as a teacher design.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend releasing this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid hazardous material, and assess models against key safety requirements. At the time of composing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you require access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick 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 deploying. To ask for a limit increase, create a limit increase demand 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) consents to utilize Amazon Bedrock Guardrails. For instructions, see Set up approvals to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to present safeguards, prevent hazardous material, and evaluate models against crucial safety requirements. You can implement precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and design responses released 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 involves the following steps: 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 to the design for reasoning. After receiving the design’s output, another guardrail check is applied. If the output passes this final check, it’s returned as the final outcome. However, if either the input or output is intervened 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 show reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, and specialized foundation models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:

1. On the Amazon Bedrock console, pick Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to invoke the design. It doesn’t support Converse APIs and other Amazon Bedrock tooling.

  1. Filter for DeepSeek as a provider and pick the DeepSeek-R1 design.

    The model detail page provides essential details about the design’s capabilities, rates structure, and implementation guidelines. You can discover detailed use guidelines, including sample API calls and code snippets for combination. The design supports numerous text generation jobs, including material development, code generation, and question answering, utilizing its support finding out optimization and CoT reasoning abilities. The page likewise consists of release options and licensing details to assist you get going with DeepSeek-R1 in your applications.
  2. To begin DeepSeek-R1, pick Deploy.

    You will be prompted to configure the deployment details for DeepSeek-R1. The design ID will be pre-populated.
  3. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
  4. For Variety of instances, enter a variety of instances (between 1-100).
  5. For example type, pick your instance type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can set up innovative security and infrastructure settings, including virtual private 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 implementations, setiathome.berkeley.edu you might desire 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 total, you can evaluate DeepSeek-R1’s capabilities straight in the Amazon Bedrock play area.
  7. Choose Open in playground to access an interactive interface where you can try out different triggers and change model specifications like temperature level and optimum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, utilize DeepSeek’s chat template for optimum outcomes. For instance, content for reasoning.

    This is an exceptional way to check out the design’s thinking and text generation capabilities before integrating it into your applications. The playground supplies instant feedback, assisting you comprehend how the design reacts to various inputs and letting you tweak your triggers for optimal results.

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

    Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint

    The following code example shows how to perform inference using a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to create 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 reasoning parameters, and sends out a request to produce text based on a user prompt.

    Deploy DeepSeek-R1 with SageMaker JumpStart

    SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML services 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 deploy them into production using either the UI or SDK.

    Deploying DeepSeek-R1 design through SageMaker JumpStart offers two practical approaches: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let’s explore both techniques to assist you choose the technique that best fits your requirements.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

    Complete the following actions to release DeepSeek-R1 utilizing 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 design browser displays available models, with details like the service provider name and design capabilities.

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

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

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

    The design details page consists of 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 consists of important details, such as:

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

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

    6. Choose Deploy to proceed with implementation.

    7. For pipewiki.org Endpoint name, utilize the automatically generated name or produce a customized one.
  15. For example type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial circumstances count, enter the variety of circumstances (default: 1). Selecting appropriate circumstances types and counts is crucial for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time inference is picked by default. This is optimized for sustained traffic and low latency.
  17. Review all setups for precision. For this design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  18. Choose Deploy to release the design.

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

    When implementation is total, your endpoint status will alter to InService. At this moment, the model is ready to accept reasoning requests through the endpoint. You can keep an eye on the release progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is complete, you can conjure up the model utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get started with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the needed AWS permissions and environment setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the design is offered in the Github here. You can clone the notebook and run 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 also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail using the Amazon Bedrock console or the API, and implement it as revealed 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 released the model utilizing Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace implementations.
  19. In the Managed deployments section, locate the endpoint you desire to delete.
  20. Select the endpoint, and on the Actions menu, select Delete.
  21. Verify the endpoint details to make certain you’re erasing the proper implementation: 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 wish 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 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and classificados.diariodovale.com.br Getting going with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI business develop innovative solutions utilizing AWS services and sped up calculate. Currently, he is focused on establishing methods for fine-tuning and optimizing the reasoning performance of big language models. In his free time, Vivek delights in treking, watching motion pictures, and trying different 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 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 engel-und-waisen.de generative AI center. She is passionate about constructing solutions that help customers accelerate their AI journey and unlock service worth.