Downloads · 30 days
13
13% of all-time downloads
pavstev/cronlm
cronlm is a translation model from pavstev. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as mit.
Tiny natural-language to cron model. Pluggable into @huggingface/transformers.
Downloads · 30 days
13
13% of all-time downloads
All-time downloads
97
Public
Repo size
49.9 MB
Likes
1
Public
Click a slice to open those files.
.onnx49.1 MB · 94%
From the Hugging Face model README
Tiny natural-language to cron model. Pluggable into @huggingface/transformers.
google/t5-efficient-tiny (~16M params)import { pipeline } from "@huggingface/transformers";
const cron = await pipeline("text2text-generation", "pavstev/cronlm");
const out = await cron("every weekday at 9am".toLowerCase());
console.log(out[0].generated_text); // "0 9 * * 1-5"
Lowercase the input before passing — bumps accuracy on Title-Case inputs by ~2.5 pp.
from transformers import pipeline
cron = pipeline("text2text-generation", model="pavstev/cronlm")
print(cron("every weekday at 9am")[0]["generated_text"]) # "0 9 * * 1-5"
| Input | Output |
|---|---|
| every 5 minutes | */5 * * * * |
| every weekday at 9am | 0 9 * * 1-5 |
| at 10:30 PM on Sundays | 30 22 * * 0 |
| every 15 minutes between 9 and 17 | */15 9-17 * * * |
| every Mon and Wed at noon | 0 12 * * 1,3 |
| on the 1st of every month | 0 0 1 * * |
| every quarter | 0 0 1 1,4,7,10 * |
| at midnight | 0 0 * * * |
@daily | 0 0 * * * |
| MWF at 9am | 0 9 * * 1,3,5 |
| every December 25 | 0 0 25 12 * |
| from the 1st to the 5th at noon | 0 12 1-5 * * |
| every 30 minutes during business hours | */30 9-17 * * 1-5 |
A pure-Python validator/fixer is included in the cronlm package — wrap model output to catch any rare invalid generation:
from cronlm import fix
fix("0 25 * * 1") # "0 23 * * 1"
Source, dataset generator, and training scripts: https://github.com/pavstev/cronlm
MIT