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

回應 · 14 Views

Today, we are thrilled to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through 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 release DeepSeek AI's first-generation frontier model, DeepSeek-R1, together with the distilled versions ranging from 1.5 to 70 billion specifications to build, experiment, and responsibly scale your generative AI ideas on AWS.


In this post, we show how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar steps to release 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 uses support finding out to improve reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential identifying function is its reinforcement learning (RL) action, which was utilized to fine-tune the design's responses beyond the standard pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adjust better to user feedback and goals, eventually improving both importance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, implying it's equipped to break down complicated inquiries and reason through them in a detailed manner. This directed thinking procedure allows the model to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has caught the industry's attention as a flexible text-generation model that can be incorporated into different workflows such as representatives, logical thinking and data interpretation jobs.


DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture allows activation of 37 billion specifications, allowing effective inference by routing inquiries to the most relevant expert "clusters." This method enables the model to concentrate on different problem domains while maintaining overall performance. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, garagesale.es we will use an ml.p5e.48 xlarge circumstances to deploy the model. ml.p5e.48 xlarge features 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 efficient architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller sized, more effective designs to imitate the behavior and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as a teacher design.


You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we recommend releasing this model with guardrails in place. In this blog, we will utilize Amazon Bedrock Guardrails to introduce safeguards, avoid harmful material, and examine models against essential safety requirements. At the time of composing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can create multiple guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, improving user experiences and standardizing security controls across your generative AI applications.


Prerequisites


To deploy the DeepSeek-R1 model, you need access to an ml.p5e circumstances. To examine if you have quotas for P5e, fishtanklive.wiki open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're utilizing 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 releasing. To request a limitation increase, develop a limit increase request and connect 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) consents to use Amazon Bedrock Guardrails. For instructions, see Set up consents to use guardrails for content filtering.


Implementing guardrails with the ApplyGuardrail API


Amazon Bedrock Guardrails allows you to present safeguards, avoid hazardous content, and evaluate models against essential safety requirements. You can implement safety measures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to assess user inputs and design actions deployed on Amazon Bedrock Marketplace and wavedream.wiki 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 basic 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 to the design for inference. After getting the design's output, another guardrail check is applied. If the output passes this last check, it's returned as the final outcome. 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 took place at the input or output phase. The examples showcased in the following sections show inference utilizing 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, pick Model catalog under Foundation models in the navigation pane.
At the time of writing this post, you can use 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 company and choose the DeepSeek-R1 design.


The design detail page provides essential details about the design's capabilities, prices structure, and hb9lc.org implementation guidelines. You can discover detailed use directions, consisting of sample API calls and code snippets for integration. The model supports various text generation tasks, including material creation, code generation, and concern answering, utilizing its support finding out optimization and CoT reasoning capabilities.
The page likewise consists of release alternatives and licensing details to help you get started with DeepSeek-R1 in your applications.
3. To start using DeepSeek-R1, select Deploy.


You will be prompted to configure the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, go into a number of circumstances (in between 1-100).
6. For Instance type, choose your instance type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is recommended.
Optionally, you can set up sophisticated security and facilities settings, including virtual personal cloud (VPC) networking, service role consents, and file encryption settings. For most use cases, the default settings will work well. However, for production releases, you may desire to examine these settings to align with your company's security and compliance requirements.
7. Choose Deploy to begin using the model.


When the implementation 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 try out different prompts and adjust design specifications like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimum results. For example, <|begin▁of▁sentence|><|User|>content for reasoning<|Assistant|>.


This is an outstanding method to check out the model's reasoning and text generation abilities before incorporating it into your applications. The play ground offers immediate feedback, helping you understand how the design reacts to different inputs and letting you fine-tune your prompts for optimal outcomes.


You can rapidly check the design in the playground through the UI. However, to conjure up the released 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 inference using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can develop a guardrail using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have actually developed the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, sets up reasoning criteria, and sends out a request to create text based on a user timely.


Deploy DeepSeek-R1 with SageMaker JumpStart


SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in 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 deploy them into production utilizing either the UI or SDK.


Deploying DeepSeek-R1 design through SageMaker JumpStart offers 2 hassle-free approaches: using the instinctive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both methods to help you choose the method 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 triggered to create a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.


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


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


- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if suitable), indicating that this model can be signed up with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the design


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


The model details page consists of the following details:


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


The About tab consists of essential details, such as:


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


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


6. Choose Deploy to proceed with release.


7. For Endpoint name, use the immediately created name or produce a custom one.
8. For example type ¸ select an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, enter the variety of circumstances (default: 1).
Selecting appropriate circumstances types and counts is vital for cost and performance 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.
10. Review all setups for accuracy. For this model, we highly advise adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to release the model.


The release process can take numerous minutes to finish.


When deployment is total, your endpoint status will alter to InService. At this moment, the model is prepared to accept inference requests through the endpoint. You can monitor the implementation development on the SageMaker console Endpoints page, which will display relevant metrics and status details. When the release is complete, you can conjure up the model utilizing a SageMaker runtime client and integrate it with your applications.


Deploy DeepSeek-R1 using the SageMaker Python SDK


To begin with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS permissions 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 wiki.lafabriquedelalogistique.fr releasing the design is supplied in the Github here. You can clone the note pad and range from SageMaker Studio.


You can run extra requests 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 create a guardrail using the Amazon Bedrock console or the API, and implement it as displayed in the following code:


Clean up


To prevent undesirable charges, finish the steps in this area to tidy up your resources.


Delete the Amazon Bedrock Marketplace implementation


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


1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, pick Marketplace releases.
2. In the Managed implementations section, find the endpoint you want to delete.
3. Select the endpoint, and on the Actions menu, pick Delete.
4. Verify the endpoint details to make certain you're deleting the appropriate implementation: 1. Endpoint name.
2. Model name.
3. Endpoint status


Delete the SageMaker JumpStart predictor


The SageMaker JumpStart design you deployed will sustain expenses if you leave it running. Use the following code to delete the endpoint if you want 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 utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going 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 sped up compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the inference efficiency of large language designs. In his spare time, Vivek enjoys treking, watching motion pictures, and attempting different foods.


Niithiyn Vijeaswaran is a Generative AI Specialist Solutions Architect with the Third-Party Model Science group 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 tactical collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative AI hub. She is passionate about developing solutions that assist consumers accelerate their AI journey and unlock company value.

回應