File size: 6,469 Bytes
64f9842
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7a7ec3
64f9842
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
license: apache-2.0
base_model: Qwen/Qwen2.5-1.5B-Instruct
datasets:
  - m-a-p/CodeFeedback-Filtered-Instruction
language:
  - en
pipeline_tag: text-generation
library_name: gguf
tags:
  - code
  - coding-assistant
  - qwen2
  - qlora
  - sft
  - gguf
  - llama.cpp
  - ollama
---

# AutoDevvLM

AutoDevvLM is a small, code-focused language model fine-tuned from [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct). It was trained with QLoRA on general code-instruction data and is distributed in **GGUF** format for local inference with llama.cpp, Ollama, LM Studio and similar tools.

> **Note:** AutoDevvLM is a fine-tune of Qwen2.5-1.5B-Instruct. It is not an independent model, and it may still identify itself as Qwen unless given a system prompt (see [Usage](#usage)).

## Model Details

| | |
|---|---|
| **Developed by** | `Vivek A` |
| **Base model** | `Qwen/Qwen2.5-1.5B-Instruct` |
| **Architecture** | Qwen2 (`Qwen2ForCausalLM`), ~1.5B parameters |
| **Context length** | 32,768 tokens in the architecture; training used sequences up to 1,024 tokens |
| **Fine-tuning method** | Supervised fine-tuning (SFT) with QLoRA |
| **Language** | English (primary) |
| **License** | Apache 2.0 |
| **Format** | GGUF (quantized) |

## Files

| File | Description | Approx. size |
|---|---|---|
| `AutoDevvLM-Q4_K_M.gguf` | 4-bit quantized, recommended for most local use | ~1 GB |
| `AutoDevvLM-f16.gguf` *(optional)* | Full FP16 precision | ~3 GB |

## Intended Use

AutoDevvLM is intended for lightweight, local coding assistance:

- Writing short functions and scripts
- Explaining code and simple debugging
- Answering general programming questions
- Experimentation and learning about fine-tuning small models

## Out-of-Scope Use

- Safety-critical or production-critical code generation without human review
- Security-sensitive tasks (generated code may contain vulnerabilities)
- Factual, legal, medical or financial advice
- Use as a general-purpose assistant for tasks far outside programming

## Usage

The model uses the Qwen (ChatML) chat format. The template is embedded in the GGUF, so most runtimes apply it automatically.

### llama.cpp

```bash
llama-cli -m AutoDevvLM-Q4_K_M.gguf -cnv \
  -sys "You are AutoDevvLM, a helpful coding assistant."
```

### Ollama

Create a `Modelfile`:

```
FROM ./AutoDevvLM-Q4_K_M.gguf
SYSTEM """You are AutoDevvLM, a coding assistant. Help with writing, debugging and explaining code."""
PARAMETER temperature 0.2
```

Then:

```bash
ollama create autodevvlm -f Modelfile
ollama run autodevvlm
```

### Python (llama-cpp-python)

```python
from llama_cpp import Llama

llm = Llama(model_path="AutoDevvLM-Q4_K_M.gguf", n_ctx=4096)

out = llm.create_chat_completion(
    messages=[
        {"role": "system", "content": "You are AutoDevvLM, a helpful coding assistant."},
        {"role": "user", "content": "Write a Python function that checks whether a string is a valid IPv4 address."},
    ],
    max_tokens=400,
    temperature=0.2,
    top_p=0.95,
)
print(out["choices"][0]["message"]["content"])
```

**Suggested sampling settings:** temperature 0.2 to 0.4, top_p 0.95 for code.

## Training Details

### Training data

[`m-a-p/CodeFeedback-Filtered-Instruction`](https://huggingface.co/datasets/m-a-p/CodeFeedback-Filtered-Instruction) (Apache 2.0). A random subset of **8,000** examples was used after filtering out examples longer than 1,024 tokens, with a 2% hold-out for evaluation loss. Each example was formatted with the Qwen chat template (user query, assistant answer).

### Training procedure

| Setting | Value |
|---|---|
| Method | QLoRA (4-bit NF4 with double quantization, via `bitsandbytes`) |
| Compute precision | FP16 (BF16 not used; NVIDIA T4 lacks native BF16) |
| LoRA rank / alpha / dropout | 16 / 32 / 0.05 |
| LoRA target modules | `q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj` |
| Epochs | 1 |
| Batch size | 2 per device x 8 gradient accumulation (effective 16) |
| Learning rate | 2e-4, cosine schedule, 3% warmup |
| Optimizer | `paged_adamw_8bit` |
| Max grad norm | 0.3 |
| Max sequence length | 1,024 |
| Gradient checkpointing | Enabled |
| Hardware | Google Colab, 1x NVIDIA Tesla T4 (16 GB) |
| Frameworks | Transformers, PEFT, TRL, bitsandbytes |

### Export

The LoRA adapter was merged into the FP16 base model, converted to GGUF with llama.cpp's `convert_hf_to_gguf.py`, and quantized to Q4_K_M with `llama-quantize`.

## Evaluation

No formal benchmark evaluation has been run for this model yet. Results on HumanEval, MBPP or similar benchmarks have not been measured, and no claim is made that it outperforms the base model. Users are encouraged to compare outputs against `Qwen2.5-1.5B-Instruct` on their own tasks.

## Limitations and Risks

- **Small model:** at 1.5B parameters it can produce incorrect, incomplete or insecure code, and may hallucinate APIs or library functions. Always review and test its output.
- **Light fine-tune:** training used 8,000 examples for a single epoch, so behavior is close to the base model, with modest changes in code style and explanation format.
- **Identity:** the training data contained no identity examples, so the model may state that it is Qwen. Use a system prompt to set the assistant name.
- **Quantization:** Q4_K_M trades some quality for size; use the F16 file if you need maximum fidelity.
- **Inherited biases:** the model inherits the limitations and biases of the base model and the training dataset.
- **Language coverage:** performance is strongest in English and in popular programming languages.

## License

Released under the **Apache 2.0** license, the same as the base model and the training dataset. Please retain the license notice and attribution when redistributing.

## Acknowledgements

- [Qwen Team](https://huggingface.co/Qwen) for the base model, Qwen2.5-1.5B-Instruct
- [m-a-p](https://huggingface.co/m-a-p) for the CodeFeedback-Filtered-Instruction dataset
- [llama.cpp](https://github.com/ggml-org/llama.cpp), [PEFT](https://github.com/huggingface/peft), [TRL](https://github.com/huggingface/trl) and [bitsandbytes](https://github.com/bitsandbytes-foundation/bitsandbytes)

## Citation

```bibtex
@misc{autodevvlm2026,
  title  = {AutoDevvLM: A QLoRA fine-tune of Qwen2.5-1.5B-Instruct for code assistance},
  author = {<your-name-or-org>},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/<your-username>/AutoDevvLM}}
}
```