AWS Security ChangesHomeSearch

AWS bedrock documentation change

Service: bedrock · 2025-05-13 · Documentation low

File: bedrock/latest/userguide/custom-model-import-code-samples-converse.md

Summary

Added Qwen model support and tokenizer configuration for Converse API compatibility.

Security assessment

Expands model support without introducing or modifying security-related content.

Diff

diff --git a/bedrock/latest/userguide/custom-model-import-code-samples-converse.md b/bedrock/latest/userguide/custom-model-import-code-samples-converse.md
index 984c1dee8..c382b960d 100644
--- a//bedrock/latest/userguide/custom-model-import-code-samples-converse.md
+++ b//bedrock/latest/userguide/custom-model-import-code-samples-converse.md
@@ -7 +7 @@
-If you're importing a Mistral or a Llama type instruct model and you want to use the [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or the [ConverseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) API ,make sure to include following `chat_template` in the `tokenizer_config.json`. Select the tab corresponding to the model type you are importing.
+If you're importing a Mistral, Llama, or Qwen type instruct model and you want to use the [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or the [ConverseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) API, make sure to include the `chat_template` for the model type you are importing in the `tokenizer_config.json`. Select the tab corresponding to the model type you are importing in the following table.
@@ -12500,0 +12501,45 @@ Mistral 7b
+Qwen2
+    
+    
+    
+    {
+      "add_prefix_space": false,
+      "added_tokens_decoder": {
+        "151643": {
+          "content": "<|endoftext|>",
+          "lstrip": false,
+          "normalized": false,
+          "rstrip": false,
+          "single_word": false,
+          "special": true
+        },
+        "151644": {
+          "content": "<|im_start|>",
+          "lstrip": false,
+          "normalized": false,
+          "rstrip": false,
+          "single_word": false,
+          "special": true
+        },
+        "151645": {
+          "content": "<|im_end|>",
+          "lstrip": false,
+          "normalized": false,
+          "rstrip": false,
+          "single_word": false,
+          "special": true
+        }
+      },
+      "additional_special_tokens": ["<|im_start|>", "<|im_end|>"],
+      "bos_token": null,
+      "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
+      "clean_up_tokenization_spaces": false,
+      "eos_token": "<|im_end|>",
+      "errors": "replace",
+      "model_max_length": 131072,
+      "pad_token": "<|endoftext|>",
+      "split_special_tokens": false,
+      "tokenizer_class": "Qwen2Tokenizer",
+      "unk_token": null
+    }
+