1 DeepSeek R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
katharinaault8 урећивао ову страницу пре 2 дана


Today, wiki.whenparked.com 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 model, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion criteria to develop, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to release the distilled variations of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that uses reinforcement finding out to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A key differentiating feature is its reinforcement knowing (RL) action, which was used to improve the model’s actions beyond the standard pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, meaning it’s equipped to break down complicated inquiries and factor through them in a detailed way. This assisted thinking process enables the model to produce more accurate, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually recorded the market’s attention as a versatile text-generation model that can be integrated into numerous workflows such as agents, rational thinking and data analysis tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion specifications, allowing effective inference by routing queries to the most pertinent expert “clusters.” This technique permits the design to concentrate on different issue domains while maintaining general efficiency. 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 circumstances to deploy the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 model to more effective architectures based on popular open models like Qwen (1.5 B, 7B, 14B, wiki.asexuality.org and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more effective models to mimic the behavior and thinking patterns of the bigger DeepSeek-R1 design, using it as a teacher design.

You can deploy DeepSeek-R1 design 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, we will use Amazon Bedrock Guardrails to present safeguards, prevent hazardous material, and examine designs against essential security criteria. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce several guardrails tailored to different use cases and use them to the DeepSeek-R1 design, enhancing 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 circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify you’re utilizing 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 limitation increase, develop a limitation 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 directions, see Set up approvals to utilize guardrails for content .

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, prevent hazardous material, and evaluate designs against key security requirements. You can implement precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and model responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing 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 actions: First, the system receives 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 model for inference. After getting 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 indicating the nature of the intervention and whether it took place at the input or output stage. The examples showcased in the following sections demonstrate inference utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides 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, select Model brochure under Foundation designs in the navigation pane. At the time of composing this post, you can use the InvokeModel API to conjure up 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 model.

    The design detail page provides essential details about the model’s abilities, rates structure, and implementation guidelines. You can discover detailed use guidelines, including sample API calls and code snippets for combination. The model supports various text generation tasks, consisting of content production, code generation, and question answering, utilizing its reinforcement discovering optimization and CoT thinking capabilities. The page likewise consists of release options and licensing details to help you get going with DeepSeek-R1 in your applications.
  2. To begin utilizing 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 (in between 1-50 alphanumeric characters).
  4. For Number of instances, go into a variety of circumstances (in 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 facilities settings, including virtual private cloud (VPC) networking, service role permissions, and encryption settings. For a lot of use cases, the default settings will work well. However, for production deployments, you might desire to evaluate these settings to align with your company’s security and compliance requirements.
  6. Choose Deploy to start using the model.

    When the release is total, you can evaluate DeepSeek-R1’s abilities straight in the Amazon Bedrock play ground.
  7. Choose Open in play ground to access an interactive user interface where you can try out various triggers and adjust design parameters like temperature level and maximum length. When utilizing R1 with Bedrock’s InvokeModel and Playground Console, use DeepSeek’s chat template for optimum results. For instance, content for reasoning.

    This is an excellent way to check out the model’s thinking and text generation capabilities before incorporating it into your applications. The playground provides instant feedback, assisting you comprehend how the model reacts to different inputs and letting you tweak your triggers for optimal results.

    You can quickly evaluate the model in the play ground through the UI. However, to invoke the deployed design 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 carry out inference utilizing a released DeepSeek-R1 model 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 developed the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime customer, sets up inference criteria, surgiteams.com and sends out a demand to create 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 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 using either the UI or SDK.

    Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical methods: it-viking.ch using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let’s explore both methods to assist you pick the method that finest suits your needs.

    Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

    The design browser displays available designs, with details like the supplier name and design capabilities.

    4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card. Each model card shows essential details, including:

    - 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, allowing 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 consists of 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 includes crucial details, such as:

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

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

    6. Choose Deploy to continue with release.

    7. For Endpoint name, utilize the automatically produced name or create a custom one.
  15. For Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  16. For Initial instance count, enter the number of instances (default: 1). Selecting proper instance types and counts is vital for expense and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is optimized for sustained traffic and low latency.
  17. Review all configurations for accuracy. For this model, we strongly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  18. Choose Deploy to release the model.

    The release process can take numerous minutes to complete.

    When release is complete, your endpoint status will change to InService. At this moment, the design is prepared to accept reasoning demands through the endpoint. You can monitor the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the release is total, you can invoke the model utilizing a SageMaker runtime client and integrate 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 approvals and environment setup. The following is a detailed code example that demonstrates how to release and use DeepSeek-R1 for inference programmatically. The code for deploying the model is provided in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

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

    Tidy up

    To avoid unwanted charges, finish the steps in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

    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 deployments.
  19. In the Managed implementations area, find the endpoint you desire to erase.
  20. Select the endpoint, and on the Actions menu, select Delete.
  21. Verify the endpoint details to make certain you’re erasing the appropriate release: 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 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 model 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 Starting 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 construct innovative solutions using AWS services and accelerated calculate. Currently, he is concentrated on developing techniques for forum.altaycoins.com fine-tuning and enhancing the inference performance of large language models. In his spare time, Vivek takes pleasure in hiking, enjoying movies, and attempting 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 Science and Bioinformatics.

    Jonathan Evans is a Professional Solutions Architect working on 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 assist consumers accelerate their AI journey and unlock company value.
上海开阖软件有限公司 沪ICP备12045867号-1