lain-parser
Filename parser models for Lain, a self-hosted
media server. This repo is the distribution channel for the lain-parser
service: an immutable store of encoder snapshots and exported model artifacts,
plus the installer.
Layout
manifest.jsonโ the release channel.defaultnames the model new installs get; every entry carries sha256s, the encoder snapshot it pairs with, the decoder window and the eval summary.models/<name>/โ one directory per released artifact:model.int8.pt(service artifact),config.json,model.fpgw+model.fpgw.json(the Go port format). Directories are immutable โ an update adds a new directory and moves thedefaultpointer, never rewrites a released file.snapshots/<name>/โ the character-encoder snapshot a model was trained on (anifilebert-dapt512-long: AniFileBERT + 40 epochs of continued masked-LM on an unlabeled filename corpus).install.sh,requirements.txt,app/โ the service installer and the vendored inference subset.
Install / update
hf download Enrell/lain-parser --include "install.sh requirements.txt app/**" \
--local-dir lain-parser
bash lain-parser/install.sh # installs or updates to manifest default
bash lain-parser/install.sh --model e5-s2 # pin a specific version
The installer downloads the pinned snapshot + model, verifies every file's
sha256 against the manifest, test-parses before touching the running unit, then
restarts lain-parser.service. Old artifacts are left in place for rollback.
Source and full provenance:
filename-parser packaging/lain-parser/.
Current model
e5-s2 โ span-head parser over a DAPT-512-long AniFileBERT encoder with Unicode
class features and a semi-CRF loss (28.5M params, 38 MiB int8). Development-grade
evaluation: 137/196 exact on a hash-locked real-name suite (+6.5 pp over the
previous recipe); 2 false emissions on 30 gold-abstain rows; ~54 ms/row on a
2-core CPU.