Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
L lovn-1world
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
Collapse sidebar
  • Demetria Hayner
  • lovn-1world
  • Issues
  • #1

Closed
Open
Created Feb 21, 2025 by Demetria Hayner@demetriavsh508Maintainer

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


Today, we are thrilled to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek AI's first-generation frontier design, DeepSeek-R1, along with the distilled versions ranging from 1.5 to 70 billion specifications 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 variations of the designs also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that uses reinforcement finding out to enhance thinking capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial identifying function is its support learning (RL) step, which was used to refine the design's responses beyond the basic pre-training and fine-tuning procedure. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately improving both importance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, meaning it's equipped to break down intricate queries and factor through them in a detailed manner. This directed reasoning procedure allows the design to produce more precise, transparent, and detailed answers. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually caught the market's attention as a flexible text-generation design that can be incorporated into various workflows such as representatives, sensible reasoning and information analysis jobs.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture allows activation of 37 billion parameters, allowing effective reasoning by routing queries to the most appropriate expert "clusters." This method enables the design to focus on various problem domains while maintaining total efficiency. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning abilities 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). Distillation describes a process of training smaller, more effective models to imitate the behavior and thinking patterns of the larger DeepSeek-R1 design, utilizing it as an instructor design.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing this model with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent harmful content, and assess designs against key safety requirements. At the time of composing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and wiki.whenparked.com Bedrock Marketplace, surgiteams.com Bedrock Guardrails supports only the ApplyGuardrail API. You can create numerous guardrails tailored to various use cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you need access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas console and wavedream.wiki under AWS Services, pick Amazon SageMaker, and confirm 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 increase, create a limitation boost demand and connect to your account group.

Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) permissions to utilize Amazon Bedrock Guardrails. For instructions, see Set up permissions to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails enables you to introduce safeguards, avoid damaging material, and evaluate designs against essential security requirements. You can implement precaution for wiki.whenparked.com the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to assess user inputs and model actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.

The basic flow 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 out to the design for inference. After receiving 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 stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it occurred at the input or output stage. 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, oeclub.org and specialized structure 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 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 doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a company and select the DeepSeek-R1 model.

The design detail page supplies vital details about the model's abilities, rates structure, and execution standards. You can discover detailed use instructions, including sample API calls and code bits for combination. The design supports numerous text generation tasks, including material creation, code generation, and question answering, using its reinforcement discovering optimization and CoT reasoning abilities. The page likewise consists of release options and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. 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. 4. For larsaluarna.se Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Number of instances, enter a number of circumstances (in between 1-100). 6. For example type, pick your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can configure innovative security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service role approvals, and encryption settings. For most utilize cases, the default settings will work well. However, for production deployments, you might wish to evaluate these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to begin using the model.

When the deployment is complete, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock playground. 8. Choose Open in play ground to access an interactive user interface where you can explore various prompts and adjust model criteria like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For example, content for inference.

This is an outstanding 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 different inputs and letting you fine-tune your prompts for optimum results.

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

Run reasoning using guardrails with the released DeepSeek-R1 endpoint

The following code example demonstrates how to perform inference using a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. 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. After you have developed the guardrail, utilize the following code to execute guardrails. The script initializes the bedrock_runtime customer, configures reasoning criteria, and sends out a demand to produce text based upon a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML options that you can deploy with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models 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 two convenient approaches: utilizing the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both approaches to assist you pick the approach that best matches your requirements.

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

The design browser shows available models, with details like the company name and model capabilities.

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

- Model name - Provider name

  • (for instance, Text Generation). Bedrock Ready badge (if relevant), 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 model card to view the design details page.

    The design details page consists of the following details:

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

    The About tab includes crucial details, such as:

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

    Before you deploy the model, it's advised to review 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 instantly produced name or develop a custom one.
  1. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the variety of circumstances (default: 1). Selecting proper instance types and counts is essential for expense and efficiency 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.
  3. Review all configurations for precision. For this model, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the model.

    The release procedure can take numerous minutes to finish.

    When release is complete, your endpoint status will change to InService. At this moment, the design is ready to accept reasoning requests through the endpoint. You can keep track of the deployment progress on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the deployment is complete, you can invoke the design utilizing a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the necessary AWS permissions and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for inference programmatically. The code for releasing the model is supplied in the Github here. You can clone the notebook and range from SageMaker Studio.

    You can run extra demands against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can likewise 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:

    Clean up

    To prevent undesirable charges, complete the steps in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
  5. In the Managed deployments area, locate the endpoint you desire to erase.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're erasing the proper 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 desire 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 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, 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 innovative services using AWS services and sped up calculate. Currently, he is focused on developing techniques for fine-tuning and enhancing the inference efficiency of big language models. In his spare time, Vivek delights in hiking, watching 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 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 product, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is passionate about developing services that help clients accelerate their AI journey and unlock organization worth.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking