Generate git commit message using fine-tuned LLM
Project description
git-gen
Generate git commit message with a local LLM, which has been fine-tuned on 300K high-quality Python commits and is able to analyze the purposes of the changes
Installation
Required Python 3.10+
To install this package, run:
pip install git-gen
Uses
To generate git commit message in current working directory, run:
git-gen
Generate with custom config:
git-gen --temperature 0.2 --top_k 50 --top_p 0.7
To get all command options, run:
git-gen -h
which should output
Usage: [OPTIONS]
Options:
--path PATH Path to the project, which should contain a '.git' folder. Default to current working directory.
--max_tokens INTEGER RANGE The maximum numbers of tokens to generate. [default: 1024; x>=1]
--temperature FLOAT RANGE Control the overall probabilities of the generation. Prefer lower temperature for higher accuracy and higher temperature for
more varied outputs. [default: 0.7; x>0]
--top_k INTEGER RANGE Limit the number of vocabs to consider. [default: 20; x>=1]
--top_p FLOAT RANGE Limit the set of vocabs by cumulative probability. [default: 0.8; 0<x<=1]
-h, --help Show this message and exit.
FAQ
There are a lot of similar projects. Why would I use this?
A good commit message should reflect the purpose of the changes made concisely. Most LLMs failed to do that at zero-shot learning. This project aims to generate messages that focus on the "why" instead of "what", by using a fine-tuned model on 300K high-quality Python commits.
Moreover, it only uses local LLM. You code is safe from the internet.
License
git-gen is distributed under the terms of the MIT license.
Notes
Build and push project
python -m pip install --upgrade build
python -m build
python -m pip install --upgrade twine
python -m twine upload --repository pypi dist/* --verbose
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_gen_utils-0.0.1.tar.gz.
File metadata
- Download URL: git_gen_utils-0.0.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f458f6a737f41cfafeb702321c47460e379ce5117d9ad84403b9baac04c3b44
|
|
| MD5 |
b599b582f4eaed4b2cbacf6d2941a155
|
|
| BLAKE2b-256 |
9704480ac85b02fcdb9cfa8ebadc2e39c94d9873b335dc757742b1fe186df10e
|
File details
Details for the file git_gen_utils-0.0.1-py3-none-any.whl.
File metadata
- Download URL: git_gen_utils-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3596b75d644a605e4dff8be40706ca92dab8b521fe571c6f288bac13eb1632
|
|
| MD5 |
7421ad1ba51511a6f0d2c60447e65d57
|
|
| BLAKE2b-256 |
c9134087e3a8eeb7f41c89c4345499fc850f8761e8999a9247072aea9d0c0a55
|