Skip to content

Bedrock - Fine-Tuned Inference Bug

0

I am having difficulty querying my fine-tuned Nova Lite 2 model via on-demand inference. I was able to set up on-demand inference via the web interface and successfully query the fine-tuned model in the playground. However, when I try to query the model via the SDK with the custom model deployment id, the response looks like it comes from the base model not my fine-tuned version.

Also, I tried to query the fine-tuned model using the CLI command provided by the playground under "View API request". This failed since inputText and textGenerationConfig fields are no longer supported. After adjusting these fields, I was able to submit the query but received a response that looks like it came from the base model.

2 Answers
0

It sounds like you're encountering a common issue with fine-tuned models in Amazon Bedrock. For custom fine-tuned models, there are two main options for setting up inference:

  1. Provisioned Throughput: This option provides dedicated compute capacity with guaranteed throughput for consistent performance and lower latency. For most fine-tuned models (except Amazon Nova), you must purchase Provisioned Throughput and use the resulting Provisioned Model ARN instead of the original model ARN in your API calls.

  2. On-demand inference: This requires deploying your custom model with a custom model deployment. After deployment, you invoke it using the ARN for the custom model deployment, and you only pay for what you use.

The issue you're experiencing is likely related to how you're referencing your fine-tuned model. When using the SDK or CLI, make sure you're using the correct ARN or ID for your custom model deployment, not the base model ID. If you're using the original model ARN directly in API calls, you might receive responses from the base model instead of your fine-tuned version.

Also, the API format for model invocation has changed, which explains why the "View API request" from the playground didn't work directly. You need to use the current API format with the correct parameters for your specific model.

To resolve this:

answered 9 months ago

  • I think I am using the correct ARN. It has the following structure - arn:aws:bedrock:us-east-1:abcabcabcabc:custom-model-deployment/abcabcabcabc. This is the same ARN in the playground CLI command.

0

Dear Customer,

Thank you for confirming that you're using the correct ARN for your custom model deployment.

I understand it's frustrating to see differences in response quality between your fine-tuned model and the base model. Since this requires deeper investigation into your specific model configuration and training data, I recommend opening a support case with the Bedrock team [1].

When creating the case, please include:

  • custom model deployment ARN
  • Example prompts showing the quality difference
  • Expected vs. actual outputs

[1] https://docs.aws.amazon.com/awssupport/latest/user/case-management.html

AWS

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.