Using a Model Hosted on AWS SageMaker
You can deploy an open source model on AWS SageMaker and use it in your deepset Cloud pipelines through PromptNode. This way, the model runs in your own account and you can use larger models than in deepset Cloud.
Prerequisites
- An Amazon Web Services account with an Amazon SageMaker Studio domain configured. If you need help, see the Amazon SageMaker documentation.
- A draft pipeline with a PromptNode. For help, see Create Pipeline and Generative Question Answering Pipelines.
Using a Model in Your Pipeline
There are two steps you must perform:
- Deploy the model in SageMaker.
- Add the model to your deepset Cloud pipeline.
Deploying the Model in SageMaker
- Log in to AWS and open Amazon SageMaker.
- In the navigation, click Studio.
- Once you're in Studio, select your user profile in the Get Started section and click Open Studio.
- From the navigation, choose SageMaker JumpStart>Models, notebooks, solutions.
- In the Foundation Models: Text Generation section, open the model you want to use and click Deploy.
- Copy the endpoint name from the Endpoint details section.
Adding the Model to Your Pipeline
- Log in to deepset Cloud and go to Pipelines.
- Click the three dots next to the pipeline that should use the model hosted on SageMaker and click Edit.
- In the YAML components section, find PromptNode and specify the following parameters for it:
components: - name: PromptNode type: PromptNode params: default_prompt_template: question-answering #type the name of the prompt you want to use model_name_or_path: <sagemaker_endpoint_name> model_kwargs: aws_profile_name: <your_aws_profile_name> aws_region_name: <your_aws_region>
- Save your pipeline.
What's Next
Now you can deploy your pipeline to experiment with different prompts, gather feedback, and eventually use it for search in production.
Updated over 1 year ago