- 新しい順
- 投票が多い順
- コメントが多い順
There is a preloaded endpoint you can deploy using the AWS Marketplace: https://aws.amazon.com/marketplace/pp/prodview-dkwy6chb63hk2.
Otherwise, this link shows example to deploy on SageMaker: https://github.com/AI21Labs/SageMaker, specifically: https://github.com/AI21Labs/SageMaker/blob/main/AI21_Summarize_example_model_use.ipynb. And this blog post shows how to use AI21Labs with Jumpstart: https://aws.amazon.com/blogs/machine-learning/ai21-jurassic-1-foundation-model-is-now-available-on-amazon-sagemaker/
Hope this helps,
Jon
For this particular problem I recommend that you use additional strategies.
1.- Place the A21 model as an inference point
2.- It will be necessary to use additional libraries such as LangChain and LlamaIndex to manage the "Prompts" and feed the text. (It will be necessary use of "Embeddings")
3.- Adjust the Langchain (or LlamaIndex it is the same ) call to the model established in point 1
Works very well
The model is just the first step for this particular case.
Hi Jon, I have tried the repo you mentioned and the notebook for summarization. However, the API is meant to be able to take not just TEXT but also a URL and it doesn't seem to work : response = ai21.Summarize.execute( source=text,# i.e "https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger" sourceType="TEXT",# i.e "URL" sm_endpoint=endpoint_name ) Any ideas how to make it work?
Based on the documentation, there seems to be a length limit to 50k characters: https://docs.ai21.com/docs/summarize-api#summarize-long-text. You may try to use their segmentation API as explained here: https://docs.ai21.com/docs/text-segmentation-api. For support related to AI21Labs API, I recommend to reach out to their support.