Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
M
myad
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Alicia Fehon
  • myad
  • Issues
  • #8

Closed
Open
Opened 2 weeks ago by Alicia Fehon@aliciafehon058Maintainer
  • Report abuse
  • New issue
Report abuse New issue

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

Open

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


Today, we are thrilled 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 design, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion parameters to develop, experiment, and higgledy-piggledy.xyz properly scale your generative AI concepts on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language design (LLM) developed by DeepSeek AI that utilizes reinforcement finding out to enhance reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. An essential differentiating function is its support learning (RL) action, which was used to improve the model's responses beyond the basic pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adapt more effectively to user feedback and goals, eventually improving both relevance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, meaning it's geared up to break down complex queries and reason through them in a detailed manner. This directed reasoning 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 reactions 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 design that can be integrated into different workflows such as representatives, sensible reasoning and data analysis jobs.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion criteria, making it possible for efficient inference by routing questions to the most relevant professional "clusters." This method permits the model to specialize in various issue domains while maintaining general performance. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge features 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 trademarketclassifieds.com 70B). Distillation describes a procedure of training smaller, more efficient designs to imitate the habits and thinking patterns of the larger DeepSeek-R1 model, using it as an instructor model.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this model with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, prevent hazardous content, and assess designs against crucial security criteria. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls across your generative AI applications.

Prerequisites

To release 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, pick Amazon SageMaker, and verify 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 deploying. To request a limitation increase, create a limitation boost demand and connect to your account group.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to present safeguards, avoid hazardous content, and assess models against crucial security criteria. You can carry out safety steps for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to assess user inputs and model actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.

The general 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 model for inference. After getting the model's output, another guardrail check is applied. If the output passes this last check, it's returned as the last result. However, setiathome.berkeley.edu if either the input or output is stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following sections demonstrate reasoning using this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace provides 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, pick Model catalog under Foundation models in the navigation pane. At the time of writing this post, you can utilize the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 model.

The model detail page supplies necessary details about the model's capabilities, pricing structure, and execution standards. You can find detailed use instructions, including sample API calls and code bits for integration. The design supports different text generation tasks, including content production, code generation, and concern answering, utilizing its reinforcement discovering optimization and CoT thinking capabilities. The page also includes deployment alternatives and licensing details to assist you begin with DeepSeek-R1 in your applications. 3. To begin utilizing DeepSeek-R1, choose Deploy.

You will be prompted to configure the release details for DeepSeek-R1. The design ID will be pre-populated. 4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters). 5. For Number of instances, go into a number of instances (between 1-100). 6. For Instance type, pick your circumstances type. For optimal performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised. Optionally, you can set up advanced security and facilities settings, consisting of cloud (VPC) networking, service role authorizations, and file encryption settings. For most utilize cases, wavedream.wiki the default settings will work well. However, for production releases, you may wish to examine these settings to align with your company'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 play ground. 8. Choose Open in play ground to access an interactive interface where you can explore different prompts and change design parameters like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat design template for optimum results. For instance, material for reasoning.

This is an outstanding way to explore the model's thinking and text generation capabilities before integrating it into your applications. The play ground provides immediate feedback, helping you understand how the design reacts to numerous inputs and letting you fine-tune your prompts for ideal results.

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

Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint

The following code example demonstrates how to perform reasoning utilizing a deployed 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 produce the guardrail, see the GitHub repo. After you have actually produced the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime client, configures reasoning specifications, and sends out a demand to create text based upon 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 deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and deploy them into production using either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses 2 practical techniques: utilizing the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you choose the approach that best suits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to release DeepSeek-R1 utilizing SageMaker JumpStart:

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

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

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

- Model name

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

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

    The design details page consists of the following details:

    - The design name and service provider details. Deploy button to release the model. About and Notebooks tabs with detailed details

    The About tab includes essential details, such as:

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

    Before you deploy the design, it's advised to review the model details and license terms to validate compatibility with your usage case.

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, use the immediately created name or develop a customized one.
  1. For Instance type ¸ pick a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, go into the number of circumstances (default: 1). Selecting proper circumstances types and counts is vital for cost and efficiency optimization. Monitor your deployment to adjust 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 setups for precision. For this design, we strongly advise sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in place.
  4. Choose Deploy to deploy the design.

    The deployment process can take several minutes to complete.

    When release is complete, your endpoint status will alter to InService. At this moment, the model is all set to accept reasoning demands through the endpoint. You can keep track of the implementation development on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the implementation is total, you can conjure up the design using a SageMaker runtime client and integrate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To get started with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the essential 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 model is offered in the Github here. You can clone the note pad and run from SageMaker Studio.

    You can run additional requests 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 develop a guardrail utilizing the Amazon Bedrock console or the API, and execute it as displayed in the following code:

    Tidy up

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

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace deployments.
  5. In the Managed releases 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 erasing the right release: 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 delete the endpoint if you desire 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 model using 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 assists emerging generative AI companies develop ingenious services utilizing AWS services and sped up compute. Currently, he is concentrated on developing strategies for fine-tuning and enhancing the reasoning performance of big language designs. In his leisure time, Vivek takes pleasure in hiking, seeing motion pictures, and trying different 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 an Expert Solutions Architect working on 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 generative AI center. She is enthusiastic about building options that help customers accelerate their AI journey and unlock service value.

Please solve the reCAPTCHA

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

Linked issues
0

  • 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: aliciafehon058/myad#8