Mikrodev commited on
Commit
3c09ffb
Β·
verified Β·
1 Parent(s): 6ec71d4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +61 -12
README.md CHANGED
@@ -35,14 +35,18 @@ stcoder-qwen25-14b is the rule-compliance member of the line: a chat-only fine-t
35
 
36
  If you are choosing for the first time, start with [`Mikrodev/stcoder-qwen25-7b-gguf`](https://huggingface.co/Mikrodev/stcoder-qwen25-7b-gguf) at **Q8_0** instead (the fastest per answer of the four (5.8 s), 15/15 delivery, and the highest ChrF among the models that answered every prompt (38.5)). Come to this model for the reasons listed under *Is this the right model for you?*.
37
 
38
- > **This model cannot make tool calls.** It is a chat model: you describe a plant requirement, it
39
- > replies with Structured Text. Tool calling was trained and evaluated across this model line β€” the
40
- > Qwen3.5-9B family did learn it (tool-call composite 0.816 at Q8_0, falling to 0.642 at Q4_K_M),
41
- > while the code-focused families scored 0.02–0.06 and the Gemma family exactly 0.00. Because it was
42
- > not usable across the line it was **dropped as a product decision**, and these builds are published
43
- > and supported as chat models. Do not build an agent on them. Those tool-call figures come from a
44
- > separate internal evaluation that is not part of this release β€” not from the code study reported below, whose own
45
- > data and method ship with this model as the detailed report.
 
 
 
 
46
  >
47
  > **Always compile generated code in ALB / LogicStudio before deployment.** The model produces
48
  > dialect-correct code, which is not the same as correct control logic.
@@ -74,7 +78,7 @@ slower generation.
74
  |---|---|---|---|
75
  | `lora_adapter/` | The LoRA adapter this model was trained as β€” PEFT adapter on the base model above. Merge it yourself, stack it, or continue training from it. | small | being uploaded |
76
  | f16 merged weights | f16 is the merged fine-tune at full precision: the reference build, for evaluation or for producing your own quantisations. | ~27.50 GiB | not shipped - rebuild from the adapter (snippet below) |
77
- | `Modelfile` | One ready-to-run Ollama definition: correct chat template, stop tokens, `num_ctx 8192` (the sequence length this model was trained at) and the system prompt. Its `FROM` points at the Q8_0 file; edit that one line if you downloaded a different quant. | small | in this repo |
78
  | `article_stcoder-qwen25-14b.html`, `article_stcoder-qwen25-14b.docx` | The full evaluation report for this model. | |
79
 
80
  ## Quick start with Ollama
@@ -122,8 +126,37 @@ You get a body-only `iecst` block: `VAR` declarations plus logic, millisecond `I
122
  positional function-block calls, no `PROGRAM` wrapper. Paste it into ALB / LogicStudio and compile.
123
 
124
  For a different build, download that GGUF instead and change the Modelfile's `FROM` line to its
125
- filename (the Modelfile lists the alternatives at the top). With llama.cpp instead of Ollama, point `llama-cli -m <file>.gguf` at the
126
- GGUF and pass the same system prompt.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  ## Use the LoRA adapter directly
129
 
@@ -251,6 +284,10 @@ and limitations β€” ships in this repo:
251
  - Readers who want the line default. That is stcoder-qwen25-7b at Q6_K: faster per answer, smaller, and higher ChrF at full delivery. Come to the 14B for the clean rate, not as a general upgrade.
252
  - Any dialect other than Mikrodev LogicStudio. It was trained to violate conventions that other IEC 61131-3 environments require, so its output is deliberately wrong for them: no POU wrappers, no TIME literals, no named parameters, no output arrows.
253
 
 
 
 
 
254
  ## Limitations of the evaluation
255
 
256
  - **Quantisation was not matched.** This fine-tune ran at Q6_K; the stock base ran at the
@@ -271,10 +308,22 @@ and limitations β€” ships in this repo:
271
 
272
  A curated in-house multi-task PLC corpus (approximately 2,930 training and 550 validation examples)
273
  focused on Structured Text generation, written against the ALB / Mikrodev LogicStudio rule set. The
274
- dataset is not publicly released. Sequence length 8192 tokens.
275
 
276
  Prompts are mostly English with a Turkish minority (10.8% of training prompts contain Turkish). Code, identifiers and code comments are always English; the model's conversational prose follows the language you write in.
277
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  ## Licence and attribution
279
 
280
  apache-2.0. Fine-tuned from [`Qwen/Qwen2.5-Coder-14B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct); the base
 
35
 
