litgpt icon indicating copy to clipboard operation
litgpt copied to clipboard

Suggest pinned commits in config URLs

Open carmocca opened this issue 1 year ago • 2 comments

Our tutorials have suggestions like

litgpt finetune lora \
  --config https://raw.githubusercontent.com/Lightning-AI/litgpt/main/config_hub/finetune/llama-2-7b/lora.yaml \
  --lora_r 4

But this has the drawback that it will stop working if:

  • The config is updated in main and the user did not upgrade
  • The config is moved

So we should suggest a specific commit:

https://raw.githubusercontent.com/Lightning-AI/litgpt/396bae5/config_hub/finetune/llama-2-7b/lora.yaml

The disadvantage is that we will need to remember to update this commit. Maybe we could automate this with a GitHub workflow

Thoughts or suggestions?

carmocca avatar Mar 17 '24 08:03 carmocca

I see two additional options:

  1. The installed litgpt package can know the version it is at and then replace the tag in the URL that the user pastes.
  2. We could support --config litgpt://name.yaml as a way to substitute the URL to the config_hub and automatically choose the right tag in the commit history. This would also make the links shorter for docs.

awaelchli avatar Mar 18 '24 15:03 awaelchli

Probably 2 would be better here so users could still use full urls to main if they wanted to deliberately.

awaelchli avatar Mar 18 '24 15:03 awaelchli