commitcraft-0.5b
Conventional Commit message generator
2 min read
The commitcraft-0.5b model is built to automatically analyze code changes and generate clean, standardized git commit messages following the Conventional Commits specification. It is based on the compact Qwen/Qwen2.5-0.5B-Instruct base model and fine-tuned on real multilingual git diff patches. Thanks to its lightweight architecture (490M parameters), the solution delivers fast results and is ideal for local use in development utilities, automation scripts, and edge deployment without relying on heavy cloud APIs.
Key features
- High accuracy: demonstrates 100% compliance with the Conventional Commit standard on the test set (+25% gain over the base model).
- Fast performance: the compact size ensures minimal latency when generating messages for single diff files.
- Apache 2.0 license: open weights permit both commercial and academic use.
- Integration: fully compatible with standard transformers and peft library pipelines.
What you can do
- Git automation: embed the model into local scripts or hooks to automatically describe changes before committing.
- Agent integration: use it within developer AI assistants to structure workflows.
- Local microservices: deploy a fast endpoint to generate standardized development logs within a closed environment.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vennyvirtuoso/commitcraft-0.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model.eval()
raw_diff = """
diff --git a/auth/jwt.py b/auth/jwt.py
--- a/auth/jwt.py
+++ b/auth/jwt.py
@@ -10,3 +10,6 @@
+def verify_bearer_token(token: str) -> dict:
+ """Verify and decode incoming HS256 JWT bearer token."""
+ return jwt.decode(token, SECRET_KEY, algorithms=['HS256'])
"""
messages = [
{
"role": "system",
"content": "You are CommitCraft, an expert software engineering assistant..."
},
{
"role": "user",
"content": f"Synthesize a Conventional Commit message for this git diff:\n{raw_diff}"
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).strip())
Read more
DetailsBenchmarks: 100.00% compliance with the standard (vs 75.00% for the base model), commit type accuracy 62.50% (+52.00% over the base).
Latency: 145.85 ms for synthesizing a single diff.
Parameters: 490M (based on Qwen2.5-0.5B-Instruct).
License: Apache 2.0.










Comments