Claude V2 api read operation time out exception.

0

I am getting a consistent error of - The read operation timed out.
AWSHTTPSConnectionPool(host='bedrock-runtime.us-east-1.amazonaws.com', port=443): Read timed out. (read timeout=60). This occurs after 5 mts when the document text which I am sending exceeds 20K words. On trying with different values to max_tokens_to_sample parameter, api is throwing throttle exception. Any leads on how to proceed? Thanks in advance.

1개 답변
0

Hi,

You write "v2", did you try with v2, ie. v2.0 or v2.1? I would suggest to try with 2.1 as it is specifically adapted to large inputs (to 200k tokens)

Also, you can try to initially adjust prompt parameters like temperature, top_k, top_p to reduce Claude's creativity: that may lead to less operations when inferring. So higher chance to not time out.

Additionally, I'd try to start with less than 20k words in my prompt and increase incrementally to see where the limit is.

Best,

Didier

profile pictureAWS
전문가
답변함 5달 전
  • I am getting response if using Claude V2 for relatively shorter tokens(lets say 12K words). body= json.dumps({ "prompt": f"\n\nHuman: {usercontent}\n\nAssistant: {assistant}", "max_tokens_to_sample": 2000, "temperature": 0.3, "top_p": 1, })

    modelId = 'anthropic.claude-v2' contentType= 'application/json' accept= 'application/json'

    However, if I am replacing the modelId with 'anthropic.claude-v2:1'. I am getting empty result for shorter tokens and time out for bigger ones.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