Skip to content

  • 项目
  • 群组
  • 代码片段
  • 帮助
    • 正在加载...
    • 帮助
    • 为 GitLab 提交贡献
  • 登录/注册
A
amazonaws
  • 项目
    • 项目
    • 详情
    • 活动
    • 周期分析
  • 议题 60
    • 议题 60
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI / CD
    • CI / CD
    • 流水线
    • 作业
    • 计划
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 成员
    • 成员
  • 折叠边栏
  • 活动
  • 创建新议题
  • 作业
  • 议题看板
  • Aja Elsey
  • amazonaws
  • Issues
  • #4

已关闭
未关闭
在 2月 15, 2025 由 Aja Elsey@ajaelsey510170
  • 违规举报
  • 新建问题
举报违规 新建问题

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 designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, archmageriseswiki.com you can now release DeepSeek AI's first-generation frontier model, DeepSeek-R1, in addition to the distilled variations varying from 1.5 to 70 billion parameters to build, experiment, and responsibly scale your generative AI ideas on AWS.

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

Overview of DeepSeek-R1

DeepSeek-R1 is a big language model (LLM) established by DeepSeek AI that uses support discovering to improve thinking abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential identifying function is its reinforcement knowing (RL) step, which was used to fine-tune the design's actions beyond the standard pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adjust more efficiently to user feedback and goals, ultimately enhancing both importance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, indicating it's geared up to break down intricate inquiries and factor through them in a detailed manner. This guided thinking procedure allows the model to produce more precise, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to create structured responses while concentrating on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has actually captured the market's attention as a versatile text-generation model that can be integrated into different workflows such as representatives, logical reasoning and data analysis jobs.

DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture enables activation of 37 billion specifications, enabling effective inference by routing questions to the most pertinent professional "clusters." This method permits the model to specialize in different issue domains while maintaining total efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.

DeepSeek-R1 distilled designs bring the thinking 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 process of training smaller, more effective designs to simulate the behavior and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as an instructor design.

You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend releasing this model with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid harmful content, and examine designs against key security criteria. At the time of writing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop several guardrails tailored to different use cases and apply them to the DeepSeek-R1 design, improving user experiences and systemcheck-wiki.de standardizing safety controls throughout your generative AI applications.

Prerequisites

To release the DeepSeek-R1 design, you need access to an ml.p5e . To check 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 use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To request a limitation increase, create a limitation increase demand and connect to your account group.

Because you will be deploying this design with Amazon Bedrock Guardrails, hb9lc.org make certain you have the correct AWS Identity and Gain Access To Management (IAM) consents to use Amazon Bedrock Guardrails. For directions, see Set up approvals to utilize guardrails for material filtering.

Implementing guardrails with the ApplyGuardrail API

Amazon Bedrock Guardrails permits you to introduce safeguards, prevent damaging material, and evaluate models against crucial security requirements. You can implement security procedures for kigalilife.co.rw the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and design responses 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 develop the guardrail, see the GitHub repo.

The basic flow includes the following steps: First, 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 design for reasoning. After receiving the design's output, another guardrail check is used. If the output passes this final check, it's returned as the last result. However, 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 took place 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 steps:

1. On the Amazon Bedrock console, choose 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 service provider and pick the DeepSeek-R1 model.

The design detail page offers important details about the model's abilities, rates structure, and implementation standards. You can find detailed use instructions, including sample API calls and code snippets for combination. The design supports different text generation tasks, consisting of content creation, code generation, and concern answering, using its support finding out optimization and CoT reasoning capabilities. The page likewise includes deployment alternatives and licensing details to assist you begin 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, go into an endpoint name (in between 1-50 alphanumeric characters). 5. For Variety of instances, go into a variety of instances (in between 1-100). 6. For example type, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised. Optionally, you can configure advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service function authorizations, and file encryption settings. For most utilize cases, the default settings will work well. However, for production implementations, you might wish to examine these settings to align with your company's security and compliance requirements. 7. Choose Deploy to begin using the model.

When the release is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play area. 8. Choose Open in play area to access an interactive interface where you can try out various triggers and change model parameters like temperature and maximum length. When utilizing R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimum outcomes. For instance, material for inference.

This is an excellent way to check out the model's reasoning and text generation capabilities before integrating it into your applications. The playground offers immediate feedback, helping you comprehend how the design responds to different inputs and letting you tweak your triggers for ideal outcomes.

You can rapidly test the design in the play ground through the UI. However, to invoke the deployed 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 reasoning using a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have actually created the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime client, configures reasoning specifications, and sends out a demand to create text based on a user prompt.

Deploy DeepSeek-R1 with SageMaker JumpStart

SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, integrated algorithms, and prebuilt ML solutions that you can release with simply a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your information, and deploy them into production utilizing either the UI or SDK.

Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 practical methods: utilizing the instinctive SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's check out both methods to help you choose the method that finest fits your requirements.

Deploy DeepSeek-R1 through SageMaker JumpStart UI

Complete the following actions to deploy DeepSeek-R1 using SageMaker JumpStart:

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

The design browser shows available designs, with details like the company name and model capabilities.

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

- Model name

  • Provider name
  • Task category (for example, Text Generation). Bedrock Ready badge (if appropriate), indicating that this design can be registered with Amazon Bedrock, permitting 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 deploy the design. About and Notebooks tabs with detailed details

    The About tab consists of important details, such as:

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

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

    6. Choose Deploy to continue with deployment.

    7. For Endpoint name, use the immediately generated name or develop a custom-made one.
  1. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
  2. For Initial circumstances count, enter the number of instances (default: 1). Selecting appropriate instance types and counts is vital for cost and performance optimization. Monitor your deployment to change these settings as needed.Under Inference type, Real-time inference is chosen by default. This is optimized for sustained traffic and low latency.
  3. Review all configurations for accuracy. For this design, we highly recommend sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
  4. Choose Deploy to deploy the design.

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

    When implementation is complete, your endpoint status will alter to InService. At this point, the design 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 display pertinent metrics and status details. When the implementation is complete, you can conjure up the model using a SageMaker runtime client and incorporate it with your applications.

    Deploy DeepSeek-R1 using the SageMaker Python SDK

    To start with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the necessary 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 deploying the design 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 inference 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 implement it as shown in the following code:

    Clean up

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

    Delete the Amazon Bedrock Marketplace deployment

    If you released the model utilizing Amazon Bedrock Marketplace, total the following actions:

    1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace implementations.
  5. In the Managed implementations area, locate the endpoint you wish to erase.
  6. Select the endpoint, bytes-the-dust.com and on the Actions menu, select Delete.
  7. Verify the endpoint details to make certain you're deleting 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 delete the endpoint if you desire 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 begin. 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 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 construct innovative options utilizing AWS services and sped up calculate. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the reasoning efficiency of large language designs. In his spare time, Vivek enjoys treking, viewing movies, and attempting different 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 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 item, raovatonline.org engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and bytes-the-dust.com generative AI hub. She is passionate about developing services that help clients accelerate their AI journey and unlock business worth.
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无截止日期
0
标记
无
指派标记
  • 查看项目标记
引用: ajaelsey510170/amazonaws#4