Views
No views yet
1git clone https://github.com/devang007/logX && cd logX
2./install.sh # downloads this model zip automatically
3logx -q "top 5 ips" -src /var/log/nginx/access.log1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2tok = AutoTokenizer.from_pretrained("Devang007/logX")
3model = AutoModelForSeq2SeqLM.from_pretrained("Devang007/logX")
4ids = tok("parse: how many 502s in the last hour", return_tensors="pt").input_ids
5print(tok.decode(model.generate(ids, max_length=128)[0], skip_special_tokens=True))
6# {"action":"count","source":"nginx_access","filters":[{"field":"status","op":"eq","value":"502"}],"time":{"last":"1h"}}google/t5-efficient-tiny
(15.57M params, Apache-2.0) that maps English questions about nginx logs to a
strict JSON DSL, executed by this repo's deterministic read-only layer.parse: <question> (≤64 tokens) → single-line
minified DSL JSON (≤128 tokens). The DSL contract (4 actions + abstain,
nginx access/error fields) is defined by
schema/dsl_v0.1.json and
schema/fields.py.logx-model-v0.1.0.zip (56 MB) + .sha256. Contains safetensors and
JSON only — no pickle files.1git clone https://github.com/devang007/logX && cd logX
2./install.sh # downloads this model zip automatically
3logx -q "top 5 ips" -src /var/log/nginx/access.log< \ ^ { } ~) were
added so JSON braces survive encoding, with a patched Metaspace pre-tokenizer.
Always load the tokenizer shipped in the zip, never the base model's.| Data | 42,558 train / 2,364 val rows, synthetic teacher-generated NL/DSL pairs; every row schema-validated and executor-verified before training |
| Recipe | HF Seq2SeqTrainer, 15 epochs, lr 3e-4 (linear, 5% warmup), batch 64, fp32, AdamW, wd 0.01, seed 42 |
| Selection | best val exact-match checkpoint (epoch 14) |
| Hardware | Apple M1 Pro (MPS), ~43 h wall clock |
| Metric | Value |
|---|---|
| Exact match (canonical string) | 90.95% |
| JSON-valid rate | 98.27% |
| Schema-valid rate | 98.18% |
test and out-of-distribution test_ood results are not yet
published — treat OOD generalization as unmeasured. Training data is
synthetic; phrasings far from its distribution will degrade accuracy.logx CLI does).
Out-of-scope questions are trained to yield {"action":"abstain"}.