Instructions to use Okyanus/ai-pomona-agronomist-gemma4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Okyanus/ai-pomona-agronomist-gemma4 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E2B-it") model = PeftModel.from_pretrained(base_model, "Okyanus/ai-pomona-agronomist-gemma4") - Notebooks
- Google Colab
- Kaggle
Pomona Agronomist Advisor for Gemma 4
Okyanus/ai-pomona-agronomist-gemma4 is a Pomona Agronomist Advisor layer for greenhouse and hydroponic crop decision support. It is intended to explain crop and environment signals, summarize likely stress factors, and draft agronomist-facing recommendations that can be reviewed by operators or downstream Pomona policy services.
The model advises; Pomona policies authorize.
This repository does not define an autonomous controller. The model must not directly control actuators, irrigation, fertigation, lighting, vents, dosing pumps, sprayers, or any other physical system. It must not provide pesticide dosage, pesticide mixing rates, pesticide application instructions, or crop-protection prescriptions that require a licensed professional or local regulatory approval.
Intended Role
The advisor is designed for:
- Interpreting greenhouse and hydroponic sensor snapshots.
- Explaining likely causes of plant stress from environmental and nutrient indicators.
- Suggesting non-actuating corrective considerations for human review.
- Producing structured advisory notes for Pomona policy evaluation.
- Supporting agronomists, growers, and digital-twin workflows.
The advisor is not designed for:
- Autonomous control of actuators or equipment.
- Pesticide, herbicide, fungicide, or insecticide dosage recommendations.
- Replacing licensed agronomists, crop consultants, or local compliance procedures.
- Making safety-critical decisions without independent validation.
Safety Boundary
Pomona deployments should treat model output as advisory evidence only. Any operational action should pass through policy, rule, authorization, and audit layers outside the model.
Required integration pattern:
- Sensor and crop context are provided to the model.
- The model returns an explanation, risk assessment, and advisory options.
- Pomona policy services validate, constrain, approve, reject, or escalate recommendations.
- Human operators or authorized automation execute approved actions.
The model should use language such as "consider", "review", "inspect", or "escalate" instead of issuing direct equipment commands.
Example Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_name = "google/gemma-4-E2B-it"
adapter_name = "Okyanus/ai-pomona-agronomist-gemma4"
tokenizer = AutoTokenizer.from_pretrained(adapter_name)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
device_map="auto",
torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(base_model, adapter_name)
model.eval()
system_prompt = """You are Pomona Agronomist Advisor.
The model advises; Pomona policies authorize.
Do not directly control actuators. Do not provide pesticide dosage."""
user_prompt = """Crop: tomato
System: greenhouse
Sensors: temperature=31.5 C, relative_humidity=45%, co2=380 ppm, substrate_ec=3.2 mS/cm, ph=6.8, ppfd=210 umol/m2/s
Question: Why is plant stress elevated, and what should the operator review?"""
prompt = (
f"<start_of_turn>user\n{system_prompt}\n\n{user_prompt}<end_of_turn>\n"
f"<start_of_turn>model\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=350, do_sample=False)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
See examples/ and prompts/ for more complete prompt templates and sample sensor payloads.
Recommended Output Shape
For production integrations, prefer structured advisory responses:
summary: concise crop-state interpretation.likely_factors: environmental or nutrient drivers to investigate.operator_checks: manual inspections or data-quality checks.advisory_options: non-binding options for review.policy_handoff: what Pomona policy services should validate before action.safety_notes: any prohibited, uncertain, or escalation-worthy items.
Model and Data Notes
This repository documents an adapter-style advisor model trained for greenhouse and hydroponic agronomy language tasks. It should be evaluated in the target crop, climate, hardware, and policy environment before operational use.
Example domains include:
- Tomato greenhouse stress explanation.
- Hydroponic lettuce nutrient and climate review.
- Sensor quality and outlier interpretation.
- Growth-stage-aware advisory summaries.
Limitations
- Sensor readings can be noisy, missing, delayed, or miscalibrated.
- Agronomic responses vary by cultivar, growth stage, substrate, climate, facility design, and local practice.
- The model can produce plausible but incorrect recommendations.
- It does not know site-specific legal, label, worker-safety, food-safety, or certification requirements.
- It must not be used as the final authority for pesticide dosing, worker exposure decisions, or autonomous equipment control.
Repository Contents
CHANGELOG.md: documentation and release notes.examples/: prompt and JSON examples for safe advisory use.prompts/advisor_system_prompt.md: recommended system prompt.metadata/pomona-model.yaml: model-card metadata for Pomona integration.evals/eval_report.md: qualitative evaluation report and safety checks.
Project
This model is part of the Pomona project.
- Pomona platform: okyanu/pomona
- Tomato specialist: Okyanus/pomona-tomato-risk-reasoner-v0.1.7-lora
- Water/irrigation specialist: Okyanus/pomona-water-irrigation-risk-reasoner-v0.1.8-lora
- Actuator-gate research preview: Okyanus/pomona-actuator-command-gate-reasoner-v0.1-lora
- Sensor dataset:
Okyanus/greenhouse-sensor-data - Model role: Agronomist Advisor
Related repositories:
- Model repo:
Okyanus/ai-pomona-agronomist-gemma4 - Dataset repo:
Okyanus/greenhouse-sensor-data - Space:
ai-pomona/pomona-greenhouse-demo
Version Roadmap
v0.1.0: initial releasev0.1.1: model card and examplesv0.2.0: better training datav0.3.0: tomato greenhouse evaluationv0.4.0: safety-tuned version
- Downloads last month
- 30