Lightning-AI / litgpt

Pretrain, finetune, deploy 20+ LLMs on your own data. Uses state-of-the-art techniques: flash attention, FSDP, 4-bit, LoRA, and more.
https://lightning.ai
Apache License 2.0
6.85k stars 726 forks source link

Add release workflow #1381

Closed rasbt closed 1 week ago

rasbt commented 2 weeks ago

As discussed in #1348 @carmocca, this is a workflow for publishing to PyPI. I used this previously in my BioPandas package, and it worked great. You basically just need to add the PyPI API tokens as described here https://dev.to/iamtekson/publish-package-to-pypi-and-release-new-version-using-github-actions-108k

Fixes #1348

Learneducn commented 1 week ago

Hello, excuse me. When I follow the tutorial and use your script "convert_lit_checkpoint.py" to convert the llama-2-7b-hf model, the following error always appears. I don’t know how to solve it.

[root@localhost RobustGER-master]# sh conv_model.sh usage: convert_lit_checkpoint.py [-h] [--config CONFIG] [--print_config[=flags]] --checkpoint_name CHECKPOINT_NAME --out_dir OUT_DIR --model_name MODEL_NAME error: Validation failed: No action for key "_name_or_path" to check its value.

rasbt commented 1 week ago

Unfortunately I don't have access to that, but @lantiga can maybe help here since he also made the past LitGPT releases when I remember correctly

carmocca commented 1 week ago

Merging. I'll add my own token and try it out

carmocca commented 1 week ago

Worked flawlessly: https://github.com/Lightning-AI/litgpt/actions/runs/8999883396/job/24722989843, https://pypi.org/project/litgpt/#history

Thanks Seb!

rasbt commented 1 week ago

Awesome, glad to hear!