Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
L
letts
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 12
    • Issues 12
    • 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
  • Angus Gagnon
  • letts
  • Issues
  • #3

Something went wrong while fetching related merge requests.
Closed
Open
Opened 2 months ago by Angus Gagnon@angusgagnon37
  • 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 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, in addition to the distilled versions ranging from 1.5 to 70 billion criteria to build, experiment, and properly scale your generative AI ideas on AWS.

In this post, we demonstrate how to get started with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled versions of the models as well.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language model (LLM) developed by DeepSeek AI that utilizes support discovering to improve thinking abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key distinguishing feature is its reinforcement learning (RL) step, which was used to improve the model's reactions beyond the basic pre-training and fine-tuning process. By incorporating RL, systemcheck-wiki.de DeepSeek-R1 can adjust more effectively to user feedback and goals, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, meaning it's equipped to break down complex questions and reason through them in a detailed manner. This guided reasoning process allows the design to produce more accurate, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while focusing on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually captured the industry's attention as a versatile text-generation design that can be incorporated into numerous workflows such as representatives, sensible thinking and information interpretation tasks.

DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion specifications, allowing effective inference by routing inquiries to the most pertinent expert "clusters." This method permits the design to focus on different issue domains while maintaining total performance. 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 circumstances to release the model. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the thinking capabilities 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, more efficient designs to mimic the habits and thinking patterns of the bigger DeepSeek-R1 model, using it as a teacher model.

You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest releasing this design with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent harmful content, and assess models against key safety criteria. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create several guardrails tailored to various use cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing safety controls throughout 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 validate you're using 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 deploying. To ask for a limit boost, develop a limitation increase request 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) permissions to utilize Amazon Bedrock Guardrails. For guidelines, see Establish permissions to use guardrails for content filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to introduce safeguards, prevent harmful content, and examine models against essential safety criteria. You can carry out precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to evaluate user inputs and design reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The general flow involves the following actions: First, yewiki.org the system receives an input for the model. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent to the model for inference. After receiving the design's output, another guardrail check is applied. If the output passes this last 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 happened at the input or output phase. The examples showcased in the following areas 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 structure designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following steps:

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 utilize the InvokeModel API to conjure up the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a supplier and pick the DeepSeek-R1 design.

The design detail page offers important details about the model's capabilities, pricing structure, pipewiki.org and application standards. You can find detailed usage directions, including sample API calls and code snippets for combination. The model supports different text generation tasks, including material production, code generation, and question answering, utilizing its support discovering 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 begin using DeepSeek-R1, choose 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 (in between 1-50 alphanumeric characters). 5. For Variety of instances, enter a number of circumstances (between 1-100). 6. For Instance type, choose your instance type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended. Optionally, you can configure innovative security and infrastructure settings, including virtual private cloud (VPC) networking, service function consents, and encryption settings. For the majority of utilize cases, the default settings will work well. However, for production implementations, you might desire to evaluate these settings to align with your organization's security and compliance requirements. 7. Choose Deploy to start utilizing the design.

When the implementation is complete, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in playground to access an interactive interface where you can try out various prompts and adjust model parameters like temperature level and optimum length. When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for ideal results. For instance, content for reasoning.

This is an excellent way to check out the design's thinking and text generation capabilities before incorporating it into your applications. The play ground provides instant feedback, helping you comprehend how the design reacts to numerous inputs and letting you fine-tune your prompts for optimum outcomes.

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

Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint

The following code example shows how to carry out inference 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 created the guardrail, utilize the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up inference criteria, and sends out a demand to generate text based upon a user prompt.

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 release with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart offers two hassle-free methods: utilizing the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both approaches to assist you pick the method that best suits your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

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

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

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

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

- Model name

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

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

    The design details page includes 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 requirements.
  • Usage guidelines

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

    6. Choose Deploy to continue with deployment.

    7. For Endpoint name, utilize the instantly produced name or create a custom one.
  1. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, get in the variety of instances (default: 1). Selecting proper instance types and counts is important for cost and efficiency optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time reasoning is picked by default. This is enhanced for sustained traffic and low latency.
  3. Review all configurations for precision. For this model, ratemywifey.com we highly suggest adhering to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the design.

    The implementation procedure can take numerous minutes to complete.

    When implementation is total, your endpoint status will alter to InService. At this point, the design is prepared to accept reasoning requests through the endpoint. You can keep an eye on the release development on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is complete, you can invoke the design utilizing a SageMaker runtime customer and integrate it with your applications.

    Deploy DeepSeek-R1 utilizing the SageMaker Python SDK

    To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the needed AWS approvals and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for reasoning 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 additional requests against the predictor:

    Implement guardrails and run reasoning with your SageMaker JumpStart predictor

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

    Tidy up

    To prevent undesirable charges, complete the actions in this area to tidy up your resources.

    Delete the Amazon Bedrock Marketplace release

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

    1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, choose Marketplace releases.
  5. In the Managed implementations area, find the endpoint you want to erase.
  6. Select the endpoint, and larsaluarna.se on the Actions menu, choose Delete.
  7. Verify the endpoint details to make certain you're deleting the appropriate deployment: 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 delete 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 release the DeepSeek-R1 design utilizing 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 designs, 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 helps emerging generative AI business construct innovative solutions utilizing AWS services and sped up compute. Currently, he is focused on establishing strategies for fine-tuning and enhancing the reasoning efficiency of big language designs. In his downtime, Vivek enjoys hiking, watching motion pictures, and trying different foods.

    Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science team 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 an Expert 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 generative AI hub. She is enthusiastic about developing solutions that help consumers accelerate their AI journey and unlock company 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: angusgagnon37/letts#3