36
  If you are choosing for the first time, start with [`Mikrodev/stcoder-qwen25-7b-gguf`](https://huggingface.co/Mikrodev/stcoder-qwen25-7b-gguf) at **Q8_0** instead (the fastest per answer of the four (5.8 s), 15/15 delivery, and the highest ChrF among the models that answered every prompt (38.5)). Come to this model for the reasons listed under *Is this the right model for you?*.
37
 
38
+ | At a glance | |
39
+ |---|---|
40
+ | Take this build | **Q8_0** β€” `qwen25_coder_14b-tc.q8_0.gguf`, 14.62 GiB, wants 16.6 GiB free |
41
+ | Dialect-clean replies | **100.0%** against 0.0% for the stock base |
42
+ | Speed | 8.6s per reply, 288 output tokens (median 262) |
43
+ | Runs on | Ollama 0.3+ (tested on 0.32.5), llama.cpp β€” CPU, GPU or Apple unified memory |
44
+ | Trained for | Mikrodev / ALB Structured Text only β€” body-only, no POU wrappers, INT milliseconds |
45
+
46
+ > **Tool calling is not supported on this release.** These are chat models: you describe a plant
47
+ > requirement, they reply with Structured Text. It was trained, measured and then dropped as a
48
+ > product decision β€” the numbers and the reasoning are under *Not the right tool for*. Do not build
49
+ > an agent on them.
50
  >
51
  > **Always compile generated code in ALB / LogicStudio before deployment.** The model produces
52
  > dialect-correct code, which is not the same as correct control logic.
 
78
  |---|---|---|---|
79
  | `lora_adapter/` | The LoRA adapter this model was trained as β€” PEFT adapter on the base model above. Merge it yourself, stack it, or continue training from it. | small | being uploaded |
80
  | f16 merged weights | f16 is the merged fine-tune at full precision: the reference build, for evaluation or for producing your own quantisations. | ~27.50 GiB | not shipped - rebuild from the adapter (snippet below) |
81
+ | `Modelfile` | One ready-to-run Ollama definition: the system prompt, the sampling defaults and `num_ctx 8192` (the sequence length this model was trained at). It deliberately carries **no chat template** β€” Ollama uses the chat template stored inside the GGUF, so the chat format is the trained one and cannot drift out of sync with this file. Its `FROM` points at the Q8_0 file; edit that one line if you downloaded a different quant. | small | in this repo |
82
  | `article_stcoder-qwen25-14b.html`, `article_stcoder-qwen25-14b.docx` | The full evaluation report for this model. | |
83
 
84
  ## Quick start with Ollama
 
126
  positional function-block calls, no `PROGRAM` wrapper. Paste it into ALB / LogicStudio and compile.
127
 
128
  For a different build, download that GGUF instead and change the Modelfile's `FROM` line to its
129
+ filename (the Modelfile lists the alternatives at the top).
130
+
131
+ With llama.cpp instead of Ollama, run `llama-cli -m <file>.gguf --jinja` and pass the same system
132
+ prompt. **`--jinja` matters:** it makes llama.cpp use the chat template stored inside the GGUF β€” the
133
+ one this model was trained with β€” instead of guessing a format.
134
+
135
+ ## What the fine-tune actually changes
136
+
137
+ One prompt from the study below, sent to the stock base and to this fine-tune under the same short
138
+ system prompt that lists **no** dialect rules:
139
+
140
+ > *We've got a conveyor with a pre-start warning horn. When the operator hits the start button I need the horn to sound for 5 seconds first, then the motor kicks in and the horn goes quiet.*
141
+
142
+ The stock base answered with named function-block parameters, a TIME literal and a PROGRAM wrapper β€” constructs the Mikrodev runtime rejects:
143
+
144
+ ```iecst
145
+ Timer5Sec(IN := FALSE, PT := T#5s);
146
+ ```
147
+
148
+ This fine-tune, same prompt, no rules in the prompt:
149
+
150
+ ```iecst
151
+ HORN_MS : INT := 5000; (* in VAR CONSTANT *)
152
+ tHorn(bStartBtn AND NOT bFault AND NOT bStopBtn, HORN_MS);
153
+ ```
154
+
155
+ Positional function-block call, delay as an `INT` in milliseconds, no wrapper β€” the dialect came out
156
+ of the weights, not out of the prompt. Both snippets are verbatim from the recorded run.
157
+
158
+ > These lines show **dialect**, not correctness. R24 certifies that no forbidden construct appears;
159
+ > it does not check that the logic works. Read *Weaknesses* before you trust an answer.
160
 
161
  ## Use the LoRA adapter directly
162
 
 
284
  - Readers who want the line default. That is stcoder-qwen25-7b at Q6_K: faster per answer, smaller, and higher ChrF at full delivery. Come to the 14B for the clean rate, not as a general upgrade.
285
  - Any dialect other than Mikrodev LogicStudio. It was trained to violate conventions that other IEC 61131-3 environments require, so its output is deliberately wrong for them: no POU wrappers, no TIME literals, no named parameters, no output arrows.
286
 
287
+ Those tool-call figures come from a separate internal evaluation that is not part of this release β€”
288
+ not from the code study reported above, whose own data and method ship with this model as the
289
+ detailed report.
290
+
291
  ## Limitations of the evaluation
292
 
293
  - **Quantisation was not matched.** This fine-tune ran at Q6_K; the stock base ran at the
 
308
 
309
  A curated in-house multi-task PLC corpus (approximately 2,930 training and 550 validation examples)
310
  focused on Structured Text generation, written against the ALB / Mikrodev LogicStudio rule set. The
311
+ dataset is not publicly released.
312
 
313
  Prompts are mostly English with a Turkish minority (10.8% of training prompts contain Turkish). Code, identifiers and code comments are always English; the model's conversational prose follows the language you write in.
314
 
315
+ | Training setting | Value |
316
+ |---|---|
317
+ | Method | LoRA (PEFT) supervised fine-tune |
318
+ | LoRA rank / alpha | 32 / 32 (dropout 0.0) |
319
+ | Epochs | 2 |
320
+ | Learning rate | 0.0001 |
321
+ | Sequence length | 8192 tokens |
322
+ | Effective batch | 8 (batch 1 x grad-accum 8) |
323
+
324
+ The published LoRA adapter is exactly this run's output, so anything above can be reproduced or
325
+ continued from it.
326
+
327
  ## Licence and attribution
328
 
329
  apache-2.0. Fine-tuned from [`Qwen/Qwen2.5-Coder-14B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct); the base