Running a local model for PLC work
Most OT networks have no internet access, which makes local models the only option rather than a preference.
By the LADX engineering team
Short answer
Yes, and on an OT network it is often the only permitted option. A machine with 16 GB of RAM runs a capable 7B to 14B parameter model through Ollama or LM Studio, exposing an OpenAI-compatible endpoint that most tools can point at. Smaller models are noticeably weaker at code, which is why a validation loop around the output matters more locally than it does in the cloud.
The reason to care about local models in automation is not privacy in the abstract. It is that the network the work happens on frequently has no route to the internet, by design.
What runs on what
- 16 GB RAM, no GPU. A 7B model runs, slowly. Usable for explanation and small generations.
- 12 GB VRAM or more. A 14B model runs comfortably and is genuinely useful for code.
- 24 GB or more. Larger models, or several people sharing one endpoint.
Ollama and LM Studio both expose an OpenAI-compatible API, which means anything that can point at a base URL can use them, including LADX.
The honest quality gap
A local 14B model is weaker than a frontier hosted model, especially on instructions it has seen less of. Pretending otherwise wastes people's time.
What closes most of the gap is not a bigger model but a loop: compile the output, feed the errors back, try again. Quality moves from the model to the checking, and the checking is deterministic.
The deployment question nobody asks early enough
Who patches it. A model server on an OT network is a service with a lifecycle, and 'the engineer who set it up has left' is the usual failure mode. Treat it like any other machine component: documented, imaged, and owned by somebody.
Sources and further reading
- Ollama OpenAI-compatible API documentationdocs.ollama.com
- LM Studio documentationlmstudio.ai
Common questions
- What hardware do I need to run a local model for code work?
- 16 GB of RAM runs a 7B to 14B parameter model acceptably on CPU, slowly. A GPU with 12 GB or more of VRAM makes it comfortable. For a shared engineering workstation, a single mid-range GPU serves a small team through an OpenAI-compatible endpoint.
- Are local models good enough for PLC code?
- On their own, weaker than the large hosted models, particularly on less common instructions. With a compile-and-repair loop around them the gap narrows sharply, because most of the quality comes from the checking rather than from the first attempt.
Keep reading
- AI
Why ChatGPT writes ladder logic that does not run
General models are good at the shape of PLC code and bad at the parts that matter. Here is what they get wrong, and what has to sit around them.
- AI
Can AI write PLC code that works? Compile it, run it, then review it
AI writes plausible PLC code; checking makes it usable. How LADX validates Structured Text, loops errors back, runs it on a virtual PLC, and what still needs a human.
- AI
Best AI for PLC programming in 2026: how to choose and test one
Vendor assistants, MCP servers, specialist apps and general models compared on what each can see and change, plus a test you can run on any of them.