Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
W
worshipwithme
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 27
    • Issues 27
    • List
    • Boards
    • 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
  • Arletha Brier
  • worshipwithme
  • Issues
  • #17

Something went wrong while fetching related merge requests.
Closed
Open
Opened 1 month ago by Arletha Brier@arlethabrier62
  • Report abuse
  • New issue
Report abuse New issue

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 release DeepSeek AI's first-generation frontier model, DeepSeek-R1, along with the distilled variations varying from 1.5 to 70 billion parameters to build, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable actions to release the distilled variations of the designs as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that uses reinforcement learning to boost thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential identifying feature is its support learning (RL) action, which was used to refine the design's actions beyond the basic pre-training and fine-tuning process. By including RL, DeepSeek-R1 can adapt more efficiently to user feedback and goals, eventually improving both importance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, indicating it's geared up to break down complicated inquiries and reason through them in a detailed way. This assisted reasoning process allows the design to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT abilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has caught the market's attention as a versatile text-generation design that can be integrated into different workflows such as representatives, logical reasoning and data interpretation tasks.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture allows activation of 37 billion parameters, allowing effective reasoning by routing questions to the most relevant expert "clusters." This approach permits the design to focus on various issue domains while maintaining overall performance. 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 release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.

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

You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, pediascape.science we advise deploying this model with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous material, and assess models against crucial security criteria. At the time of writing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce numerous guardrails tailored to different use cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, 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, choose Amazon SageMaker, and validate 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 releasing. To ask for a limitation increase, create a limit increase request and connect to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, prevent hazardous material, and evaluate models against key safety requirements. You can carry out safety measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to evaluate 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 general circulation 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 out to the model for inference. After getting 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 intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it occurred at the input or output stage. The examples showcased in the following sections show 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 models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:

1. On the Amazon Bedrock console, pick Model brochure under Foundation models in the navigation pane. At the time of composing this post, you can utilize the InvokeModel API to invoke the model. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a company and pick the DeepSeek-R1 model.

The model detail page offers important details about the design's capabilities, prices structure, and execution guidelines. You can discover detailed usage guidelines, consisting of sample API calls and code bits for integration. The design supports numerous text generation tasks, consisting of material development, code generation, and question answering, using its reinforcement learning optimization and CoT thinking capabilities. The page likewise includes implementation alternatives and licensing details to help you get begun with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, select 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, enter an endpoint name (between 1-50 alphanumeric characters). 5. For Variety of instances, enter a number of circumstances (between 1-100). 6. For example type, pick your circumstances type. For optimal efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested. Optionally, you can configure sophisticated security and infrastructure settings, consisting of virtual private cloud (VPC) networking, service role permissions, and encryption settings. For the majority of utilize cases, the default settings will work well. However, for production releases, you might wish to review these settings to line up with your organization's security and compliance requirements. 7. Choose Deploy to start utilizing the model.

When the release is total, you can test DeepSeek-R1's abilities straight in the Amazon Bedrock playground. 8. Choose Open in play ground to access an interactive interface where you can explore various prompts and adjust design specifications like temperature and optimum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum outcomes. For example, material for reasoning.

This is an outstanding method to check out the model's thinking and text generation abilities before integrating it into your applications. The play ground supplies instant feedback, helping you understand how the model reacts to different inputs and letting you tweak your triggers for optimum outcomes.

You can quickly evaluate the design in the playground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.

Run inference utilizing guardrails with the released DeepSeek-R1 endpoint

The following code example shows how to carry out reasoning using 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 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 customer, sets up inference criteria, and sends a demand to create text based upon a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, forum.altaycoins.com and prebuilt ML options that you can release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 convenient techniques: using the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both techniques to help you choose the approach that best 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 triggered to develop a domain. 3. On the SageMaker Studio console, choose JumpStart in the navigation pane.

The design web browser shows available designs, with details like the service provider name and model abilities.

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

- Model name

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

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

    The design details page includes the following details:

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

    The About tab includes important details, such as:

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

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

    6. Choose Deploy to proceed with release.

    7. For Endpoint name, utilize the automatically produced name or produce a customized one.
  1. For Instance type ¸ select an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the variety of instances (default: 1). Selecting suitable instance types and counts is vital for expense and efficiency optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is enhanced for sustained traffic and low latency.
  3. Review all configurations for precision. For this design, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to release the model.

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

    When implementation is total, your endpoint status will change to InService. At this point, the design is prepared to accept reasoning demands through the endpoint. You can keep an eye on the implementation development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the release 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 utilizing the SageMaker Python SDK, you will need to install 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 release and utilize DeepSeek-R1 for inference programmatically. The code for setiathome.berkeley.edu deploying the design is offered in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run extra demands against the predictor:

    Implement guardrails and run inference with your SageMaker JumpStart predictor

    Similar to Amazon Bedrock, you can likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Clean up

    To prevent unwanted charges, finish the steps in this section to clean up your resources.

    Delete the Amazon Bedrock Marketplace deployment

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

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

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design 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 using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. 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 Beginning with Amazon SageMaker JumpStart.

    About the Authors

    Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative AI companies build ingenious options utilizing AWS services and accelerated compute. Currently, he is focused on developing strategies for fine-tuning and optimizing the reasoning performance of large language designs. In his free time, Vivek enjoys hiking, enjoying films, and attempting 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 technology and Bioinformatics.

    Jonathan Evans is a Specialist Solutions Architect working on 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 center. She is enthusiastic about developing services that assist clients accelerate their AI journey and unlock organization worth.

Please solve the reCAPTCHA

We want to be sure it is you, please confirm you are not a robot.

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
None
Milestone
None
Assign milestone
None
Time tracking
No estimate or time spent
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Confidentiality
Not confidential
Lock issue
Unlocked
participants
Reference: arlethabrier62/worshipwithme#17