AI Cloud Architect

Cost-efficient custom text-to-SQL using Amazon Nova Micro and Amazon Bedrock on-demand inference

AWSHow-to by Zeek Granston and Felipe LopezAWS Artificial Intelligence Blog

In this post, we demonstrate two approaches to fine-tune Amazon Nova Micro for custom SQL dialect generation to deliver both cost efficiency and production ready performance.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to fine-tune Nova Micro for custom SQL dialects with LoRA via Bedrock managed customization or SageMaker AI training, then serve it on Bedrock on-demand inference.

Who it is for

Teams building text-to-SQL on custom SQL dialects who want to avoid paying for persistently hosted fine-tuned models.

Key points

  • Fine-tuned model is served on Bedrock on-demand inference at base Nova Micro per-token prices; the post cites a $0.80 monthly example for 22,000 queries.
  • Training cost is about $8 on Bedrock managed customization and about $65 on SageMaker AI (ml.g5.48xlarge, about 4 hours).
  • Cold-start time to first token averaged 639 ms (34% higher than base); warm TTFT averaged 380 ms (7% higher), per the post's tests.

The same at other vendors

Timeline

  1. Read firstCustomize Amazon Nova models with Amazon Bedrock fine-tuning · AWS · How-to
  2. This postCost-efficient custom text-to-SQL using Amazon Nova Micro and Amazon Bedrock on-demand inference
  3. Customer storyFine-tune Amazon Nova models for accurate email data extraction · AWS · Customer story
  4. Read firstThe generative AI customization spectrum: From prompt engineering to custom models on AWS · AWS · How-to

Go deeper