Git Assistant — Qwen2.5-Coder 1.5B

An experimental GRPO fine-tune of Qwen/Qwen2.5-Coder-1.5B-Instruct for generating executable Git-operation instructions. The model is intended to help with small, well-scoped repository tasks such as initializing repositories, creating branches, committing files, tagging releases, and merging branches.

This repository contains the standalone merged 16-bit model. The LoRA adapter and intermediate checkpoints are not included.

Intended use

Use this model as a coding-assistant component that proposes Git commands for human review or execution inside an independently controlled sandbox. Treat generated commands as untrusted output: inspect them before execution and restrict the execution environment to the intended repository.

Training

The model was trained with a container-compatible direct-Python adaptation of the Agent Training Execution Playbook:

  • Base model: Qwen/Qwen2.5-Coder-1.5B-Instruct
  • Method: LoRA + GRPO
  • Training length: 15 optimizer steps across 3 epochs
  • Generations per prompt: 4
  • Maximum sequence length: 2,048 tokens
  • Precision: BF16 when supported by the GPU
  • Optimizer: 8-bit AdamW
  • Learning rate: 5e-6
  • Tasks: init_commit, branch_create, commit_and_tag, and merge_branch
  • Rewards: response-format checks plus an isolated Git sandbox verifier

The Git verifier used an isolated temporary HOME, fixed Git identity, command timeouts, path restrictions, and blocked high-risk shell commands. The run is intentionally small and experimental; it is not a benchmark-quality or production-quality training run. No external training dataset was used beyond the synthetic task prompts defined for this experiment.

Limitations and safety

  • The 15-step run is a smoke-scale fine-tune, so behavior may be inconsistent across task wording and repository states.
  • The model can produce incorrect, incomplete, or unsafe shell commands. Always review generated commands before execution.
  • The reward verifier covered only the four task templates above and should not be treated as broad Git competence evaluation.
  • No standardized coding benchmark or human evaluation was run for this release.
  • The model does not provide a security guarantee and should not receive unrestricted shell access, credentials, or network access.

Transformers usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "rajivmehtapy/git-assistant-qwen2.5-coder-1.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "system",
        "content": (
            "You are an expert Git automation assistant. Provide executable "
            "bash commands and explain the expected repository state."
        ),
    },
    {
        "role": "user",
        "content": (
            "In directory project, create app.py containing print(\"hello\"), "
            "commit it with message 'Add app', and create tag v1.0."
        ),
    },
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))

vLLM usage

vllm serve rajivmehtapy/git-assistant-qwen2.5-coder-1.5b \
  --served-model-name git-assistant \
  --max-model-len 2048

The source-container validation used vLLM 0.26.0 with eager execution and its non-FlashInfer sampler because that container's bundled CUDA compiler and headers were incompatible with FlashInfer JIT compilation. Other environments may use their normal vLLM configuration.

License and attribution

This derivative model is released under the Apache License 2.0, consistent with the base model's published license. Please review the Qwen model license and usage terms before redistribution or deployment.

Downloads last month
105
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for rajivmehtapy/git-assistant-qwen2.5-coder-1.5b

Finetuned
(190)
this model