Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W wcipeg
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • 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
  • Johnny Flower
  • wcipeg
  • Issues
  • #1

Closed
Open
Created Apr 04, 2025 by Johnny Flower@johnnyflower4Owner

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 deploy DeepSeek AI's first-generation frontier model, DeepSeek-R1, along with the distilled versions ranging from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative AI ideas on AWS.

In this post, we show 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 discovering to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential identifying function is its support learning (RL) step, which was utilized to improve 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 significance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, meaning it's geared up to break down intricate queries and factor through them in a detailed way. This directed thinking procedure allows the model to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT abilities, aiming to create structured actions while concentrating on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has caught the market's attention as a versatile text-generation model that can be integrated into various workflows such as agents, sensible reasoning and data interpretation tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture permits activation of 37 billion criteria, enabling effective inference by routing inquiries to the most pertinent specialist "clusters." This method permits the design to focus on various issue domains while maintaining general efficiency. DeepSeek-R1 needs at least 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 design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning abilities of the main R1 model to more effective architectures based on 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 sized, more efficient models to simulate the behavior and reasoning patterns of the larger DeepSeek-R1 model, using 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 location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent damaging content, hb9lc.org and assess designs against crucial security criteria. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create numerous guardrails tailored to various use cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative AI applications.

Prerequisites

To deploy the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and confirm you're utilizing 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 ask for a limitation boost, produce a limitation increase request and reach out 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) consents to use Amazon Bedrock Guardrails. For pipewiki.org directions, see Establish approvals to utilize guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, prevent hazardous material, and evaluate models against key security criteria. You can execute safety steps for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and model reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The basic circulation includes 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 design for reasoning. After receiving the model's output, another guardrail check is applied. If the output passes this final check, it's returned as the result. 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 using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace offers 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, pick Model brochure 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 does not 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 supplies essential details about the model's abilities, rates structure, and execution standards. You can find detailed usage instructions, including sample API calls and code snippets for integration. The model supports various text generation tasks, including material creation, code generation, and question answering, using its support finding out optimization and CoT reasoning capabilities. The page likewise consists of deployment choices and licensing details to assist you start with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, select Deploy.

You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters). 5. For Number of circumstances, enter a number of circumstances (in between 1-100). 6. For Instance type, select your instance type. For optimal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can set up sophisticated security and facilities settings, consisting of virtual private cloud (VPC) networking, service function consents, and file encryption settings. For the majority of utilize cases, the default settings will work well. However, for production implementations, you may want to examine these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start using the model.

When the deployment is total, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock play ground. 8. Choose Open in play area to access an interactive interface where you can try out various prompts and adjust design parameters like temperature and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum outcomes. For instance, material for inference.

This is an exceptional way to explore the design's reasoning and text generation capabilities before integrating it into your applications. The play area offers immediate feedback, assisting you understand oeclub.org how the model reacts to different inputs and letting you fine-tune your prompts for ideal outcomes.

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

Run inference using guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to carry out reasoning utilizing a deployed DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, pipewiki.org see the GitHub repo. After you have developed the guardrail, utilize the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up reasoning specifications, and sends 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 services that you can deploy 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 provides two convenient techniques: utilizing the user-friendly SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both methods to help you select the technique that finest suits 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, choose Studio in the navigation pane. 2. First-time users will be prompted to produce a domain. 3. On the SageMaker Studio console, choose JumpStart in the navigation pane.

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

4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card shows key details, consisting of:

- Model name - Provider name

  • Task category (for example, Text Generation). Bedrock Ready badge (if suitable), showing that this model can be registered with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to conjure up the design

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

    The design details page includes the following details:

    - The design name and supplier 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 guidelines

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, utilize the instantly generated name or produce a custom-made one.
  1. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the number of instances (default: 1). Selecting suitable circumstances types and counts is important 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 enhanced for sustained traffic and low latency.
  3. Review all setups for accuracy. For this design, we highly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the model.

    The deployment process can take a number of minutes to finish.

    When implementation is complete, your endpoint status will change to InService. At this point, the design is all set to accept inference requests through the endpoint. You can monitor the deployment progress on the SageMaker console Endpoints page, which will show pertinent metrics and status details. When the implementation is total, you can conjure up the model utilizing a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the needed 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 design is offered 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 utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and implement it as revealed in the following code:

    Tidy up

    To prevent undesirable charges, it-viking.ch complete the actions in this area to clean up your resources.

    Delete the Amazon Bedrock Marketplace release

    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, pick Marketplace deployments.
  5. In the Managed deployments 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 deployment: 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 wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.

    Conclusion

    In this post, we checked out 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 start. 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 Starting with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI business develop ingenious options using AWS services and accelerated calculate. Currently, he is focused on establishing techniques for and optimizing the inference efficiency of large language models. In his leisure time, Vivek delights in treking, enjoying movies, and attempting different cuisines.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group at AWS. His area of focus is AWS AI accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.

    Jonathan Evans is a Professional Solutions Architect dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and pediascape.science generative AI hub. She is enthusiastic about constructing solutions that assist consumers accelerate their AI journey and unlock service value.
Assignee
Assign to
Time tracking