- Newest
- Most votes
- Most comments
When importing a custom model into Amazon Bedrock, you're encountering an issue with the model weights file. There are several requirements and potential solutions to address this problem:
First, for a successful model import into Amazon Bedrock, you need specific files in the Hugging Face weights format:
- .safetensors file (model weights in Safetensor format)
- config.json
- tokenizer_config.json
- tokenizer.json
- tokenizer.model
Looking at your S3 bucket screenshot, I notice you have config.json, consolidated.safetensors, params.json, tekken.jon, and tokenizer.json, but you're missing the tokenizer.model file which is required for the import process.
Additionally, there could be issues with the safetensor file itself. Amazon Bedrock only supports model weights with precision formats FP32, FP16, and BF16. If your consolidated.safetensors file is in a different format (like a quantized format), it won't be recognized properly.
For Mistral models specifically, you might need to convert the weights to the proper format. You can use the Mistral convert scripts to convert your model to a supported format if needed.
To resolve this issue:
- Make sure you have all required files, including tokenizer.model
- Verify that your safetensor file is valid and in a supported precision format
- Ensure all files are at the root level of your S3 bucket (which appears to be the case from your screenshot)
- If you're still having issues, you might need to download the model files from the official Mistral repository rather than from different community repositories, as mixing files from different sources could cause compatibility issues
If the error persists, you might need to check if the consolidated.safetensors file is corrupted or if it's in an incompatible format for Amazon Bedrock.
Sources
Import a customized model into Amazon Bedrock - Amazon Bedrock
Amazon Bedrock Custom Model Import now generally available | AWS Machine Learning Blog
The Safetensor files that you provided are not valid. Make sure the model weights are valid and that you can load them with the Safetensor method | AWS re:Post
Relevant content
- asked 8 months ago

Hello, I add the file tokenizer.model from this url https://huggingface.co/mistral-community/Mixtral-8x22B-v0.1-AWQ/blob/5992b45ecd439cf09c2e26724a0ff4a71c81619d/tokenizer.model but the error message ("Amazon Bedrock could not find the model weight files. Make sure model weight are in a supported format and try again. The supported formats are: [HuggingFace_SafeTensor].") remain the same.
Vincent