Skip to main content
GLiNER is PasteGuard’s default and currently only semantic backend. It detects PERSON and LOCATION; street addresses are also returned as LOCATION. The default model is urchade/gliner_multi_pii-v1.
DETECTOR_MODEL accepts a Hugging Face model ID or local directory. Hub models must contain gliner_config.json; private models require Hugging Face authentication.
Custom models have different accuracy and confidence calibration. Test them against your data before production.

Local Models

Local directories need:
pytorch_model.bin is also accepted. Missing or invalid files fail during startup.
Offline deployments must also cache any tokenizer or encoder referenced by gliner_config.json.

Docker

The image includes the default model and runs offline. For a custom Hub model, enable downloads on first start and persist the cache:
For a local model, mount the directory and use its container path:

Settings

Floors must be between 0 and 1. The request score_threshold can raise, but not lower, them. Legacy DETECTOR_MODEL_PATH, DETECTOR_FLOOR_*, and DETECTOR_MAX_TOKENS remain supported. DETECTOR_MODEL_PATH wins over DETECTOR_MODEL; GLINER_* wins over matching legacy variables.