Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
  • Sign in
P
phomecoming
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 14
    • Issues 14
    • 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
  • Dante MacRory
  • phomecoming
  • Issues
  • #1

Closed
Open
Opened Feb 08, 2025 by Dante MacRory@dantemacrory7
  • 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 announce 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 model, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion specifications to develop, experiment, and properly scale your generative AI ideas 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 big language design (LLM) developed by DeepSeek AI that finding out to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential identifying feature is its reinforcement knowing (RL) step, which was utilized to fine-tune the design's reactions beyond the standard pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt more efficiently to user feedback and objectives, ultimately improving both importance and clarity. In addition, garagesale.es DeepSeek-R1 employs a chain-of-thought (CoT) method, meaning it's equipped to break down complex queries and reason through them in a detailed way. This directed reasoning procedure enables the design to produce more accurate, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT abilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its extensive capabilities DeepSeek-R1 has actually caught the market's attention as a versatile text-generation model that can be integrated into different workflows such as agents, logical thinking and information interpretation jobs.

DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion criteria, allowing effective inference by routing inquiries to the most appropriate professional "clusters." This approach enables the design to focus on different problem domains while maintaining general effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the reasoning capabilities of the main R1 model to more effective 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 effective designs to mimic the behavior and reasoning patterns of the bigger DeepSeek-R1 design, using it as a teacher model.

You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend deploying this model with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid hazardous content, and assess models against crucial security criteria. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can develop multiple guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, enhancing user experiences and wiki-tb-service.com standardizing security controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, you need access to an ml.p5e circumstances. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're utilizing ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are releasing. To ask for a limit boost, produce a limitation boost demand and connect to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to introduce safeguards, avoid harmful content, and evaluate designs against essential safety criteria. You can implement safety measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to evaluate user inputs and design responses 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 develop the guardrail, see the GitHub repo.

The general flow includes 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 to the model for reasoning. After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the outcome. However, if either the input or output is stepped in by the guardrail, a message is returned suggesting the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following areas 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 models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:

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

The design detail page offers necessary details about the design's capabilities, rates structure, and application guidelines. You can discover detailed use guidelines, consisting of sample API calls and code snippets for combination. The design supports various text generation jobs, consisting of content creation, code generation, and question answering, utilizing its support finding out optimization and CoT reasoning abilities. The page likewise consists of deployment alternatives and licensing details to assist you get going with DeepSeek-R1 in your applications. 3. To start using DeepSeek-R1, choose Deploy.

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

When the deployment is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive user interface where you can experiment with various triggers and adjust design criteria like temperature and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal results. For instance, material for inference.

This is an outstanding method to check out the model's thinking and text generation capabilities before integrating it into your applications. The play area offers instant feedback, assisting you understand how the design responds to various inputs and letting you fine-tune your triggers for optimum outcomes.

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

Run inference using guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to perform inference using a deployed DeepSeek-R1 model through Amazon Bedrock utilizing 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, use the following code to implement guardrails. The script initializes the bedrock_runtime client, sets up reasoning parameters, and sends a request 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 solutions that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your data, and demo.qkseo.in release them into production using either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 hassle-free methods: using the intuitive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both methods to help you select the technique that finest fits 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, pick Studio in the navigation pane. 2. First-time users will be triggered to create a domain. 3. On the SageMaker Studio console, select JumpStart in the navigation pane.

The design browser displays available models, with details like the company name and model abilities.

4. Look for DeepSeek-R1 to view the DeepSeek-R1 model card. Each model card reveals crucial details, including:

- Model name

  • Provider name
  • Task classification (for instance, Text Generation). Bedrock Ready badge (if applicable), suggesting that this design can be signed up with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to invoke the design

    5. Choose the design card to see the model details page.

    The design details page includes the following details:

    - The model name and service provider 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 specs.
  • Usage standards

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, use the automatically created name or develop a customized one.
  1. For pediascape.science example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, get in the variety of instances (default: 1). Selecting suitable circumstances types and counts is crucial for expense and efficiency optimization. Monitor your implementation to change these settings as needed.Under Inference type, Real-time reasoning is selected by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this model, we strongly advise sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to release the model.

    The deployment procedure can take numerous minutes to finish.

    When deployment 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 an eye on the implementation progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is total, you can invoke the model using a SageMaker runtime customer and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get going with DeepSeek-R1 using the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the needed AWS authorizations and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for inference programmatically. The code for deploying the design is provided in the Github here. You can clone the notebook and run 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 use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail utilizing the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Tidy up

    To prevent unwanted charges, finish the actions in this section to tidy up your resources.

    Delete the Amazon Bedrock Marketplace implementation

    If you deployed the model utilizing Amazon Bedrock Marketplace, total the following steps:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace implementations.
  5. In the Managed deployments section, locate the endpoint you wish to delete.
  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 expenses 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 explored how you can access and deploy 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, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, 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 services using AWS services and accelerated compute. Currently, he is focused on establishing methods for fine-tuning and optimizing the reasoning performance of large language designs. In his complimentary time, Vivek enjoys treking, seeing motion pictures, and trying various 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 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 strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI center. She is enthusiastic about constructing services that assist clients accelerate their AI journey and unlock company value.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View project labels
Reference: dantemacrory7/phomecoming#1