Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 2.35 KB

CONTRIBUTING.md

File metadata and controls

67 lines (44 loc) · 2.35 KB

Contributing to LLaMA Factory

Everyone is welcome to contribute, and we value everybody's contribution. Code contributions are not the only way to help the community. Answering questions, helping others, and improving the documentation are also immensely valuable.

It also helps us if you spread the word! Reference the library in blog posts about the awesome projects it made possible, shout out on Twitter every time it has helped you, or simply ⭐️ the repository to say thank you.

However you choose to contribute, please be mindful and respect our code of conduct.

This guide was heavily inspired by transformers guide to contributing.

Ways to contribute

There are several ways you can contribute to LLaMA Factory:

  • Fix outstanding issues with the existing code.
  • Submit issues related to bugs or desired new features.
  • Contribute to the examples or to the documentation.

Style guide

LLaMA Factory follows the Google Python Style Guide, check it for details.

Create a Pull Request

  1. Fork the repository by clicking on the Fork button on the repository's page. This creates a copy of the code under your GitHub user account.

  2. Clone your fork to your local disk, and add the base repository as a remote:

git clone [email protected]:[username]/LLaMA-Factory.git
cd LLaMA-Factory
git remote add upstream https://github.com/hiyouga/LLaMA-Factory.git
  1. Create a new branch to hold your development changes:
git checkout -b dev_your_branch
  1. Set up a development environment by running the following command in a virtual environment:
pip install -e ".[dev]"

If LLaMA Factory was already installed in the virtual environment, remove it with pip uninstall llamafactory before reinstalling it in editable mode with the -e flag.

  1. Check code before commit:
make commit
make style && make quality
make test
  1. Submit changes:
git add .
git commit -m "commit message"
git fetch upstream
git rebase upstream/main
git push -u origin dev_your_branch
  1. Create a merge request from your branch dev_your_branch at origin repo.