-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add package cli scripts #996
Comments
Along the lines of #982 (comment), we need to decide, what are the CLI calls for every script and how are they structured in directories. |
For instance, the top post says It's not clear to me right now if we will have a single Similar questions apply to generation, especially if we need to choose between |
I have a slight preference towards But one concern is also, hypothetically speaking, suppose we were to add RLHF with PPO & REINFORCE and DPO later. How would it look?
Or the following is also super complicated:
I will have to think about it more ... |
I think lora, dpo need to be different flags (--method lora) etc on the finetune subcommmand |
There's a jsonargparse bug blocking me from implementing it the way I thought: omni-us/jsonargparse#467. If we cannot find a fix or a workaround in time I would have to try |
Mauricio replied and seems like Instead I will do subcommands inside subcommands which will require rolling out our custom parser. The gist is: from jsonargparse import ArgumentParser
finetune_lora = ArgumentParser()
finetune_lora.add_argument("--lr")
finetune = ArgumentParser()
generate = ArgumentParser()
generate.add_argument("--num_tokens")
parser = ArgumentParser()
subcommands = parser.add_subcommands()
subcommands.add_subcommand("finetune", finetune)
subcommands.add_subcommand("generate", generate)
finetune_subcommands = finetune.add_subcommands()
finetune_subcommands.add_subcommand("lora", finetune_lora)
args = parser.parse_args()
print(args) |
I forgot to mention in my initial response, that recently added, it is possible to use |
Very interesting @mauvilsa. How do you set help messages in the subcommands? This is what I rolled out and what I would want to replace: https://github.com/Lightning-AI/litgpt/blob/wip/litgpt/__main__.py#L43-L127 |
Currently not possible. But I have thought that this could be added like: components = {
"weekday": {
"_help": "Help for weekday",
"tier1": Raffle(prize=100),
"tier2": Raffle(prize=50),
},
"weekend": {
"_help": "Help for weekend",
"tier1": Raffle(prize=300),
"tier2": Raffle(prize=75),
},
} If it is this simple, then implementing it wouldn't be difficult. |
The |
litgpt pretrain ...
litgpt finetune lora ...
litgpt chat
etc.
The text was updated successfully, but these errors were encountered: