1 DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart
wilfredalpert edited this page 2025-02-21 03:20:04 +08: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 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, together with the distilled variations ranging from 1.5 to 70 billion specifications 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 models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that utilizes support discovering to improve reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial identifying feature is its reinforcement learning (RL) action, which was utilized to fine-tune the model's actions beyond the standard pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adapt more successfully to user feedback and objectives, eventually enhancing both relevance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) technique, wavedream.wiki meaning it's geared up to break down complex questions and factor through them in a detailed way. This guided reasoning procedure enables the model to produce more precise, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT abilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has actually captured the market's attention as a flexible text-generation model that can be incorporated into various workflows such as agents, rational reasoning and data analysis 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, enabling effective reasoning by routing inquiries to the most relevant professional "clusters." This method permits the model to focus on different problem domains while maintaining general effectiveness. 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 instance to release the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning capabilities of the main R1 model to more effective architectures based on popular open designs like Qwen (1.5 B, 7B, 14B, wavedream.wiki and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more efficient models to imitate the habits and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as an instructor design.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend releasing this model with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, avoid damaging content, and examine designs against essential security criteria. At the time of writing this blog site, for wiki.snooze-hotelsoftware.de DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, you require access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and verify 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 boost, produce a limitation increase demand and reach out to your account group.

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) approvals to utilize Amazon Bedrock Guardrails. For guidelines, see Set up approvals to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to present safeguards, demo.qkseo.in prevent hazardous material, and examine designs against essential safety criteria. You can implement safety steps for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to assess user inputs and design reactions 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 create the guardrail, see the GitHub repo.

The general circulation involves 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 to the model for inference. After receiving the model's output, another guardrail check is applied. If the output passes this last check, it's returned as the final result. However, if either the input or output is stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following sections show reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, wiki.lafabriquedelalogistique.fr and specialized foundation designs (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 designs in the navigation pane. At the time of composing this post, you can use the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and select the DeepSeek-R1 design.

The design detail page supplies essential details about the model's abilities, rates structure, and execution standards. You can discover detailed use guidelines, consisting of sample API calls and code snippets for integration. The design supports numerous text generation tasks, consisting of content development, code generation, and question answering, using its support discovering optimization and CoT reasoning capabilities. The page likewise includes implementation options and licensing details to assist you get started with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, pick Deploy.

You will be prompted to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, enter an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of circumstances, go into a number of circumstances (between 1-100). 6. For Instance type, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can set up sophisticated security and infrastructure settings, including virtual private cloud (VPC) networking, service function approvals, setiathome.berkeley.edu and file encryption settings. For a lot of utilize cases, the default settings will work well. However, for production releases, you may wish to examine these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the implementation is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in play ground to access an interactive interface where you can explore various prompts and change model criteria like temperature level and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For example, content for inference.

This is an outstanding way to explore the design's thinking and text generation capabilities before integrating it into your applications. The play area supplies immediate feedback, helping you comprehend how the to various inputs and letting you tweak your triggers for ideal results.

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

Run reasoning utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to carry out inference using 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 actually developed the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up inference specifications, and sends a demand to generate 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 just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart provides two practical methods: using the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you choose the approach that best fits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to release DeepSeek-R1 using SageMaker JumpStart:

1. On the SageMaker console, choose Studio in the navigation pane. 2. First-time users will be triggered to create a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

The design web browser shows available designs, with details like the provider name and model abilities.

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

- Model name

  • Provider name
  • Task category (for instance, Text Generation). Bedrock Ready badge (if suitable), showing that this design can be signed up 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 consists of the following details:

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

    The About tab includes crucial details, such as:

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

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, utilize the automatically produced name or produce a customized one.
  1. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the number of instances (default: 1). Selecting proper circumstances types and counts is vital for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time inference is chosen by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this model, we highly advise adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the design.

    The release procedure can take several minutes to complete.

    When deployment is total, your endpoint status will change to InService. At this point, the design is all set to accept inference demands through the endpoint. You can keep an eye on the implementation development on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the implementation is total, you can invoke the model utilizing a SageMaker runtime customer and integrate 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 essential AWS permissions and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for releasing the design is offered in the Github here. You can clone the note pad 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 utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and implement it as displayed in the following code:

    Tidy up

    To avoid unwanted 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, total the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
  5. In the Managed implementations area, locate the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, select 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 design you deployed will sustain costs 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 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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 services using AWS services and sped up calculate. Currently, he is focused on establishing methods for fine-tuning and optimizing the inference efficiency of large language designs. In his totally free time, Vivek takes pleasure in hiking, watching films, and attempting various foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location 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 team at AWS.

    Banu Nagasundaram leads item, engineering, bio.rogstecnologia.com.br and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about developing options that help customers accelerate their AI journey and unlock business worth.