17 Downloads Updated 4 days ago
ollama run franckbesnard/granite-ada-p4
Granite 4.2 8B fine-tuned for Ada 2012 code work: explaining, analysing, fixing and checking Ada. An experimental pilot model (round 4), not a production model.
ollama pull franckbesnard/granite-ada-p4
ollama run franckbesnard/granite-ada-p4 --think=false
Through the API, give the context size and leave thinking off:
curl http://localhost:11434/api/chat -d '{
"model": "franckbesnard/granite-ada-p4",
"think": false,
"stream": false,
"options": { "num_ctx": 40960 },
"messages": [
{ "role": "system", "content": "Tu es un expert Ada 2012." },
{ "role": "user", "content": "-- Fichier : p.adb\nprocedure P (X : in out Integer) is\nbegin\n X := X + 1;\nend P;\n\nExplique ce que fait P." }
]
}'
num_ctx. Ada files are long. 40,960 suits most single-package questions, and the model accepts up to 131,072.-- Fichier : <name> (or -- File: <name>), then ask the question. Answers follow the question’s language (French or English).Nine task families, the same ones as its benchmark:
| Family | Task |
|---|---|
| T1 | Explain a subprogram from the code shown |
| T2 | Propose meaningful names for obfuscated identifiers |
| T3 | Answer factual questions: calls, writes, parameter types, exceptions, callers |
| T4 | Say whether a construct is legal Ada, citing the Reference Manual |
| T5 | Document a package specification (comments and contracts, declarations unchanged) |
| T6 | Write a missing subprogram body |
| T7 | Fix the code from a GNAT error message |
| T8 | Modernise Ada 95 code to Ada 2012 |
| T9 | Find AdaControl rule violations (file:line: message) |
Internal benchmark: 100 items held out from training, about 11 per family. Every model answered the same items. Each family’s score is the share of items passed, or that family’s own measure (coverage, F1).
| Family | granite-ada-p4 | previous round (p2) | Granite 4.2 8B base | Qwen 3.8 27B (reference) |
|---|---|---|---|---|
| Thinking | off | off | on | medium |
| T1 explain (coverage) | 0.89 | 0.83 | 0.96 | 0.99 |
| T2 names (similarity) | 0.24 | 0.34 | 0.30 | 0.33 |
| T3 facts (exact) | 0.45 | 0.36 | 0.55 | 0.82 |
| T4 legality (verdict) | 0.55 | 0.64 | 0.36 | 0.45 |
| T5 document | 0.18 | 0.18 | 0.09 | 0.09 |
| T6 body (compiles) | 0.18 | 0.27 | 0.45 | 0.55 |
| T7 fix (compiles) | 0.73 | 0.91 | 0.73 | 0.91 |
| T8 modernise | 0.09 | 0.00 | 0.00 | 0.18 |
| T9 AdaControl (F1) | 0.51 | 0.47 | 0.18 | 0.66 |
| Mean | 0.43 | 0.44 | 0.40 | 0.55 |
| Time for the 100 items (local GPU) | 0.26 h | 0.30 h | 2.17 h | 1.68 h |
The weights derive from IBM Granite 4.2 8B (Apache 2.0). The training examples are built from code and documents under their own licences, among them GPL and GMGPL code from the GNAT ecosystem and AdaControl.