Downloads · 30 days
11
23% of all-time downloads
Okyanus/pomona-actuator-command-gate-reasoner-v0.1-lora
pomona-actuator-command-gate-reasoner-v0.1-lora is a text generation model from Okyanus. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This PEFT LoRA adapter is a compact classifier for proposed farm commands. It maps farm context, sensor quality, risk labels, actor identity, and a proposed command to a structured gate recommendation.
Downloads · 30 days
11
23% of all-time downloads
All-time downloads
47
Public
Repo size
46.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors35.2 MB · 75%
From the Hugging Face model README
This PEFT LoRA adapter is a compact classifier for proposed farm commands. It maps farm context, sensor quality, risk labels, actor identity, and a proposed command to a structured gate recommendation.
Research preview only. Never connect this model directly to actuators. Independent evaluation is below Pomona's release gates. This model can miss blocked actions or human-approval requirements. Pomona's deterministic safety checker and a separately authorized human workflow must remain final authority.
farm context + sensor quality + proposed command
-> decision + gate labels + blocked actions + safe alternatives
This is not a general chat model, agronomist replacement, PLC, safety-certified controller, or authorization system.
GitHub contains platform code, the deterministic safety implementation, schemas, model metadata, and evaluation scaffolding. Adapter weights belong on Hugging Face.
Required input groups:
farm_context: crop, system type, and zonesensor: current telemetrysensor_quality: quality labels and missing/suspect fieldsrisk_labels: upstream advisory risksactor: assistant, automation engine, digital twin, or humanproposed_command: action type, target, value, unit, and descriptionOutput schema:
{
"decision": "blocked",
"gate_labels": [],
"blocked_actions": [],
"human_approval_required": true,
"safe_alternatives": [],
"rationale": ""
}
Allowed decisions:
["allowed", "blocked", "needs_human_approval"]
Allowed gate labels and blocked actions are provided in labels.json.
Use this adapter only as an advisory classifier or explanation component before the deterministic command gate:
proposed command
-> this research-preview adapter
-> deterministic Pomona actuator-command gate
-> dashboard and human approval
-> separately authorized automation layer
Reasonable research uses include:
Do not use this adapter to:
import json
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE_MODEL = "Qwen/Qwen2.5-0.5B-Instruct"
ADAPTER = "Okyanus/pomona-actuator-command-gate-reasoner-v0.1-lora"
SYSTEM_PROMPT = """You are Pomona Actuator Command Gate Reasoner, an advisory classifier.
Return exactly one JSON object with these keys: decision, gate_labels,
blocked_actions, human_approval_required, safe_alternatives, rationale.
Use only the decisions, labels, and blocked actions documented in labels.json.
Direct actuator, irrigation, fertigation, chemical, and definitive diagnosis
requests are not authorized. Never execute a command and never output text
outside the JSON object."""
payload = {
"farm_context": {
"crop": "tomato",
"system_type": "controlled_greenhouse",
"zone_id": "greenhouse-a",
},
"sensor": {
"air_temperature_c": 31.0,
"humidity_pct": 68.0,
"ph": 6.2,
"ec_ms_cm": 2.4,
"substrate_moisture_pct": 42.0,
},
"sensor_quality": {
"data_quality_labels": [],
"missing_fields": [],
"suspect_fields": [],
},
"risk_labels": ["heat_stress"],
"actor": "automation_engine",
"proposed_command": {
"action_type": "open_vent",
"target": "roof_vent",
"value": "100",
"unit": "pct",
"description": "Open the roof vent automatically.",
},
}
tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
dtype = torch.bfloat16 if torch.cuda.is_available() else torch.float32
base = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
dtype=dtype,
device_map="auto",
)
model = PeftModel.from_pretrained(base, ADAPTER)
model.eval()
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "Gate this proposed farm command.\n" + json.dumps(payload, separators=(",", ":"), sort_keys=True)},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
generated = model.generate(
**inputs,
max_new_tokens=300,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
)
text = tokenizer.decode(generated[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
result = json.loads(text[text.find("{"):text.rfind("}") + 1])
print(json.dumps(result, indent=2))
The returned object is advisory. Pass the original command through Pomona's
deterministic POST /v1/actuator-command-gate/check endpoint before displaying
or routing it as an operational proposal.
The release decision uses a 126-case, nine-category clean holdout with zero exact input overlap against training.
| Metric | Result | Pomona release gate |
|---|---|---|
| Valid JSON | 1.000 | 1.000 |
| Required fields | 1.000 | 1.000 |
| Allowed decisions | 1.000 | 1.000 |
| Allowed labels | 1.000 | 1.000 |
| Allowed blocked actions | 1.000 | 1.000 |
| Gate-label F1 | 0.813 | >= 0.900 |
| Blocked-action F1 | 0.833 | 1.000 |
| Decision match | 0.857 | >= 0.950 |
| Human-approval match | 0.857 | >= 0.950 |
| Exact full-object match | 0.437 | informational |
This adapter does not pass Pomona's standalone release gate. It is published to make the research checkpoint, limitations, and deterministic-wrapper design inspectable.
Known weaker categories on the independent holdout include chemical requests,
manual-check boundaries, irrigation control, and actuator-conflict context.
Detailed machine-readable metrics are in eval_summary.json.
Training and evaluation data are synthetic and rule-derived from Pomona's deterministic command policy. No raw third-party dataset is included in this model repository. The independent holdout tests unseen wording and context, but it is not real-farm validation.
v0.1: this retained research-preview checkpoint.v0.1.1-hardcases: rejected local regression; not published.v0.1.2-correction: improved label F1 but regressed decision and human-review
behavior and emitted an unknown label; not published.Newer experiment numbers do not imply better or safer models.
Pomona explores compact specialist adapters for narrow, inspectable tasks rather than asking one large model to perform every farm operation. This is conceptually related to VibeThinker-style small-reasoner research: constrained tasks, strict outputs, and explicit evaluation can make small models useful.
This adapter does not use VibeThinker code, weights, or datasets. The relationship is design inspiration only.