Text Generation
GGUF
Safetensors
English
Turkish
plc
iec-61131-3
structured-text
code-generation
ollama
mikrodev
ALB
AdvanceLogicBuilder
MikrodevLogicStudio
advance-logic-builder
mikrodev-logicstudio
qwen2.5
conversational
Instructions to use Mikrodev/stcoder-qwen25-14b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mikrodev/stcoder-qwen25-14b-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Use Docker
docker model run hf.co/Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Mikrodev/stcoder-qwen25-14b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mikrodev/stcoder-qwen25-14b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mikrodev/stcoder-qwen25-14b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
- Ollama
How to use Mikrodev/stcoder-qwen25-14b-gguf with Ollama:
ollama run hf.co/Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
- Unsloth Desktop
- Pi
How to use Mikrodev/stcoder-qwen25-14b-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Mikrodev/stcoder-qwen25-14b-gguf with Docker Model Runner:
docker model run hf.co/Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
- Lemonade
How to use Mikrodev/stcoder-qwen25-14b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.stcoder-qwen25-14b-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Mikrodev/stcoder-qwen25-14b-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Mikrodev/stcoder-qwen25-14b-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Mikrodev/stcoder-qwen25-14b-gguf:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload README.md with huggingface_hub
Browse files
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 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|
| 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).
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
| 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
|