Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R rozgar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 60
    • Issues 60
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Amelia Orsini
  • rozgar
  • Issues
  • #22

Closed
Open
Created Feb 28, 2025 by Amelia Orsini@ameliaorsini28Maintainer

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


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, in addition to the distilled variations varying from 1.5 to 70 billion parameters to construct, 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 deploy the distilled variations of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that utilizes support discovering to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base structure. An essential distinguishing function is its reinforcement knowing (RL) step, which was utilized to improve the model's responses beyond the standard pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt more efficiently to user feedback and objectives, eventually enhancing both importance and clarity. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, implying it's geared up to break down intricate questions and factor through them in a detailed manner. This directed reasoning process permits the design to produce more precise, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT abilities, aiming to generate structured actions while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually captured the market's attention as a flexible text-generation model that can be integrated into numerous workflows such as representatives, rational thinking and data analysis jobs.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion criteria, allowing efficient inference by routing inquiries to the most appropriate professional "clusters." This method enables the design to concentrate on different problem domains while maintaining general efficiency. DeepSeek-R1 requires a minimum of 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 features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 model 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 simulate the behavior and thinking patterns of the bigger DeepSeek-R1 model, using it as a teacher model.

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend releasing this design with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and assess models against key safety criteria. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce several 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 deploy the DeepSeek-R1 model, you need access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, select 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 circumstances in the AWS Region you are releasing. To request a limitation boost, create a limitation increase demand and connect to your account team.

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) authorizations to utilize Amazon Bedrock Guardrails. For guidelines, see Set up permissions to use guardrails for content .

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent hazardous material, and assess designs against crucial security criteria. You can execute safety measures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to examine user inputs and model reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo.

The basic flow involves the following actions: 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 model's output, another guardrail check is applied. If the output passes this final check, it's returned as the final outcome. However, if either the input or output is stepped in by the guardrail, a message is returned indicating the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following sections demonstrate inference utilizing 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 actions:

1. On the Amazon Bedrock console, select Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can use the InvokeModel API to conjure up the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.

The design detail page offers necessary details about the design's capabilities, prices structure, and implementation standards. You can discover detailed use guidelines, including sample API calls and code snippets for integration. The model supports different text generation tasks, consisting of material production, code generation, and concern answering, using its support finding out optimization and CoT reasoning capabilities. The page also consists of release alternatives and licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing 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 trademarketclassifieds.com Endpoint name, pipewiki.org go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Number of instances, go into a number of instances (between 1-100). 6. For Instance type, select your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended. Optionally, you can configure sophisticated security and infrastructure settings, including virtual personal cloud (VPC) networking, service function approvals, and file encryption settings. For many use cases, the default settings will work well. However, for production implementations, you might 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 deployment is total, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play area. 8. Choose Open in playground to access an interactive interface where you can try out different triggers and adjust design parameters like temperature level and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum outcomes. For example, content for reasoning.

This is an exceptional way to explore the model's reasoning and text generation abilities before incorporating it into your applications. The play area supplies instant feedback, helping you comprehend how the model responds to numerous inputs and letting you fine-tune your prompts for optimum outcomes.

You can rapidly test the design in the play area through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.

Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint

The following code example demonstrates how to perform inference utilizing a released DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can create a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have actually created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, sets up inference parameters, and sends a request to create text based on a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML options 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 data, and release them into production using either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 convenient approaches: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both approaches to help you choose the approach that finest matches your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions 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, pick JumpStart in the navigation pane.

The model internet browser displays available models, with details like the supplier name and model abilities.

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

- Model name

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

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

    The model details page consists of the following details:

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

    The About tab includes essential details, such as:

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

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

    6. Choose Deploy to continue with release.

    7. For Endpoint name, utilize the immediately created name or create a customized one.
  1. For Instance type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the number of circumstances (default: 1). Selecting suitable instance 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 selected by default. This is optimized 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 location.
  4. Choose Deploy to deploy the design.

    The release procedure can take a number of minutes to finish.

    When implementation is total, your endpoint status will change to InService. At this moment, the model is ready to accept inference demands through the endpoint. You can keep an eye on the deployment progress on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is complete, you can invoke the design using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get begun 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 consents and environment setup. The following is a detailed code example that demonstrates how to release and utilize DeepSeek-R1 for inference programmatically. The code for deploying the model is supplied 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 likewise utilize 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 revealed 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 implementation

    If you released the design using Amazon Bedrock Marketplace, complete the following steps:

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace implementations.
  5. In the Managed releases section, locate the endpoint you wish to erase.
  6. Select the endpoint, and on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting the proper release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart model you deployed will sustain costs 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 explored how you can access and release the DeepSeek-R1 design utilizing 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 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 business develop ingenious services using AWS services and accelerated compute. Currently, wiki.whenparked.com he is concentrated on establishing methods for fine-tuning and optimizing the inference performance of big language models. In his spare time, Vivek takes pleasure in treking, enjoying films, and trying various cuisines.

    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 a Specialist 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 hub. She is passionate about constructing options that assist consumers accelerate their AI journey and unlock organization worth.
Assignee
Assign to
Time tracking