Downloads · 30 days
19
9% of all-time downloads
cuerbot/gliner2-multi-v1
gliner2-multi-v1 is a machine learning model from cuerbot. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
- model.onnx (FP32 export) - modelfp16.onnx (FP16 weights converted from FP32) - modelint8.onnx (dynamic INT8 quantization via onnxruntime) - tokenizer files copied verbatim from the HF model - a small config.json des…
Downloads · 30 days
19
9% of all-time downloads
All-time downloads
201
Public
Repo size
2.2 GB
Likes
1
Public
Click a slice to open those files.
.onnx3.8 GB · 99%
From the Hugging Face model README
model.onnx (FP32 export)model_fp16.onnx (FP16 weights converted from FP32)model_int8.onnx (dynamic INT8 quantization via onnxruntime)config.json describing runtime constraintsThe export script follows the same design:
input_ids, attention_mask (optionally token_type_ids)span_logitstorch.onnx.export (opset 19) and dynamic batch/sequence axesconvert_float_to_float16onnxruntime.quantization.quantize_dynamic(QInt8)Enter the dev shell (adds Python + ONNX deps):
nix develop
Install the Python dependencies with Pipenv:
cd onnx
pipenv install
cd ..
Export (run from the onnx directory so Pipenv finds the Pipfile):
pipenv run python export.py \
--model-id fastino/gliner2-multi-v1 \
--output-dir gliner2-multi-v1
Validation is enabled by default and compares the exported ONNX output to the PyTorch output for a dummy batch. It also runs a small extraction-method check (entities, classification, JSON) using identical decoding logic. To skip validation or to load the quantized model, use:
pipenv run python export.py --no-validate
pipenv run python export.py --no-validate-extraction
pipenv run python export.py --validate-quantized
pipenv run python export.py --no-fp16
The output directory will include:
model.onnxmodel_fp16.onnxmodel_int8.onnxtokenizer.jsontokenizer_config.jsonspecial_tokens_map.jsonadded_tokens.jsonspm.modelconfig.jsonmax_seq_len (default 512) and expects inputs padded
or truncated to that length. This matches the published bundle's runtime
config.span_logits label axis is aligned to token positions in the input
sequence. Use label marker token positions ([E], [C], [R], [L]) to map
logits back to schema labels. Label mapping and decoding are intentionally
handled outside the graph.