1 Answer
- Newest
- Most votes
- Most comments
0
Hi, I just tested it, and it worked well in my enviroment.
First, I assume you have update the repo to the latest version, of which the commit hash should be cfecb6215c8171ba2580949a426193ccaf4c5b7f by the time I write this answer.
Then, edit this section below in the file 02_Summarization/02.long-text-summarization-titan.ipynb,
from langchain.llms.bedrock import Bedrock
# llm = Bedrock(
# model_id="amazon.titan-tg1-large",
# model_kwargs={
# "maxTokenCount": 4096,
# "stopSequences": [],
# "temperature": 0,
# "topP": 1,
# },
# client=boto3_bedrock,
# )
llm = Bedrock(
# model_id="anthropic.claude-v1",
model_id="anthropic.claude-v2",
model_kwargs={
"max_tokens_to_sample":4096,
"temperature":0.5,
"top_k":250,
"top_p":0.5,
"stop_sequences":[]
},
client=boto3_bedrock,
)
shareholder_letter = "./letters/2022-letter.txt"
with open(shareholder_letter, "r") as file:
letter = file.read()
llm.get_num_tokens(letter)
Then run 02_Summarization/02.long-text-summarization-titan.ipynb from the beginning, you should get the output: 6526
answered 7 months ago
Relevant content
- Accepted Answerasked 7 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago