Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
E expand-digitalcommerce
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 19
    • Issues 19
    • 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
  • Abigail Medlock
  • expand-digitalcommerce
  • Issues
  • #1

Closed
Open
Created Apr 04, 2025 by Abigail Medlock@abigailmedlockMaintainer

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, together with the distilled variations ranging from 1.5 to 70 billion criteria to develop, 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 similar actions to deploy the distilled versions of the designs also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) developed by DeepSeek AI that uses support learning to improve reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential differentiating function is its support knowing (RL) step, which was used to fine-tune the model's reactions beyond the basic pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually improving both importance 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 way. This assisted thinking procedure allows the model to produce more accurate, transparent, and detailed answers. This design integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually recorded the industry's attention as a flexible text-generation design that can be incorporated into different workflows such as agents, sensible reasoning and information interpretation tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion parameters, allowing efficient inference by routing inquiries to the most relevant professional "clusters." This approach allows the model to focus on different issue domains while maintaining total performance. 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 deploy the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking abilities of the main R1 design 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 designs to simulate the habits and thinking patterns of the larger DeepSeek-R1 design, utilizing it as a teacher design.

You can release DeepSeek-R1 design 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 utilize Amazon Bedrock Guardrails to present safeguards, prevent damaging material, and examine models against essential safety requirements. At the time of writing this blog, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, 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 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 utilizing 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 ask for a limitation increase, develop a limitation increase demand and reach out to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to introduce safeguards, avoid hazardous content, and evaluate models against crucial safety criteria. You can execute security measures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This allows you to use guardrails to examine user inputs and model reactions deployed 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 includes 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 design for inference. After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the result. 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 phase. The examples showcased in the following areas demonstrate reasoning 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, complete the following actions:

1. On the Amazon Bedrock console, 89u89.com choose 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 model. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a service provider and choose the DeepSeek-R1 model.

The design detail page offers necessary details about the model's abilities, rates structure, and application standards. You can discover detailed usage directions, including sample API calls and code snippets for integration. The design supports different text generation jobs, consisting of material development, code generation, and question answering, using its support finding out optimization and CoT reasoning abilities. The page also consists of deployment choices and licensing details to help you start with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, choose Deploy.

You will be triggered to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated. 4. For Endpoint name, enter an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, go into a number of instances (in between 1-100). 6. For example type, choose your circumstances type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can set up advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service function authorizations, and file encryption settings. For most utilize cases, the default settings will work well. However, for production implementations, you may want to evaluate these settings to line up with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the release 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 user interface where you can explore various prompts and adjust model parameters like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimal results. For instance, material for reasoning.

This is an exceptional way to explore the design's reasoning and text generation abilities before incorporating it into your applications. The playground provides immediate feedback, helping you comprehend how the design reacts to numerous inputs and letting you tweak your prompts for optimal results.

You can rapidly check the model in the playground through the UI. However, to invoke the released design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference using guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to carry out inference using a deployed DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop 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 produced the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime client, configures reasoning criteria, and sends out a demand to generate text based on a user timely.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML options that you can release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your data, and deploy them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical approaches: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you select the technique that finest suits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

The model internet browser displays available designs, with details like the company name and model capabilities.

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

- Model name

  • Provider name
  • Task category (for example, Text Generation). Bedrock Ready badge (if relevant), showing that this model 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 model details page.

    The model 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 specifications.
  • Usage standards

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, utilize the immediately generated name or develop a customized one.
  1. For example type ¸ pick an instance type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the variety of instances (default: 1). Selecting proper instance types and counts is crucial for expense and efficiency optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is enhanced for sustained traffic and surgiteams.com low latency.
  3. Review all configurations for accuracy. For this model, we strongly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
  4. Choose Deploy to deploy the model.

    The release process can take a number of minutes to complete.

    When release is complete, your endpoint status will alter to InService. At this point, the model is prepared to accept reasoning requests through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is total, you can invoke the design utilizing a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get begun with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the necessary AWS authorizations and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the model is supplied in the Github here. You can clone the note pad and range from SageMaker Studio.

    You can run extra requests against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as revealed in the following code:

    Tidy up

    To prevent undesirable charges, complete the steps in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace implementations.
  5. In the Managed implementations section, 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 correct release: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design 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 deploy the DeepSeek-R1 model using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, wiki.snooze-hotelsoftware.de refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going 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 build ingenious solutions using AWS services and accelerated compute. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the inference performance of large language models. In his leisure time, Vivek takes pleasure in treking, viewing motion pictures, and attempting different foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team at AWS. His 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 dealing with generative AI with the Third-Party Model Science team at AWS.

    Banu Nagasundaram leads product, engineering, and tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about developing solutions that assist customers accelerate their AI journey and unlock organization value.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking