Skip to content

Commit

Permalink
Update amazon_bedrock_tokenizer.py (#1654)
Browse files Browse the repository at this point in the history
Co-authored-by: Collin Dutter <[email protected]>
  • Loading branch information
ennio1991 and collindutter authored Feb 10, 2025
1 parent 5fe6cf0 commit c9441fd
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions griptape/tokenizers/amazon_bedrock_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,32 @@ class AmazonBedrockTokenizer(BaseTokenizer):
"cohere.command": 4000,
"cohere": 1024,
"ai21": 8192,
"meta.llama3": 8000,
"meta.llama2": 4096,
"mistral": 32000,
"amazon": 4096,
"meta.llama3-8b-instruct": 8000,
"meta.llama3-70b-instruct": 8000,
"meta.llama3-2-1b-instruct": 131000,
"meta.llama3-2-3b-instruct": 131000,
"meta.llama3": 128000,
"mistral.large-2407": 128000,
"mistral.mistral": 32000,
"mistral.mixtral": 32000,
"amazon.nova-micro-v1": 128000,
"amazon.nova": 300000,
"amazon.titan-text-express-v1": 8000,
"amazon.titan-text-lite-v1": 4000,
"amazon.titan-text-premier-v1": 32000,
}
MODEL_PREFIXES_TO_MAX_OUTPUT_TOKENS = {
"anthropic.claude-3-5": 8192,
"anthropic.claude": 4096,
"cohere": 4096,
"ai21.j2": 8191,
"meta": 2048,
"amazon.titan-text-lite": 4096,
"amazon.titan-text-express": 8192,
"amazon.titan-text-premier": 3072,
"amazon": 4096,
"mistral": 8192,
"amazon.nova": 5000,
"mistral.mistral": 8192,
"mistral.mixtral": 4096,
}

model: str = field(kw_only=True)
Expand Down

0 comments on commit c9441fd

Please sign in to comment.