AWS Bedrock - Anthropic Claude V2 Max tokens

0

When invoking the model ("modelId": "anthropic.claude-v2") using boto3 version 1.28.59 with "max_tokens_to_sample" higher than 8191. I get an error: botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: 60000 is not less or equal to 8191, please reformat your input and try again.

One one the reasons I am looking into Claude 2 is its 100K tokens limit. Do I need to request getting 100K?

Thank you in advance! Max

Max M
질문됨 8달 전5018회 조회
2개 답변
2
수락된 답변

My bad. The documentation (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html#model-parameters-claude) clearly states that the longest output is 8K. The context size can be 100K, but the length of the response cannot exceed 8K. My use case was to decompose a document into Q&As, so my output is about the same size as the input and I will need to chunk documents into smaller pieces.

Max

Max M
답변함 8달 전
profile picture
전문가
검토됨 한 달 전
profile picture
전문가
검토됨 3달 전
0

The input/output sizes can change and https://docs.anthropic.com/claude/reference/input-and-output-sizes contains the latest info as of this writing :)

AWS
답변함 4달 전

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

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

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

관련 콘텐츠