Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
C
constructionproject-360
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 23
    • Issues 23
    • 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
  • Albertha Old
  • constructionproject-360
  • Issues
  • #8

Something went wrong while fetching related merge requests.
Closed
Open
Opened 1 month ago by Albertha Old@alberthaold46
  • 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 deploy DeepSeek AI's first-generation frontier model, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion parameters to construct, experiment, and responsibly scale your generative AI concepts 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 deploy the distilled versions of the models also.

Overview of DeepSeek-R1

DeepSeek-R1 is a large language design (LLM) established by DeepSeek AI that uses reinforcement finding out to improve reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base structure. A crucial identifying function is its support learning (RL) step, which was used to refine the model's actions beyond the basic pre-training and fine-tuning process. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and objectives, ultimately boosting both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, indicating it's equipped to break down complex inquiries and factor through them in a detailed way. This directed thinking process enables the design to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT capabilities, aiming to generate structured reactions while concentrating on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually caught the market's attention as a flexible text-generation model that can be integrated into different workflows such as agents, rational thinking and data analysis tasks.

DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion parameters, enabling effective reasoning by routing queries to the most pertinent professional "clusters." This method permits the model to concentrate on different issue domains while maintaining general performance. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for inference. In this post, we will utilize an ml.p5e.48 xlarge instance to release the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.

DeepSeek-R1 distilled models bring the reasoning capabilities of the main R1 design to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more effective models to simulate the habits 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 design, we suggest releasing this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid hazardous content, and evaluate models against key safety requirements. 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 several guardrails tailored to various use cases and use them to the DeepSeek-R1 model, improving user experiences and standardizing safety controls across your generative AI applications.

Prerequisites

To release the DeepSeek-R1 model, wiki.asexuality.org you require access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify you're using 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 limit boost, produce a limit increase demand and connect to your account team.

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

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails allows you to introduce safeguards, avoid harmful material, and evaluate designs against key security criteria. You can carry out safety measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to examine user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. 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.

The general flow involves the following steps: First, the system gets 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 design for inference. After getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the final outcome. However, if either the input or output is stepped in by the guardrail, a message is returned indicating the nature of the intervention and whether it occurred at the input or output phase. The examples showcased in the following sections show reasoning utilizing this API.

Deploy DeepSeek-R1 in Amazon Bedrock Marketplace

Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, and specialized structure models (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 writing this post, you can utilize the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling. 2. Filter for DeepSeek as a company and pick the DeepSeek-R1 design.

The model detail page supplies important details about the model's abilities, prices structure, and application guidelines. You can discover detailed use instructions, consisting of sample API calls and larsaluarna.se code snippets for combination. The design supports numerous text generation tasks, including content production, code generation, and concern answering, utilizing its support learning optimization and CoT thinking capabilities. The page also includes release alternatives and licensing details to help you begin with DeepSeek-R1 in your applications. 3. To start utilizing DeepSeek-R1, select Deploy.

You will be prompted to set up the deployment 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 variety of circumstances (in between 1-100). 6. For example type, pick your circumstances type. For optimal performance with DeepSeek-R1, wiki.eqoarevival.com a GPU-based circumstances type like ml.p5e.48 xlarge is suggested. Optionally, you can set up innovative security and infrastructure settings, including virtual private cloud (VPC) networking, service function permissions, and file encryption settings. For most use cases, the default settings will work well. However, for production releases, you may want to examine these settings to align with your company's security and compliance requirements. 7. Choose Deploy to start utilizing the design.

When the implementation is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground. 8. Choose Open in play area to access an interactive interface where you can try out various prompts and adjust design specifications like temperature level and maximum length. When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum outcomes. For instance, content for inference.

This is an excellent method to explore the design's reasoning and text generation abilities before incorporating it into your applications. The play area offers immediate feedback, helping you comprehend how the design reacts to different inputs and letting you fine-tune your triggers for wiki.myamens.com optimal outcomes.

You can quickly check the model in the playground through the UI. However, to invoke the deployed design 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 perform 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 produce the guardrail, see the GitHub repo. After you have produced the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up reasoning criteria, and sends out a request 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, and prebuilt ML services that you can release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and release them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 model through SageMaker JumpStart uses two convenient techniques: utilizing the intuitive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's explore both techniques to help you pick the approach that finest matches your needs.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following steps to release DeepSeek-R1 utilizing 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, choose JumpStart in the navigation pane.

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

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

- Model name

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

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

    The model details page includes the following details:

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

    The About tab consists of essential details, such as:

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

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

    6. Choose Deploy to continue with implementation.

    7. For Endpoint name, use the instantly created name or produce a custom one.
  1. For Instance type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
  2. For Initial instance count, enter the number of circumstances (default: 1). Selecting suitable circumstances types and counts is important for expense and efficiency optimization. Monitor your release 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 setups for accuracy. For this design, we strongly suggest adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
  4. Choose Deploy to deploy the design.

    The release procedure can take numerous minutes to finish.

    When implementation is total, your endpoint status will alter to InService. At this point, the model is all set to accept reasoning demands through the endpoint. You can keep track of the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the release is total, you can conjure up 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 install the SageMaker Python SDK and make certain you have the required AWS consents 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 design is provided in the Github here. You can clone the notebook and range from SageMaker Studio.

    You can run additional demands 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 produce a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:

    Clean up

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

    Delete the Amazon Bedrock Marketplace deployment

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

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace releases.
  5. In the Managed implementations section, find the endpoint you wish to delete.
  6. Select the endpoint, 89u89.com and on the menu, choose Delete.
  7. Verify the endpoint details to make certain you're erasing the appropriate implementation: 1. Endpoint name.
  8. Model name.
  9. Endpoint status

    Delete the SageMaker JumpStart predictor

    The SageMaker JumpStart design you deployed will sustain costs if you leave it running. Use the following code to erase the endpoint if you want 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 model 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 Starting 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 innovative solutions utilizing AWS services and accelerated calculate. Currently, he is focused on developing techniques for fine-tuning and enhancing the reasoning efficiency of big language models. In his leisure time, Vivek enjoys hiking, watching films, and trying various cuisines.

    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 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 hub. She is passionate about constructing solutions that assist consumers accelerate their AI journey and yewiki.org unlock business value.

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: alberthaold46/constructionproject-360#8