File size: 6,989 Bytes
bdd65ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
---
license: apache-2.0
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
pipeline_tag: text-generation
language:
  - en
tags:
  - gguf
  - llama-cpp
  - qlora
  - code
  - arduino
  - esp32
---

# JengaCoder v1.2

---

# JengaCoder v1.2

JengaCoder v1.2 is a compact offline coding and engineering assistant developed for JengaAI Edge.

It is intended for students, teachers and developers using affordable laptops or working in environments where internet connectivity, cloud access and data cost are significant constraints.

The model runs locally through `llama.cpp` and does not require a dedicated GPU for inference.

## Model details

* **Developer:** Abdulkarim Mohammed Ngulangwa / JengaAI Edge
* **Base model:** `Qwen/Qwen2.5-Coder-1.5B-Instruct`
* **Base-model revision:** `2e1fd397ee46e1388853d2af2c993145b0f1098a`
* **Fine-tuning method:** QLoRA supervised fine-tuning
* **Parameters:** approximately 1.54 billion
* **Published format:** GGUF
* **Quantization:** Q4_K_M
* **Runtime:** llama.cpp
* **Primary language:** English
* **Model file:** `JengaCoder-v1.2-Q4_K_M.gguf`
* **Model SHA-256:** `e253182086f2bfd9e48ee3e4b683f151276fa1dfc6510faea8be0824dbe433bc`

## Intended uses

JengaCoder is intended to provide offline assistance with:

* Python and C++ programming
* debugging and code explanation
* memory-conscious programming
* introductory web development
* Arduino and ESP32 projects
* embedded-system explanations
* practical coding and engineering education

The model is particularly intended for educational and development environments where continuous cloud access is not practical.

## Running with llama.cpp

Download the GGUF file and run:

```bash
llama-cli \
  -m JengaCoder-v1.2-Q4_K_M.gguf \
  -cnv \
  -n 512 \
  --temp 0.2
```

An example prompt is:

```text
Write a complete Python function named count_error_lines that reads a text file too large to fit in memory and returns the number of lines containing the exact substring ERROR. Use only the Python standard library, process the file in one pass with O(1) additional memory, handle FileNotFoundError gracefully, and explain the time and space complexity. Do not store matching lines in a list.
```

## Training

JengaCoder v1.2 was trained using QLoRA with the following configuration:

* training records: 160
* validation records: 20
* epochs: 2
* final global step: 40
* random seed: 42
* LoRA rank: 16
* LoRA alpha: 32
* LoRA dropout: 0.05
* training quantization: NF4 with double quantization
* learning rate: `1e-4`
* maximum sequence length: 2048

The LoRA adapter targeted:

* `q_proj`
* `k_proj`
* `v_proj`
* `o_proj`
* `gate_proj`
* `up_proj`
* `down_proj`

The authentic final trainer state records:

* final evaluation loss: `0.9508873224258423`
* final evaluation mean token accuracy: `0.8057295680046082`
* completed epoch: `2.0`
* completed global step: `40`

The original adapter, trainer state, training script, dataset checksums and reproduction documentation are available in the Gate 2 repository.

## Evaluation

### ADTC participant profiler

A final participant-mode profiler run on an Intel Core i7-1065G7 laptop with 7.6 GB RAM and no discrete GPU produced:

* generation throughput: approximately 19.02 tokens per second
* peak resident memory: approximately 1692.38 MB
* ARC Easy normalized accuracy: 0.70
* ARC Easy samples: 50
* runtime: CPU-only llama.cpp

Performance varies with CPU frequency, background processes, thermal conditions and llama.cpp build configuration.

### Constraint-focused evaluation

The repository contains a frozen 10-prompt ConstraintBench diagnostic comparing the Qwen base model and JengaCoder v1.2.

| Evaluation                    | Qwen base | JengaCoder v1.2 |
| ----------------------------- | --------: | --------------: |
| Overall ConstraintBench score |    77/100 |          59/100 |
| Physical/electrical subset    |     24/40 |           15/40 |

These results are disclosed because they show that fine-tuning did not produce universal improvement. JengaCoder v1.2 showed useful behavior on several practical coding tasks but regressed on some tightly constrained physical-computing questions.

Complete prompts, rubrics, outputs and scoring evidence are available in the project repository.

## Limitations

JengaCoder is a compact 1.54B-parameter model and has substantially less reasoning capacity than larger language models.

Known limitations include:

* occasional failure to follow strict hardware constraints
* possible invention of unrequested components
* incorrect electrical or sensor assumptions
* inconsistent handling of impossible requirements
* possible coding or memory-complexity errors
* English is the primary supported language
* generated code may require correction before deployment

A known example is that the model may incorrectly recommend driving a bare external LED without a current-limiting resistor. Such advice is unsafe and must not be followed.

All hardware guidance should be reviewed against component datasheets and tested safely before deployment.

## Safety recommendations

Users should:

* verify electrical voltage and current limits
* use appropriate current-limiting and protection components
* review generated wiring before powering a circuit
* test code incrementally
* avoid using generated output in safety-critical systems without qualified review
* treat the model as an educational assistant rather than an authoritative engineering source

## Reproducibility and provenance

The complete Gate 2 evidence package is available at:

https://github.com/theredteamtech/jengaai-edge/tree/gate2

It includes:

* original LoRA adapter weights
* adapter configuration
* final trainer state
* exact training script
* training and validation datasets
* SHA-256 checksum manifest
* base-model identity
* merge script
* quantization script
* benchmark evidence
* complete base-versus-fine-tuned output examples

## Dataset and licensing

The JengaAI Edge training and validation datasets are included in the GitHub repository:

* `training/data/jengacoder_train_v1.json`
* `training/data/jengacoder_validation_v1.json`

The repository code and included datasets are distributed under the repository’s GNU General Public License v3.0.

The model is derived from `Qwen/Qwen2.5-Coder-1.5B-Instruct`, which is distributed under the Apache License 2.0. Users must comply with all applicable upstream and repository licensing terms.

## Development status

JengaCoder v1.2 is the stable submitted model.

Later experimental adapters were not published as replacements because evaluation revealed regressions. A separate corrective v2 dataset is being developed to improve physical grounding, constraint following and embedded-system safety.

The v2 development data was not used to train JengaCoder v1.2.

## Contact

* **Developer:** Abdulkarim Mohammed Ngulangwa
* **GitHub:** https://github.com/theredteamtech
* **Project repository:** https://github.com/theredteamtech/jengaai-edge