Home icon

Import a fine-tuned Meta Llama 3 model for SQL query generation on Amazon Bedrock

Machine Learning Blog



This article describes how to import a fine-tuned Meta Llama 3 model for SQL query generation into Amazon Bedrock, a fully managed service for generative AI applications.

Specifically, the article covers:

  • Solution overview for importing a fine-tuned model into Amazon Bedrock
  • Data preparation and fine-tuning the Meta Llama 3 8B model on SageMaker using QLoRA and PyTorch FSDP
  • Importing the fine-tuned model into Amazon Bedrock using the Custom Model Import feature
  • Evaluating the SQL queries generated by the fine-tuned model using the Amazon Bedrock Text Playground and an LLM judge
  • Best practices for fine-tuning and using imported models for code generation tasks


Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Jul 23
2024
Meta Llama 3.1 generative AI models now available in Amazon Bedrock
Sep 30
2024
Import a question answering fine-tuned model into Amazon Bedrock as a custom model
Mar 14
2025
Meta’s Llama 3.2 models are now available for fine-tuning in Amazon Bedrock
Apr 23
2024
Meta Llama 3 models are now available in Amazon Bedrock

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.