Token Classification
GLiNER
ONNX
German
English
extractor
ner
zero-shot
pii-detection
privacy
multilingual
quantized
edge
Instructions to use patronus-studio/gliner2-multi-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use patronus-studio/gliner2-multi-edge with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("patronus-studio/gliner2-multi-edge") - Notebooks
- Google Colab
- Kaggle
| license: apache-2.0 | |
| base_model: | |
| - fastino/gliner2-multi-v1 | |
| pipeline_tag: token-classification | |
| tags: | |
| - gliner | |
| - ner | |
| - zero-shot | |
| - pii-detection | |
| - privacy | |
| - multilingual | |
| - onnx | |
| - quantized | |
| - edge | |
| language: | |
| - de | |
| - en | |
| # GLiNER2 multi β Edge (ONNX/ORT, quantized) | |
| An edge-optimized ONNX/ORT build of **GLiNER2 multi**, a multilingual zero-shot information-extraction model. | |
| Packaged for on-device inference; used as the model behind the `dynamic-pii` pipeline of **Patronus Ark**, Patronus' open-source AI-security scanning library. Ark is not publicly released yet β a repository link will be added at launch. The model itself is the work of the upstream authors β see [Attribution](#attribution). | |
| ## Attribution | |
| | | | | |
| | --- | --- | | |
| | **Upstream model** | [`fastino/gliner2-multi-v1`](https://huggingface.co/fastino/gliner2-multi-v1) β Apache License 2.0 | | |
| | **Backbone** | [`microsoft/mdeberta-v3-base`](https://huggingface.co/microsoft/mdeberta-v3-base) β MIT License | | |
| The upstream Apache-2.0 license and its notices are retained. The MIT terms continue to apply | |
| to the portions originating from the backbone model. | |
| ## Changes made to the original work | |
| In accordance with Section 4(b) of the Apache License 2.0, the modifications relative to the | |
| upstream model are: | |
| - Exported the upstream model components to **ONNX** and to the **ORT** runtime format. | |
| - Applied **post-training dynamic quantization** (INT8 weights; INT4 embeddings in the encoder) to reduce disk and resident memory for CPU/edge inference. | |
| - No retraining, fine-tuning, or change to the model architecture or learned behavior beyond the numerical effects of quantization. | |
| ## Contents | |
| | File | Purpose | | |
| | --- | --- | | |
| | `encoder_int8_int4.onnx` / `.ort` | Quantized encoder (INT8 weights, INT4 embeddings) | | |
| | `classifier_int8`, `span_rep_int8`, `count_pred_int8`, `count_lstm_int8` | Quantized task heads (ONNX and ORT) | | |
| | `spm.model`, `tokenizer.json`, `added_tokens.json` | Tokenizer (unchanged from upstream) | | |
| | `config.json`, `gliner2_config.json`, `edge_manifest.json` | Model and edge-build configuration | | |
| | `required_operators.config` | Operator set required by the ORT build | | |
| ## License | |
| This work is distributed under the **[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)**, | |
| the same license as the upstream model. A full copy of the license is included as `LICENSE` in | |
| this repository. | |
| ``` | |
| Copyright the original GLiNER authors and contributors. | |
| Modifications (ONNX export and quantization) Copyright Casdo Labs GmbH. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| ``` | |