Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/architectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ All stateless architectures apply the checkpoint's text-only `config.max_len`
before encoding labels. Whether labels share a later backbone context with the
text depends on the architecture: uni-encoders share it, while bi-encoders keep
the two sequences separate. Cached StreamingSpan sessions use their causal
decoder context instead. See [Input limits and truncation](input_limits.md) for
decoder context instead. See [Input limits and truncation](usage.md#input-limits-and-truncation) for
the complete behavior and production preflight guidance.

## Vanilla GLiNER (UniEncoderSpan)
Expand Down Expand Up @@ -660,7 +660,7 @@ complete current entity snapshot with document-relative character offsets. It
is not a delta: callers that render live changes should compare consecutive
snapshots to identify additions, updates, and removals.

The [StreamingSpan guide](streaming.md) covers the session API, persistent
The [StreamingSpan guide](usage.md#streamingspan-models) covers the session API, persistent
batches, asynchronous microbatching, cache cleanup, configuration, and
deployment trade-offs. A PII-oriented checkpoint is available at
[knowledgator/gliner-stream-pii-v1.0](https://huggingface.co/knowledgator/gliner-stream-pii-v1.0).
Expand Down
2 changes: 1 addition & 1 deletion docs/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ configurations may override the base default.
This is not necessarily the backbone's total context length. Uni-encoder
prompts and text share the later transformer subword/context limit, while
bi-encoders encode labels separately. See [Input limits and
truncation](input_limits.md) for all limits and the StreamingSpan exception.
truncation](usage.md#input-limits-and-truncation) for all limits and the StreamingSpan exception.

---

Expand Down
9 changes: 6 additions & 3 deletions docs/convert_to_onnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ automatically; keep an OpenVINO `.xml` file beside its matching `.bin` file.

## Installation

ONNX Runtime CPU support is included in the default installation:
For ONNX Runtime CPU support, install the optional `onnx` extra:

```bash
pip install gliner
pip install "gliner[onnx]"
```

Install the Python `onnx` package when exporting a PyTorch checkpoint to ONNX:

```bash
pip install gliner onnx
pip install "gliner[onnx]" onnx
```

For ONNX Runtime with CUDA execution providers, install the GPU extra:
Expand All @@ -35,6 +35,9 @@ pip install "gliner[gpu]"
```

Add `onnx` to the same command if this environment will also export models.
Choose only one of `gliner[onnx]` and `gliner[gpu]`: both runtime packages
provide the same Python module and must not be installed together. The default
`gliner` installation does not install either ONNX Runtime package.

For direct OpenVINO export and inference, install the OpenVINO extra. Direct
OpenVINO conversion does not create an intermediate ONNX model:
Expand Down
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ This documentation includes installation guides, tutorials, advanced topics, and
intro
instalation
quickstart
input_limits
usage
streaming
configs
training
architectures
Expand Down
217 changes: 0 additions & 217 deletions docs/input_limits.md

This file was deleted.

7 changes: 5 additions & 2 deletions docs/instalation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ To begin using the GLiNER model, you can install the GLiNER Python library throu
pip install gliner
```
:::tip[ONNX Runtime]
CPU inference with ONNX Runtime is included in the default installation. Install the separate `onnx` package to export models, or use the GPU feature for CUDA execution providers.
ONNX Runtime is optional. Choose the `onnx` extra for CPU inference or the `gpu` extra for CUDA execution providers. Install only one: the CPU and GPU packages share the same Python module. Install the separate `onnx` package to export models.
:::

```bash
pip install onnx # required for ONNX export
pip install "gliner[onnx]" # CPU-backed ONNX Runtime
# or
pip install "gliner[gpu]" # GPU-backed ONNX Runtime

pip install onnx # additionally required for ONNX export
```

:::tip[OpenVINO]
Expand Down
13 changes: 8 additions & 5 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,16 @@ To begin using the GLiNER model, you can install the GLiNER Python library throu
!pip install gliner
```

CPU ONNX Runtime support is included in the default installation. Install
`onnx` when exporting models, or install GLiNER with the GPU feature for CUDA
execution providers:
ONNX Runtime is optional. Choose the `onnx` extra for CPU inference or the
`gpu` extra for CUDA execution providers. Install only one: the CPU and GPU
packages share the same Python module. Also install `onnx` when exporting models:

```bash
!pip install onnx
!pip install "gliner[gpu]"
!pip install "gliner[onnx]" # CPU
# or
!pip install "gliner[gpu]" # NVIDIA GPU

!pip install onnx # additionally required for ONNX export
```

Install OpenVINO support to export models directly to OpenVINO IR or run them
Expand Down
8 changes: 6 additions & 2 deletions docs/serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ outputs = client.predict(
```

Each dictionary key is returned as the entity label; its value is the prompt encoded
for that text. A single dictionary is shared across every input text.
for that text. A single dictionary is shared across every input text. When supplying
a list of dictionaries, its length and order must match the input texts, and each
dictionary contains all labels for its corresponding text. For a single text, put
all labels in one dictionary. See [Label descriptions](usage.md#label-descriptions)
for examples of shared and per-text label sets.

Network or server errors surface as `gliner.serve.client.GLiNERClientError`.

Expand All @@ -90,7 +94,7 @@ overrides the loaded model's text-only `config.max_len`; requests above it can
still return HTTP success after GLiNER keeps only the prefix and emits a Python
warning inside the replica. If the service contract requires full-input
coverage, validate or window requests explicitly. See [Input limits and
truncation](input_limits.md) for a preflight that uses the public model API.
truncation](usage.md#input-limits-and-truncation) for a preflight that uses the public model API.
:::

**HTTP request (no client library):**
Expand Down
Loading
Loading