Downloads · 30 days
59
4% of all-time downloads
ICSFR-HF-ORG-01/Valuoty-industry-plc-4B
Valuoty-industry-plc-4B is a text generation model from ICSFR-HF-ORG-01. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
A compact assistant model specialized for industrial PLC programming. Fine-tuned with Axolotl using QLoRA to follow instructions and generate logic across the five IEC 61131-3 languages: Structured Text (ST), Ladder D…
Downloads · 30 days
59
4% of all-time downloads
All-time downloads
1.3K
Public
Parameters
4.4B
8.8 GB on disk
Likes
8
Public
Click a slice to open those files.
.safetensors8.8 GB · 100%
From the Hugging Face model README
A compact assistant model specialized for industrial PLC programming.
Fine-tuned with Axolotl using QLoRA to follow instructions and generate logic across the five IEC 61131-3 languages: Structured Text (ST), Ladder Diagram ASCII (LD), Function Block Diagram ASCII (FBD), Instruction List (IL), and GRAFCET / SFC.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "ICSFR-HF-ORG-01/Valuoty-industry-plc-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else "auto",
trust_remote_code=True,
)
messages = [
{"role": "system", "content": "You are a senior PLC engineer. Follow IEC 61131-3 best practices."},
{"role": "user", "content": "Write a PID function block in Structured Text with anti-windup and usage notes."}
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.2,
top_p=0.9,
repetition_penalty=1.05,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Structured Text (ST)
System: You are a PLC expert. Use IEC 61131-3 Structured Text with clear comments.
User: Create FB ConveyorInterlock in ST.
Requirements:
- Inputs: StartCmd, StopCmd, EStop, GuardDoorClosed
- Output: ConveyorRun
- Latch start; drop on EStop or open guard door
- Add diagnostics strings and a test example
Ladder Diagram ASCII (LD)
System: Output Ladder Diagram in clean ASCII. Include rung titles and comments.
User: Build a motor start/stop circuit with seal-in, E-Stop, and overload trip.
Function Block Diagram ASCII (FBD)
System: Output Function Block Diagram in ASCII with clear blocks and signal names.
User: Implement a ramp-up speed profile: TON pre-delay, then PID speed control with setpoint tracking.
Instruction List (IL)
System: Use Instruction List. Comment each instruction briefly.
User: Create IL to compute a moving average over N samples with overflow protection.
GRAFCET / SFC
System: Output SFC (GRAFCET) text with steps S0..Sx, transitions T1..Tx, actions, and safety interlocks.
User: Batch filling: Idle → Fill → Hold → Drain; include E-Stop and LevelHi/Lo interlocks.
Industry PLC MMLU-style benchmark. Our fine-tuned 4B (reasoning) model reaches 58.2%, surpassing generalist baselines such as Llama 3.1-18B (48.8%)) and Mistral Small-24B (48.9%), and clearly ahead of Qwen2.5-32B (non-reasoning, 42.4%). It also outperforms our Valuoty-3B (non-reasoning, 51.4%), while a larger Llama 3.1-70B remains higher at 61.02%.
temperature=0.2–0.4, top_p=0.9.temperature=0.0; relax for brainstorming.Valuoty AI Model License Agreement 1.0. Review the licenses agreements before commercial use.
@software{Valuoty-industry-plc-4B,
title = {PLC Agentic Assistant (IEC 61131-3) — LoRA on Qwen/Qwen3-4B},
author = Laurent MAILLE SPIE ICS,
year = {2025},
publisher = {Hugging Face},
note = {Fine-tuned with Axolotl on PLC instruction-following tasks (ST, LD, FBD, IL, SFC).}
}