Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P
picp
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 54
    • Issues 54
    • 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
  • Alina Madrigal
  • picp
  • Issues
  • #19

Closed
Open
Opened Feb 28, 2025 by Alina Madrigal@alinamadrigal
  • Report abuse
  • New issue
Report abuse New issue

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


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, you can now release DeepSeek AI's first-generation frontier design, DeepSeek-R1, together with the distilled versions varying from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative AI ideas on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) developed by DeepSeek AI that utilizes reinforcement learning to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial distinguishing feature is its support learning (RL) action, which was utilized to refine the design's reactions beyond the standard pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately boosting both importance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, suggesting it's equipped to break down intricate questions and factor through them in a detailed manner. This guided thinking process enables the design to produce more precise, transparent, and wiki.myamens.com detailed responses. This design combines RL-based fine-tuning with CoT capabilities, aiming to create structured actions while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has caught the market's attention as a flexible text-generation model that can be integrated into numerous workflows such as agents, sensible thinking and data analysis tasks.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion specifications, enabling efficient inference by routing inquiries to the most relevant specialist "clusters." This approach enables the design to specialize in various problem domains while maintaining total effectiveness. DeepSeek-R1 needs 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 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 efficient architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller, more efficient models to simulate the behavior and thinking patterns of the larger DeepSeek-R1 model, 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 suggest releasing this design with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, prevent hazardous content, and evaluate designs against essential security criteria. At the time of composing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop several guardrails tailored to various usage cases and use them to the DeepSeek-R1 design, 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 inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and confirm 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 limitation increase, create a limit 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 right AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For guidelines, see Set up authorizations to use guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent harmful material, and evaluate designs against crucial safety criteria. You can implement precaution for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For systemcheck-wiki.de the example code to create the guardrail, see the GitHub repo.

The general circulation includes the following steps: 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 model'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 indicating the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following areas demonstrate reasoning 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, select Model catalog 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 does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a service provider and pick the DeepSeek-R1 model.

The design detail page provides necessary details about the model's capabilities, pricing structure, and execution guidelines. You can find detailed use instructions, including sample API calls and code bits for combination. The design supports numerous text generation jobs, consisting of material development, code generation, and concern answering, using its support discovering optimization and CoT thinking capabilities. The page likewise consists of deployment choices and licensing details to help you get started with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, pick Deploy.

You will be prompted to set up the release details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters). 5. For Variety of circumstances, go into a variety of circumstances (between 1-100). 6. For Instance type, choose your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can configure innovative security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function authorizations, and file encryption settings. For many utilize cases, the default settings will work well. However, for production releases, you might wish to examine these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to begin 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 user interface where you can explore various triggers and adjust model specifications like temperature and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For instance, content for reasoning.

This is an exceptional method to explore the model's thinking and text generation capabilities before integrating it into your applications. The play area provides instant feedback, assisting you understand wakewiki.de how the model reacts to various inputs and letting you fine-tune your triggers for optimum outcomes.

You can quickly evaluate the model in the playground through the UI. However, wavedream.wiki to invoke the released model 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 shows how to perform reasoning utilizing a released DeepSeek-R1 model through Amazon Bedrock using 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 produced the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up inference parameters, and sends out a request to create text based upon 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 release with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and release them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart uses two hassle-free methods: utilizing the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both techniques to assist you select the technique that finest matches your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

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

- Model name - Provider name

  • Task classification (for example, Text Generation). Bedrock Ready badge (if relevant), suggesting that this design can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to conjure up the design

    5. Choose the to view the model details page.

    The model details page consists of the following details:

    - The model name and company 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 guidelines

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

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, utilize the immediately produced name or create 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 suitable instance types and counts is essential for cost and performance optimization. Monitor your release to change these settings as needed.Under Inference type, Real-time reasoning is selected by default. This is optimized for hb9lc.org sustained traffic and low latency.
  3. Review all configurations for precision. For this design, we highly suggest adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to release the design.

    The deployment 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 reasoning demands through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the release is complete, 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 begin with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the necessary AWS consents and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for reasoning programmatically. The code for deploying the model is offered in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run additional demands 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 produce a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:

    Tidy up

    To avoid undesirable charges, finish the actions in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

    If you released the design utilizing Amazon Bedrock Marketplace, it-viking.ch complete the following actions:

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

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you released will sustain costs 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, wiki.asexuality.org 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 get begun. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, 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 helps emerging generative AI companies construct ingenious solutions utilizing AWS services and sped up calculate. Currently, he is concentrated on developing strategies for fine-tuning and enhancing the reasoning efficiency of big language models. In his downtime, Vivek takes pleasure in treking, enjoying motion pictures, and trying different 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 working on generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads item, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is enthusiastic about developing options that help customers 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: alinamadrigal/picp#19