-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLM Finetuning Toolkit #67
Conversation
@benjaminye Aren't we doing stratified sampling now? |
prompt_stub: | ||
>- # Stub to add for training at the end of prompt, for test set or inference, this is omitted; make sure only one variable is present | ||
{output} | ||
test_size: 10 # Proportion of test as % of total; if integer then # of samples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to differentiate between proportion and # of samples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is uniquely determined by the data type passed in.
proportion: float;
# of samples: int;
this is built into huggingface dataset
's train_test_split()
method.
bnb_4bit_quant_type: "nf4" | ||
|
||
# LoRA Params ------------------- | ||
lora: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we include neftune functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; you can enable it under sft_args
.
You can see all supported config settings under config_model.py
.
I have added explanations, expected type, and defaults for each setting (where applicable), and we can then use the model definitions to automatically generate documentation.
@benjaminye Let's ensure the packages we use only contain permissive licenses, i.e, Apache 2.0 and MIT. We should remove any dependencies that have copyleft license. |
Unfortunately this isn't as simple. I used huggingface's recommended Not loading into Moreover, since stratified sampling only applies to classification tasks, I decided to think about this a bit more and release it in the next update. |
I've checked all the new dependencies and they all have permissive licenses. |
Thanks for making the changes! |
This PR introduces a config-driven LLM fine-tuning experience.
Key Features
config.yaml
fileKey Modules
DatasetGenerator
: loads model into a huggingfaceDataset
object based on file extension (csv, json, or huggingface repo)ModelLoader
: manages loading of base model, appending lora weights, and merging lora weightsInferenceRunner
: runs merged model on test set, outputs live streaming predictions, and saves predictions into csvRoad Map
poetry
for dependency management