Developer Git Commit Agent ๐Ÿค–

An specialized, ultra-lightweight AI agent fine-tuned to automatically generate concise, clean, and professional Git commit messages directly from messy code changes (diffs).

Built specifically to optimize workflows for software engineers and developers.

๐Ÿš€ Quickstart: How to Use

You can easily load and run this model locally in your terminal or scripts using the Hugging Face transformers library.

from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the model directly from the Hub
model_id = "YOUR_HF_USERNAME/developer-git-commit-agent"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

# Paste your messy git diff here
git_diff = """
- const port = 3000;
+ const port = process.env.PORT || 5000;
"""

# Format prompt using the agent's system instructions
messages = [
    {"role": "system", "content": "You are an expert software engineer agent. Write a concise, professional Git commit message based on the provided code diff."},
    {"role": "user", "content": f"Code Diff:\n{git_diff}"}
]

inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=60)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: feat(config): allow dynamic port assignment via environment variables, defaulting to 5000.

๐Ÿ“Š Training Details

  • Base Model: Qwen2.5-Coder-0.5B-Instruct
  • Dataset: Maxscha/commitbench (Targeted real-world engineering GitHub commits)
  • Method: Parameter-Efficient Fine-Tuning (LoRA)
Downloads last month
372
Safetensors
Model size
0.5B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for nivethitha1703/developer-git-commit-agent

Finetuned
(99)
this model
Quantizations
1 model

Space using nivethitha1703/developer-git-commit-agent 1