Skip to content

Conversation

@YashasviChaurasia
Copy link
Contributor

@YashasviChaurasia YashasviChaurasia commented Nov 25, 2025

Description of the change

The PR adds tuning-config-recommender functionality to fms-hf-tuning simplifying the fine-tuning experience for the end user.

This contributes fms-recommender.py script which simplifies the tuning experience for the user and helps them avoid minor/major pitfalls which can hinder their tuning experience..
With the help of tuning-config-recommender now we can correct erroneous launch commands or get the recommender to provide suggestions for various flags used while fine-tuning.

The fms-recommender.py script has a --preview flag which would preview the suggested command and not execute it..
Note: by default without the --preview flag the suggested command is executed !

Following is a sample of running the command in preview mode:

python fms-recommender.py --preview tuning.sft_trainer \
--model_name_or_path ibm-granite/granite-4.0-h-350m \
--training_data_path tatsu-lab/alpaca \
--tuning_strategy full

Preview command:

image

Generates a valid data_config file with the datasets, chat-template, data_handlers, etc.

image

Generates a valid accelerate_config

image

Note:

Currently the tuning-config-recommender is undergoing review cycles before its first release and hence the pyproject.yaml is not linked to a release version..
for now the pyproject would install via main branch which might not work the same way as shown above due to pending essential PR's for FMSAdapter at : PR's are undergoing review!

The above commands can be replicated via installing recommender from the main branch

Related issue number

How to verify the PR

Was the PR tested

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass

@github-actions
Copy link

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

Signed-off-by: yashasvi <yashasvi@ibm.com>
@YashasviChaurasia
Copy link
Contributor Author

updated pyproject to use main branch until first release.
major changes were merged into main for tuning-config-recommender.

"simpleeval>=0.9.13,<2.0",
"pillow>=11.0.0,<12.0",
"kernels<=0.9.0",
"recommender @ git+https://github.com/foundation-model-stack/tuning-config-recommender.git",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not have a package for the recommender?

without pypi this could not be included in the release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we do not have a release for the recommender yet!
we can skip this PR for the current minor release if not urgent and required.

@@ -0,0 +1,156 @@
#!/usr/bin/env python3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placement of this wrapper inside tuning is a bit unclear.

Do we maintain separate packages with main inside the same folder?
Can we not place this outside?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ashokponkumar any suggestions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning was to keep it at the same level as sft_trainer.py so as the user can simply switch between recommender wrapper or directly use the sft_trainer.py itself..
The goal was to eventually abstract out the usage of sft_trainer.py inside the wrapper so with time the user would only use the wrapper; the wrapper would eventually toggle between recommendation mode vs no-recommendation mode in future updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants