Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
W
webloadedsolutions
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 30
    • Issues 30
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Antoine Turpin
  • webloadedsolutions
  • Issues
  • #25

Closed
Open
Opened Apr 03, 2025 by Antoine Turpin@antoineturpin
  • Report abuse
  • New issue
Report abuse New issue

DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart


Today, we are thrilled to announce that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek AI's first-generation frontier model, DeepSeek-R1, together with the distilled variations 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 get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to deploy the distilled variations of the models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that uses support discovering to boost thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential distinguishing function is its reinforcement learning (RL) step, which was utilized to fine-tune the design's actions beyond the basic pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adjust more successfully to user feedback and goals, ultimately enhancing both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, indicating it's geared up to break down intricate inquiries and factor through them in a detailed manner. This assisted reasoning process allows the design to produce more precise, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, 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 incorporated into various workflows such as representatives, logical reasoning and information interpretation jobs.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion parameters, trademarketclassifieds.com making it possible for effective inference by routing inquiries to the most appropriate professional "clusters." This method permits the design to specialize in different problem domains while maintaining overall effectiveness. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge circumstances to deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 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 models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller, more efficient models to imitate the behavior and thinking patterns of the larger DeepSeek-R1 model, using it as an instructor design.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend deploying this design with guardrails in place. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent harmful content, and assess designs against key security requirements. At the time of composing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various use cases and apply them to the DeepSeek-R1 model, enhancing 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 examine if you have quotas for P5e, open the Service Quotas console and hb9lc.org under AWS Services, choose 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 instance in the AWS Region you are releasing. To request a limitation increase, develop a limit boost demand and connect to your account team.

Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and it-viking.ch Gain Access To Management (IAM) consents to utilize Amazon Bedrock Guardrails. For directions, see Set up approvals to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent damaging material, and assess models against essential safety requirements. You can implement security steps for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and model reactions deployed 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 produce the guardrail, see the GitHub repo.

The general flow includes 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 surgiteams.com reasoning. After getting the design's output, another guardrail check is applied. If the output passes this last 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 stage. The examples showcased in the following areas show inference using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace gives 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, choose Model brochure under Foundation models in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to invoke the model. It does not support Converse APIs and raovatonline.org other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and choose the DeepSeek-R1 design.

The model detail page supplies essential details about the design's capabilities, pricing structure, and application guidelines. You can discover detailed usage instructions, consisting of sample API calls and code bits for integration. The design supports numerous text generation tasks, including material development, code generation, and concern answering, utilizing its support finding out optimization and CoT thinking abilities. The page likewise includes deployment options and licensing details to help you begin with DeepSeek-R1 in your applications. 3. To begin using DeepSeek-R1, select Deploy.

You will be prompted to set up 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 Variety of instances, go into a variety of instances (between 1-100). 6. For example type, select your . For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can configure innovative security and facilities settings, including virtual personal cloud (VPC) networking, service function authorizations, and encryption settings. For many utilize cases, the default settings will work well. However, for production deployments, you may desire to review these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to begin using the design.

When the implementation is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can experiment with various triggers 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 optimum outcomes. For instance, material for inference.

This is an exceptional way to check out the design's thinking and text generation capabilities before incorporating it into your applications. The play area supplies immediate feedback, assisting you comprehend how the design reacts to different inputs and letting you tweak your prompts for optimum outcomes.

You can rapidly check the design 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 released DeepSeek-R1 endpoint

The following code example demonstrates how to carry out reasoning using a deployed DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. 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. After you have actually produced the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime client, sets up inference parameters, and sends out a demand 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 solutions that you can deploy with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and christianpedia.com deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart provides 2 hassle-free approaches: surgiteams.com using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you pick the technique that finest suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model web browser displays available designs, with details like the company name and model abilities.

4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card. Each design card shows crucial details, including:

- Model name

  • Provider name
  • Task category (for example, Text Generation). Bedrock Ready badge (if applicable), showing that this design can be signed up with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to conjure up the design

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

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

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

    Before you release the design, it's recommended to evaluate the model details and license terms to verify compatibility with your use case.

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, use the automatically produced name or create a custom one.
  1. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, go into the variety of circumstances (default: 1). Selecting appropriate instance types and counts is important for expense and performance optimization. Monitor your deployment to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for precision. For this model, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the design.

    The release procedure can take numerous minutes to complete.

    When implementation is complete, your endpoint status will alter to InService. At this moment, the model is all set to accept inference demands through the endpoint. You can monitor the implementation progress on the SageMaker console Endpoints page, which will display appropriate metrics and status details. When the release is complete, you can conjure up the model using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the necessary AWS permissions and environment setup. The following is a detailed code example that demonstrates how to release and utilize DeepSeek-R1 for reasoning programmatically. The code for deploying the model is offered in the Github here. You can clone the notebook and run from SageMaker Studio.

    You can run extra demands against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can also use 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 shown in the following code:

    Clean up

    To prevent unwanted charges, complete the steps in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace deployment

    If you deployed the model using Amazon Bedrock Marketplace, total the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace releases.
  5. In the Managed releases area, find the endpoint you wish to delete.
  6. Select the endpoint, and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting the right deployment: 1. Endpoint name.
  8. Model name.
  9. 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 want 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 using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. 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 Getting started with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies develop ingenious services using AWS services and sped up compute. Currently, he is concentrated on developing techniques for fine-tuning and optimizing the inference efficiency of large language designs. In his totally free time, Vivek takes pleasure in treking, viewing motion pictures, and attempting various foods.

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

    Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about constructing solutions that help clients accelerate their AI journey and unlock organization value.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: antoineturpin/webloadedsolutions#25