--- language: - en license: mit library_name: transformers tags: - conventional-commits - qwen2.5-coder - text-generation - code-llm - fine-tuned --- # Qwen Commit Merged - Conventional Commit Message Generator Generates conventional commit messages from git diffs using a fine-tuned Qwen2.5-Coder-3B model. This is a standalone merged model (LoRA adapters merged into base model) ready for direct use. ## Model Details - **Model**: Qwen2.5-Coder-3B fine-tuned on conventional commits - **Fine-tuning Method**: QLoRA (4-bit quantized, rank=8, alpha=16) - **Training Data**: 210 real conventional commits from open-source repositories - **Model Size**: ~3B parameters - **Format**: Merged model (no base model required) ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer # Load merged model directly model = AutoModelForCausalLM.from_pretrained( "Pavloffm/qwen-commit-merged", torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("Pavloffm/qwen-commit-merged") # Generate commit message diff = """diff --git a/src/main.py b/src/main.py index 1234567..abcdefg 100644 --- a/src/main.py +++ b/src/main.py @@ -1,3 +1,5 @@ +def new_feature(): + pass """ messages = [{"role": "user", "content": f"Generate a conventional commit message for this diff:\n{diff}"}] inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=100) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ## Training - **Base Model**: Qwen/Qwen2.5-Coder-3B-Instruct - **Epochs**: 2 - **Learning rate**: 1.5e-4 - **LoRA rank**: 8, alpha: 16 - **Training examples**: 210 ## License MIT License