DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
bridgettep4315 редагував цю сторінку 3 тижднів тому


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 release DeepSeek AI’s first-generation frontier design, DeepSeek-R1, in addition to the distilled versions ranging from 1.5 to 70 billion parameters to build, experiment, and properly scale your generative AI concepts on AWS.

In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled versions of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that utilizes support finding out to enhance reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential identifying function is its support learning (RL) step, which was used to fine-tune the model’s actions beyond the basic pre-training and tweak process. By including RL, DeepSeek-R1 can adjust more efficiently to user feedback and setiathome.berkeley.edu goals, ultimately enhancing both significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, meaning it’s equipped to break down intricate inquiries and reason through them in a detailed manner. This assisted reasoning procedure allows the model to produce more accurate, transparent, and detailed answers. This design combines RL-based fine-tuning with CoT abilities, aiming to generate structured actions while focusing on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has recorded the industry’s attention as a flexible text-generation design that can be integrated into different workflows such as representatives, logical thinking and information analysis tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion parameters, enabling efficient reasoning by routing queries to the most pertinent professional “clusters.” This approach enables the model to concentrate on different issue domains while maintaining overall performance. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize 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 models bring the reasoning abilities of the main R1 model to more efficient 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 sized, more efficient models to mimic the habits and reasoning patterns of the bigger DeepSeek-R1 model, using it as an instructor design.

You can deploy DeepSeek-R1 design 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 utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous content, and assess models against essential safety requirements. At the time of writing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce numerous guardrails tailored to different 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 examine if you have quotas for forum.pinoo.com.tr P5e, open the Service Quotas console and under AWS Services, pick 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 deploying. To request a limit boost, create a limit boost demand and reach out to your account group.

Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For guidelines, see Establish permissions to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to present safeguards, prevent damaging material, and assess models against essential security criteria. You can implement security measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine user inputs and model actions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing the console or the API. For the example code to develop 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 to the design for inference. After receiving the model’s output, another guardrail check is applied. If the output passes this final check, it’s returned as the 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 occurred at the input or output phase. The examples showcased in the following areas show inference 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, total 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 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 model.

    The design detail page supplies important details about the model’s abilities, rates structure, and execution guidelines. You can discover detailed usage guidelines, consisting of sample API calls and code snippets for integration. The model supports various text generation tasks, including material production, code generation, and question answering, utilizing its reinforcement discovering optimization and CoT thinking abilities. The page also includes release choices and licensing details to assist you start with DeepSeek-R1 in your applications.
  2. To start using DeepSeek-R1, choose 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 (in between 1-50 alphanumeric characters).
  4. For Variety of instances, go into a number of circumstances (between 1-100).
  5. For example type, select your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, you can configure sophisticated security and infrastructure settings, consisting of virtual personal cloud (VPC) networking, service function approvals, and file encryption settings. For most utilize cases, the default settings will work well. However, for production implementations, you may wish to examine these settings to line up with your company’s security and setiathome.berkeley.edu compliance requirements.
  6. Choose Deploy to start utilizing the design.

    When the implementation is total, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock playground.
  7. Choose Open in play ground to access an interactive interface where you can experiment with various prompts and change design criteria like temperature and maximum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, utilize DeepSeek’s chat template for ideal outcomes. For example, content for inference.

    This is an exceptional method to check out the model’s reasoning and text generation capabilities before integrating it into your applications. The play ground supplies instant feedback, assisting you understand how the design reacts to various inputs and letting you fine-tune your triggers for optimal results.

    You can rapidly test the model in the playground through the UI. However, to invoke the deployed design programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

    Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint

    The following code example demonstrates how to carry out inference using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop 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 actually developed the guardrail, use the following code to carry out guardrails. The script initializes the bedrock_runtime customer, configures inference criteria, and sends out a demand to create text based upon a user timely.

    Deploy DeepSeek-R1 with SageMaker JumpStart

    SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your data, and release them into production utilizing either the UI or SDK.

    Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 practical approaches: using the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let’s check out both techniques to help you pick the method that finest fits your needs.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

    Complete the following steps to deploy 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 model internet browser shows 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 design card shows essential details, consisting of:

    - Model name
  10. Provider name
  11. Task classification (for instance, Text Generation). Bedrock Ready badge (if appropriate), showing that this model can be registered 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 includes the following details:

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

    The About tab consists of essential details, such as:

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

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

    6. Choose Deploy to proceed with implementation.

    7. For Endpoint name, use the automatically produced name or produce a custom one.
  15. For example type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial circumstances count, go into the number of instances (default: 1). Selecting appropriate circumstances types and counts is crucial for expense and efficiency optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time inference is selected by default. This is enhanced 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 release the design.

    The implementation process can take several minutes to finish.

    When implementation is total, your endpoint status will change to InService. At this point, the design is ready to accept inference requests through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the release 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 get going 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 approvals and environment setup. The following is a detailed code example that demonstrates how to release and utilize DeepSeek-R1 for inference programmatically. The code for deploying the model 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 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 displayed in the following code:

    Clean up

    To avoid unwanted charges, complete the actions in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you deployed the model utilizing Amazon Bedrock Marketplace, complete the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
  19. In the Managed releases section, locate the endpoint you desire to erase.
  20. Select the endpoint, and on the Actions menu, pick Delete.
  21. Verify the endpoint details to make certain you’re erasing the proper deployment: 1. Endpoint name.
  22. Model name.
  23. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed 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 explored how you can access and deploy the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For pipewiki.org 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 wakewiki.de 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 companies construct ingenious solutions utilizing AWS services and sped up compute. Currently, he is concentrated on developing methods for fine-tuning and optimizing the reasoning performance of large language designs. In his leisure time, Vivek takes pleasure in hiking, viewing films, and trying different foods.

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

    Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker’s artificial intelligence and generative AI hub. She is passionate about developing services that help consumers accelerate their AI journey and unlock business worth.