Clone
1
DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
cyrilglv267207 edited this page 2025-02-07 03:55:40 +11:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


Today, we are delighted to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, systemcheck-wiki.de you can now deploy DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion parameters to develop, experiment, and responsibly scale your generative AI concepts on AWS.


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


Overview of DeepSeek-R1


DeepSeek-R1 is a big language design (LLM) established by DeepSeek AI that uses reinforcement finding out to improve thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential differentiating function is its reinforcement learning (RL) step, which was utilized to refine the model's responses beyond the standard pre-training and tweak procedure. By including RL, archmageriseswiki.com DeepSeek-R1 can adapt more efficiently to user feedback and objectives, ultimately boosting both significance and gratisafhalen.be clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, implying it's equipped to break down complicated queries and reason through them in a detailed way. This assisted thinking procedure permits the model to produce more accurate, transparent, and detailed answers. This design integrates 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 caught the market's attention as a versatile text-generation model that can be integrated into different workflows such as representatives, sensible reasoning and information interpretation jobs.


DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion specifications, allowing effective reasoning by routing queries to the most relevant expert "clusters." This technique enables the design to concentrate on different issue domains while maintaining overall efficiency. DeepSeek-R1 requires 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 release the model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.


DeepSeek-R1 distilled models bring the thinking capabilities 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). a process of training smaller sized, more effective models to simulate the habits and reasoning patterns of the bigger DeepSeek-R1 design, utilizing 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 advise releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, avoid damaging material, and examine designs against key safety requirements. At the time of composing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create multiple guardrails tailored to various usage cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls throughout your generative AI applications.


Prerequisites


To release the DeepSeek-R1 design, 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, choose Amazon SageMaker, and verify you're utilizing 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 request a limitation increase, develop a limitation increase request and reach out to your account group.


Because you will be releasing this design 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 directions, see Set up permissions to utilize guardrails for content filtering.


Implementing guardrails with the ApplyGuardrail API


Amazon Bedrock Guardrails permits you to introduce safeguards, prevent damaging content, and examine designs against key security requirements. You can implement security steps for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and model reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.


The general circulation includes the following steps: First, the system gets 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 inference. After receiving the design's output, engel-und-waisen.de 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 stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it took place 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 foundation designs (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 writing this post, you can utilize the InvokeModel API to conjure up the model. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a company and pick the DeepSeek-R1 model.


The model detail page offers essential details about the design's capabilities, prices structure, and implementation guidelines. You can find detailed use guidelines, consisting of sample API calls and code bits for combination. The model supports numerous text generation tasks, consisting of content production, code generation, and question answering, using its support discovering optimization and CoT thinking abilities.
The page likewise includes implementation alternatives and licensing details to assist you get going with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, select Deploy.


You will be prompted to configure the deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of instances, get in a number of circumstances (between 1-100).
6. For example type, pick your circumstances type. For optimum performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can configure advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service role permissions, and encryption settings. For a lot of use cases, the default settings will work well. However, for production releases, you might desire to evaluate these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to start utilizing the model.


When the implementation is total, you can test DeepSeek-R1's abilities straight in the Amazon Bedrock play area.
8. Choose Open in playground to access an interactive interface where you can explore various triggers and change design parameters like temperature and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum results. For example, material for inference.


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


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


Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint


The following code example shows how to carry out inference using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. 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. After you have developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, sets up inference specifications, and sends a demand to create text based upon 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 services that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and deploy them into production using either the UI or SDK.


Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 hassle-free methods: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you pick the approach that best matches your needs.


Deploy DeepSeek-R1 through SageMaker JumpStart UI


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


1. On the SageMaker console, pick Studio in the navigation pane.
2. First-time users will be prompted to develop a domain.
3. 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 model capabilities.


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


- Model name

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


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


    The model details page includes the following details:


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


    The About tab includes essential details, such as:


    - Model description.
  • License details.
  • Technical specifications.
  • Usage standards


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


    6. Choose Deploy to continue with deployment.


    7. For Endpoint name, utilize the instantly produced name or create a customized one.
  1. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, get in the variety of circumstances (default: 1).
    Selecting proper instance types and counts is crucial for expense and performance optimization. Monitor your deployment 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.
  3. Review all configurations for precision. For this design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. 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 moment, the model is prepared to accept reasoning requests through the endpoint. You can monitor the release development on the SageMaker console Endpoints page, which will show pertinent metrics and links.gtanet.com.br status details. When the deployment 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 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS authorizations and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for wiki.myamens.com reasoning programmatically. The code for releasing the model is supplied in the Github here. You can clone the note pad and run from SageMaker Studio.


    You can run additional requests against the predictor:


    Implement guardrails and run inference with your SageMaker JumpStart predictor


    Similar to Amazon Bedrock, you can likewise 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 tidy up your resources.


    Delete the Amazon Bedrock Marketplace deployment


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


    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace deployments.
  5. In the Managed deployments area, find the endpoint you want to delete.
  6. Select the endpoint, and on the Actions menu, trademarketclassifieds.com pick Delete.
  7. Verify the endpoint details to make certain you're deleting the proper implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status


    Delete the SageMaker JumpStart predictor


    The SageMaker JumpStart model you released 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 deploy the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get started. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, 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 build ingenious options using AWS services and accelerated compute. Currently, he is concentrated on developing techniques for fine-tuning and optimizing the inference performance of large language models. In his complimentary time, Vivek takes pleasure in hiking, viewing motion pictures, and attempting different cuisines.


    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team 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 Professional Solutions Architect working on generative AI with the Third-Party Model Science team at AWS.


    Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is enthusiastic about developing services that help customers accelerate their AI journey and unlock organization worth.