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

Kari Toro 2025-02-09 19:51:58 +08:00
commit 176eb6b1c9
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are thrilled 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 deploy DeepSeek [AI](http://125.ps-lessons.ru)'s first-generation frontier design, DeepSeek-R1, together with the distilled versions [varying](https://my-sugar.co.il) from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative [AI](https://src.enesda.com) concepts on AWS.<br>
<br>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 versions of the designs also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) established by DeepSeek [AI](https://www.sexmasters.xyz) that [utilizes reinforcement](https://placementug.com) discovering to [enhance reasoning](https://gogs.tyduyong.com) abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial differentiating feature is its reinforcement knowing (RL) action, which was utilized to improve the model's reactions beyond the basic pre-training and tweak procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and objectives, eventually boosting both significance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, indicating it's equipped to break down complex inquiries and reason through them in a detailed manner. This guided reasoning procedure permits the model to produce more accurate, transparent, and detailed answers. This model combines RL-based fine-tuning with CoT capabilities, aiming to create structured responses while focusing on interpretability and user interaction. With its wide-ranging abilities DeepSeek-R1 has actually captured the market's attention as a versatile text-generation design that can be integrated into numerous workflows such as agents, sensible [thinking](http://omkie.com3000) and information [interpretation jobs](http://106.55.61.1283000).<br>
<br>DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture [permits](https://andonovproltd.com) activation of 37 billion parameters, allowing efficient inference by routing inquiries to the most pertinent professional "clusters." This approach enables the model to specialize in different problem domains while maintaining overall effectiveness. DeepSeek-R1 requires a minimum of 800 GB of HBM memory in FP8 format for [forum.pinoo.com.tr](http://forum.pinoo.com.tr/profile.php?id=1322189) reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge includes 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 [distilled designs](https://vcanhire.com) bring the thinking [abilities](https://carrieresecurite.fr) 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 describes a procedure of training smaller sized, more effective models to [simulate](https://complete-jobs.co.uk) the behavior and thinking patterns of the larger DeepSeek-R1 model, using it as a teacher model.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest releasing this design with guardrails in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, avoid hazardous content, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:DannielleDixson) and examine designs against key safety criteria. At the time of writing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to various use cases and use them to the DeepSeek-R1 model, improving user experiences and [standardizing safety](https://git.andert.me) controls throughout your generative [AI](https://gitea.jessy-lebrun.fr) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, [89u89.com](https://www.89u89.com/author/sole7081199/) you require access to an ml.p5e instance. To inspect 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](https://git.sunqida.cn). To request a limit boost, develop a limitation increase request and connect to your account group.<br>
<br>Because you will be deploying this design with Amazon Bedrock Guardrails, make certain you have the correct AWS Identity and Gain Access To Management (IAM) authorizations to utilize Amazon Bedrock Guardrails. For instructions, see Set up consents to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, prevent hazardous material, and examine models against key security requirements. You can execute precaution for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to examine user inputs and model reactions 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 create the guardrail, see the GitHub repo.<br>
<br>The basic flow includes the following actions: 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 inference. After receiving the design's output, another guardrail check is used. If the output passes this last check, it's returned as the result. However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the intervention and whether it occurred at the input or output stage. The examples showcased in the following areas demonstrate inference using this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and specialized structure designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, select Model brochure under Foundation models in the navigation pane.
At the time of writing this post, you can use the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for [DeepSeek](https://vcanhire.com) as a service provider and choose the DeepSeek-R1 design.<br>
<br>The design detail page provides important details about the design's capabilities, prices structure, and application standards. You can discover detailed use guidelines, consisting of sample API calls and code bits for combination. The design supports numerous text generation jobs, consisting of content creation, code generation, and concern answering, using its reinforcement finding out optimization and CoT reasoning abilities.
The page likewise includes release choices and licensing details to help you begin with DeepSeek-R1 in your applications.
3. To start utilizing DeepSeek-R1, select Deploy.<br>
<br>You will be triggered to configure the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, enter a variety of [instances](https://gitea.alexconnect.keenetic.link) (between 1-100).
6. For example type, pick your circumstances type. For ideal performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is recommended.
Optionally, you can set up advanced security and facilities 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 review these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to begin utilizing the model.<br>
<br>When the deployment is total, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in playground to access an interactive user interface where you can experiment with different prompts and adjust design criteria like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal outcomes. For instance, content for reasoning.<br>
<br>This is an outstanding way to check out the model's thinking and text generation capabilities before integrating it into your applications. The play area offers instant feedback, assisting you understand how the design reacts to various inputs and [letting](https://linked.aub.edu.lb) you fine-tune your [triggers](http://120.79.27.2323000) for optimum results.<br>
<br>You can rapidly check the model in the playground through the UI. However, to invoke the deployed model programmatically with any Amazon Bedrock APIs, you require to get the [endpoint ARN](http://120.78.74.943000).<br>
<br>Run reasoning using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to perform reasoning utilizing a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can develop a [guardrail](https://cariere.depozitulmax.ro) using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have actually produced the guardrail, utilize the following code to implement guardrails. The script initializes the bedrock_runtime customer, [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:JeannetteI75) sets up reasoning parameters, and sends a demand to create text based upon a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an [artificial](https://sujansadhu.com) [intelligence](http://git.storkhealthcare.cn) (ML) center with FMs, built-in algorithms, and prebuilt ML services that you can deploy with just a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and deploy them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart offers two hassle-free methods: utilizing the instinctive SageMaker JumpStart UI or [carrying](http://experienciacortazar.com.ar) out programmatically through the SageMaker Python SDK. Let's explore both techniques to assist you pick the technique that finest fits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to release DeepSeek-R1 using SageMaker JumpStart:<br>
<br>1. On the SageMaker console, pick Studio in the navigation pane.
2. First-time users will be prompted to create a domain.
3. On the SageMaker Studio console, pick JumpStart in the [navigation pane](https://celticfansclub.com).<br>
<br>The model browser displays available models, with details like the service provider name and design capabilities.<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each model card shows crucial details, consisting of:<br>
<br>- Model name
[- Provider](http://damoa8949.com) name
- Task classification (for example, Text Generation).
[Bedrock Ready](https://video-sharing.senhosts.com) badge (if relevant), showing that this model can be registered with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to [conjure](https://src.enesda.com) up the design<br>
<br>5. Choose the design card to view the model details page.<br>
<br>The model details page includes the following details:<br>
<br>- The design name and service provider details.
Deploy button to release the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes essential details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you release the model, it's recommended to examine the model details and license terms to verify compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with deployment.<br>
<br>7. For Endpoint name, utilize the automatically created name or develop a customized one.
8. For example type ¸ choose an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, get in the variety of circumstances (default: 1).
Selecting appropriate circumstances types and counts is vital for cost and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, [Real-time inference](https://followmypic.com) is chosen by default. This is optimized for sustained traffic and low latency.
10. Review all setups for precision. For this model, we strongly recommend adhering to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to deploy the model.<br>
<br>The implementation process can take several minutes to finish.<br>
<br>When deployment is total, your endpoint status will alter to InService. At this point, the model is ready to [accept inference](https://git.muhammadfahri.com) [demands](https://medicalrecruitersusa.com) through the endpoint. You can keep an eye on the release progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the [release](https://gmstaffingsolutions.com) is total, you can invoke the design utilizing a SageMaker runtime client and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the required AWS consents and environment setup. The following is a detailed code example that demonstrates how to release and use DeepSeek-R1 for reasoning programmatically. The code for releasing the model is provided in the Github here. You can clone the notebook and run from SageMaker Studio.<br>
<br>You can run extra requests against the predictor:<br>
<br>Implement guardrails and run inference with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also 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 displayed in the following code:<br>
<br>Tidy up<br>
<br>To avoid undesirable charges, complete the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you deployed the design using Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace releases.
2. In the Managed releases section, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:JohnetteTonkin7) find the endpoint you want to erase.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're deleting the appropriate release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker [JumpStart model](https://git.qoto.org) you deployed will sustain expenses if you leave it running. Use the following code to erase the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.<br>
<br>Conclusion<br>
<br>In this post, we checked out 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 models, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting begun with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative [AI](http://60.204.229.151:20080) companies construct ingenious solutions using and sped up calculate. Currently, he is concentrated on establishing strategies for fine-tuning and optimizing the reasoning performance of big language models. In his downtime, Vivek enjoys hiking, watching films, and trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://epsontario.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](https://git.fracturedcode.net) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Specialist Solutions Architect working on generative [AI](https://peekz.eu) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://gitea.ndda.fr) center. She is enthusiastic about building services that help clients accelerate their [AI](http://work.diqian.com:3000) journey and unlock organization value.<br>