Repository navigation
fix(training-ref-arch): repair the model fine-tuning pipeline and upgrade its dependencies - #617
Open
karajendran wants to merge 2 commits into
Open
karajendran wants to merge 2 commits into
karajendran wants to merge 2 commits into
Conversation
…rade its dependencies The data preparation step of the model fine-tuning pipeline called Llama 3.1 on Vertex AI (MaaS), which is no longer available, and the data processing step no longer wrote the columns that the data preparation reads. - Data preparation: generate the questions and answers from templates with Ray Data, on the Ray cluster of the data processing step (modules/python/src/datapreparation). The step needs no model API, and preparing the data again gives the same data set. Six questions for each product. - Data processing: write the full cleaned catalog again. - Fine-tuning: move to PyTorch 2.15, transformers 5.23, trl 1.18 and peft 0.22, and adapt the script to their APIs. Save a copy of the adapter with every checkpoint and load it when the job resumes, because peft 0.20.0 and later don't restore the adapter of a model that is distributed with FSDP. Stop with an error instead of saving a model without the fine-tuning. Use the AdamW optimizer of PyTorch, the bitsandbytes optimizer fails at the first checkpoint. The job for the NVIDIA A100 accelerators uses a batch size of 8 and the "job-1" values of the README. - Model evaluation: vLLM v0.34.0. Send the questions concurrently, and compare the predictions with the expected answers (exact answers, product details accuracy). - Ray 2.60.0, MLflow 3.18.0, Python 3.12.16 base images. The MLflow tracking server keeps a copy of its database before it upgrades the schema. - Terraform: the data preparation step no longer needs access to Vertex AI. - Guides: steps, results and durations of a run on two NVIDIA A100 accelerators.
…guides - Fine-tuning guide: the command that deletes the model folder is an optional step before the job is created. It was listed after the job had succeeded, where it deletes the fine-tuned model. - Guides: up to six questions for each product; the evaluation uses the validation and the test data sets together; the L4 inference deployment was not run; the results of the base job are described with their numbers; the screenshots of the previous data preparation job are removed and its diagram is marked as such; the earlier results keep the "Built with Meta Llama 3.1" notice. - Comments: the workaround in fine_tune.py names the peft issue and when it can be removed; the packages that the Ray workers install are marked as temporary; the Dockerfile says which torch build is installed; the test of the category split says which pandas version it guards. No change to executable code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The model fine-tuning pipeline of the training reference architecture no longer ran: its data preparation step called Llama 3.1 on Vertex AI (MaaS), which is no longer available.
modules/python/src/datapreparation, with unit tests). No model API is needed, and the dataset is reproducible. Six questions for each product.set_peft_model_state_dictsilently loads nothing into an FSDP-wrapped model since 0.20.0 (Trainerresume loses the adapter) huggingface/peft#4223). It stops with an error instead of saving a model without the fine-tuning. The A100 job uses a batch size of 8 and the "job-1" values.Validation
terraform fmtpass.unsloth/gemma-2-9b-it, an ungated copy ofgoogle/gemma-2-9b-it.