Sync from GitHub via hub-sync
Browse files- GLINER2-NOTES.md +4 -0
- README.md +2 -1
- classify-gliner2.py +1 -0
GLINER2-NOTES.md
CHANGED
|
@@ -106,10 +106,14 @@ How it was set up, if you want to do something similar with your own label list:
|
|
| 106 |
| [`fastino/gliner2.5-small-v1`](https://huggingface.co/fastino/gliner2.5-small-v1) | 74M | speed matters most | 0.653 | ~0.3 s | ~19 ms |
|
| 107 |
| [`fastino/gliner2.5-base-v1`](https://huggingface.co/fastino/gliner2.5-base-v1) | 194M | English text; the best accuracy per second | 0.690 | ~0.7–1 s | ~19 ms |
|
| 108 |
| [`fastino/gliner2.5-multi-v1`](https://huggingface.co/fastino/gliner2.5-multi-v1) (default) | 287M | non-English or mixed-language text | not measured | — | — |
|
|
|
|
| 109 |
|
| 110 |
On a GPU, base and small are equally fast per row; the difference only shows on a CPU. For speed on
|
| 111 |
a CPU, use plain fp32 PyTorch (see below for what did not work).
|
| 112 |
|
|
|
|
|
|
|
|
|
|
| 113 |
## Speed and quantization
|
| 114 |
|
| 115 |
Per-row latency at batch size 1, fine-tuned 52-label models:
|
|
|
|
| 106 |
| [`fastino/gliner2.5-small-v1`](https://huggingface.co/fastino/gliner2.5-small-v1) | 74M | speed matters most | 0.653 | ~0.3 s | ~19 ms |
|
| 107 |
| [`fastino/gliner2.5-base-v1`](https://huggingface.co/fastino/gliner2.5-base-v1) | 194M | English text; the best accuracy per second | 0.690 | ~0.7–1 s | ~19 ms |
|
| 108 |
| [`fastino/gliner2.5-multi-v1`](https://huggingface.co/fastino/gliner2.5-multi-v1) (default) | 287M | non-English or mixed-language text | not measured | — | — |
|
| 109 |
+
| [`fastino/GLiNER2.5-Decide`](https://huggingface.co/fastino/GLiNER2.5-Decide) | 486M | English classification; best zero-shot | not measured | — | — |
|
| 110 |
|
| 111 |
On a GPU, base and small are equally fast per row; the difference only shows on a CPU. For speed on
|
| 112 |
a CPU, use plain fp32 PyTorch (see below for what did not work).
|
| 113 |
|
| 114 |
+
GLiNER2.5-Decide on BL books: 0.851 zero-shot (default 0.767), 0.943 fine-tuned (default 0.931).
|
| 115 |
+
Train it on `a10g-small`; a `t4-small` ran out of memory.
|
| 116 |
+
|
| 117 |
## Speed and quantization
|
| 118 |
|
| 119 |
Per-row latency at batch size 1, fine-tuned 52-label models:
|
README.md
CHANGED
|
@@ -99,7 +99,8 @@ the model has not seen. Outputs are **private by default** (`--public` to opt ou
|
|
| 99 |
|
| 100 |
These commands use the default base model, `fastino/gliner2.5-multi-v1` (multilingual). For
|
| 101 |
English text, `--base-model fastino/gliner2.5-base-v1` is smaller and faster;
|
| 102 |
-
`gliner2.5-small-v1` is the fastest and loses about 4 points on the 52-tag example.
|
|
|
|
| 103 |
|
| 104 |
### Results
|
| 105 |
|
|
|
|
| 99 |
|
| 100 |
These commands use the default base model, `fastino/gliner2.5-multi-v1` (multilingual). For
|
| 101 |
English text, `--base-model fastino/gliner2.5-base-v1` is smaller and faster;
|
| 102 |
+
`gliner2.5-small-v1` is the fastest and loses about 4 points on the 52-tag example. For English zero-shot, try
|
| 103 |
+
`fastino/GLiNER2.5-Decide`. Sizes and speeds: [Choosing a model size](GLINER2-NOTES.md#choosing-a-model-size).
|
| 104 |
|
| 105 |
### Results
|
| 106 |
|
classify-gliner2.py
CHANGED
|
@@ -21,6 +21,7 @@ input. That gives two ways to use this script:
|
|
| 21 |
|
| 22 |
1. Zero-shot: pass the label names with --labels. No training and no LLM. A t4-small does about
|
| 23 |
33 rows/s; cpu-basic works but manages about 1.4 rows/s, so keep CPU for a few hundred rows.
|
|
|
|
| 24 |
2. Fine-tuned: pass --model with a repo produced by `train-gliner2.py`. The tasks and labels are
|
| 25 |
read from the model repo, so no --labels flag is needed.
|
| 26 |
|
|
|
|
| 21 |
|
| 22 |
1. Zero-shot: pass the label names with --labels. No training and no LLM. A t4-small does about
|
| 23 |
33 rows/s; cpu-basic works but manages about 1.4 rows/s, so keep CPU for a few hundred rows.
|
| 24 |
+
For English text, try `--model fastino/GLiNER2.5-Decide`.
|
| 25 |
2. Fine-tuned: pass --model with a repo produced by `train-gliner2.py`. The tasks and labels are
|
| 26 |
read from the model repo, so no --labels flag is needed.
|
| 27 |
|