Views
No views yet
Qwen/Qwen2.5-Coder-1.5B-Instruct5e-6init_commit, branch_create, commit_and_tag, and merge_branchHOME, 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.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "rajivmehtapy/git-assistant-qwen2.5-coder-1.5b"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11
12messages = [
13 {
14 "role": "system",
15 "content": (
16 "You are an expert Git automation assistant. Provide executable "
17 "bash commands and explain the expected repository state."
18 ),
19 },
20 {
21 "role": "user",
22 "content": (
23 "In directory project, create app.py containing print(\"hello\"), "
24 "commit it with message 'Add app', and create tag v1.0."
25 ),
26 },
27]
28
29inputs = tokenizer.apply_chat_template(
30 messages,
31 add_generation_prompt=True,
32 return_tensors="pt",
33).to(model.device)
34outputs = model.generate(inputs, max_new_tokens=256, do_sample=False)
35print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))1vllm serve rajivmehtapy/git-assistant-qwen2.5-coder-1.5b \
2 --served-model-name git-assistant \
3 --max-model-len 2048