commitGen-gguf / README.md
seniruk's picture
Update README.md
ef82c63 verified
---
datasets:
- bigcode/commitpackft
language:
- en
base_model:
- Qwen/Qwen2.5-Coder-1.5B-Instruct
pipeline_tag: text2text-generation
---
# Purpose
Used for generating high quality commit messages for a given git difference
### Model Description
Generated by fine tuning Qwen2.5-Coder-1.5B-Instruct on bigcode/commitpackft dataset for 2 epochs
Trained on a total of 277 Languages
Achieved a final training loss in the range of 1- 1.7 (due to data set not containing equal data rows for each language)
For common languages(python, java ,javascripts,c etc) loss went for a minimum of 1.0335
## Environmental Impact
- **Hardware Type:** geforce RTX 4060 TI - 16GB]
- **Hours used:** 10 Hours
- **Cloud Provider:** local
### Results
![Logo](./image1.png)
![Logo](./image2.png)
### Inference
```python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="seniruk/commitGen-gguf",
filename="commitGen.gguf",
)
diff="" #the git difference
instruction= "" #the instruction --> 'create a commit message for given git difference'
prompt = "{}{}".format(instruction,diff)
messages = [
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
{"role": "user", "content": prompt}
]
output = llm.create_chat_completion(
messages=messages,
temperature=0.5
)
llm_message = output['choices'][0]['message']['content']
print(llm_message)
```