Skip to content

Commit fab459b

Browse files
davanstrienclaude
andauthored
classification: GLiNER2 zero-shot + fine-tune scripts (train-gliner2.py, classify-gliner2.py) (#118)
* classification: train-gliner2.py + classify-gliner2.py — zero-shot first, then fine-tune train-gliner2.py fine-tunes GLiNER2 (default fastino/gliner2.5-multi-v1) on any Hub dataset with a text column and one or more label columns. It scores the base model zero-shot, trains, and scores again on the same held-out rows; the model card reports both next to the majority-class floor. Single-label and multi-label are auto-detected, and repeating --label-column trains several tasks into one model. It records the tasks in classification_schema.json so classify-gliner2.py can label a dataset with no label flags. classify-gliner2.py labels a dataset zero-shot from --labels, or with a fine-tuned model. The gliner2 trainer catches CUDA OOM, skips the batch and continues. On t4-small a 56-label run skipped 1,006 of 1,020 steps and still "completed". train-gliner2.py now aborts after 5 OOM steps, before pushing, and suggests a batch size. Verified on Jobs (t4-small): blbooksgenre 0.793 -> 0.925, ag_news 0.718 -> 0.852, go_emotions micro-F1 0.265 -> 0.464, TREC-QC two tasks 0.542/0.468 -> 0.954/0.876; plus a synthetic edge-case set (bracketed labels, missing labels, empty multi-label lists) and zero-shot classification on cpu-basic (1.4 rows/s). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * classification: report the BL books GLiNER2 row as five seeds, not the best one The first run (seed 42) scored 0.925; four more seeds scored 0.897-0.908. The row now gives the mean and range, and the README says what the spread means for comparing runs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * classification: document the 30-minute Jobs timeout for train-gliner2.py Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * classification: gliner2 scripts — launch header, precision by GPU, GPU findings - [tool.hf-jobs] header on both scripts (t4-small, 1h timeout, HF_TOKEN); verified with --dry-run and with real submissions that pass no --flavor/--secrets flags. - --precision auto|fp32|bf16: bf16 on Ampere or newer (gliner2's own default for the 2.5 models), fp32 on T4, chosen by compute capability because is_bf16_supported() is true on T4. - ACCELERATOR was a bare "gpu" on t4-small and a10g-small, so the card's reproduce command now falls back to the GPU name to pick the flavor. - README: a10g-small fits the 56-label TREC run at batch size 16 (509s vs 1,761s on T4 at batch size 4); bf16 and fp32 run at the same speed on A10G; hardware moves a fixed-seed score by 1-2 eval rows. - Tried and left out after they failed on Jobs with gliner2 2.0.0: gradient checkpointing (crashes with the 2.5 models) and LoRA (final checkpoint did not load for scoring). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * classification: train-gliner2 restarts at a smaller batch size on OOM Instead of stopping after 5 out-of-memory steps, train-gliner2.py now restarts itself (os.execv) at a quarter of the batch size with 4x the gradient accumulation, down to batch size 1. Retrying inside the process does not work: after a failed run the gliner2 trainer leaves its state on the GPU, so each retry starts with less memory. The restarted process parses the new flags, so the model card's reproduce command names the batch size that worked. Verified on Jobs: TREC-QC (56 labels) and IMDB (2,000-character reviews) both fell back from 16 to 4 on t4-small and completed; IMDB also fell back on a10g-small; BL books did not fall back and reproduced 0.9253. README: fix a blank line that split the results table, add the IMDB long-text row, and describe the fallback. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019P6N4MBQsM535ZdEq5qi1j * classification: train-gliner2 reads local files, scores several eval splits, exports predictions - --train-file / --eval-file NAME=PATH (repeatable) load JSON Lines, e.g. from a mounted bucket. Local eval files are scored in full and in file order. - --labels-file fixes the label set and its order for training, zero-shot and eval, and stops the run if the data has a label outside it. - --export-predictions DIR writes {base,finetuned}-<split>/predictions.jsonl with the probability and raw logit of every label per row (batch_score + decode). - --no-push keeps the model in --output-dir/final. Pushed repos are now private by default (--public to opt out); a private run refuses an existing public repo. - --label-augmentation {upstream,off}: off sets synthetic_label_prob and remove_classification_label_prob to 0, so training sees the real, complete label set. - run_manifest.json (args, sampling config, precision, device, package versions, results). - Model card reports the base model's parameter count instead of a fixed ~300M, and one results table per eval split. README documents the options and an explicit --timeout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: classify-gliner2 pushes a private dataset by default --public opts out; --private is still accepted. A private run stops before classifying if the output dataset already exists and is public. Docstring notes the explicit --timeout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: move the GLiNER2 section out of the classify-dataset.py H1 It sits after the SetFit section, in index-table order, so the classify-dataset.py Quick Start follows its own intro again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: classify-gliner2 declares its output features A map batch where every confidence is None (multi-label with no label selected, or rows with no text) typed the new columns as null, and the next batch failed with "Couldn't cast array of type string to null". Reproduced with the real model; explicit features fix it. Also: the fine-tuned docstring example uses biglam/blbooksgenre (the blbooks-parquet example could not finish), --timeout 1h in the examples and the reproduce command, shlex-quoted reproduce values, a clear error for a missing or inaccessible model repo, load_from_cache_file=False, datasets<6, and ruff SIM102. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: train-gliner2 exits clearly on an empty split, quotes reproduce values A split with no usable rows after dropping unlabelled ones now stops with a message instead of failing later. The card's reproduce and classify commands shell-quote their values, and the classify snippet passes --timeout 1h. datasets<6. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: GLiNER2 train cost, pin chain, same-rows note Train cost column at the current hf jobs hardware rates, the transformers<5 -> huggingface_hub<1 pin chain versus the local hf CLI, and a note that the fine-tune -> classify example labels training rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: GLiNER2 README reorganised; findings move to GLINER2-NOTES.md - README section: pitch, quick start, how to pass labels and models, results table with a 52-label Hub task-tag row, model-size choice, fixed label sets, worked example, short good-to-know list. - GLINER2-NOTES.md: tested commands from the branch, table notes, the 52-tag example, speed and quantization findings, behaviour details, dead ends. - Cross-links between uv-scripts/classification (GLiNER2) and uv-scripts/gliner (GLiNER NER). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: train-gliner2 review fixes (label merge, zero updates, optimizer OOM) - Check the raw -> cleaned label mapping before deduplicating: for a plain string column, 'a (b)' and 'a b' were silently merged into one class. - Fix operator precedence when collecting raw single-label names (it added the characters of each label). - Use the trainer's total_steps: a short run where every batch ran out of memory (fewer than MAX_OOM_STEPS) no longer pushes an untrained model. - Catch torch.cuda.OutOfMemoryError from the optimizer step, which gliner2 2.0.0 does not handle, so it restarts at a smaller batch size like other OOMs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: README puts GLiNER2 first, then SetFit, then train-classifier Section and index-table order only, plus one line framing SetFit as the option for 8-64 labelled examples per class. No section content changed; anchors unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * classification: shorter GLiNER2 README section; detail moves to GLINER2-NOTES.md The fixed-label-set / bucket command, the worked example's setup notes and three behaviour bullets move to the notes file. The README keeps a pointer to each. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 548719b commit fab459b

6 files changed

Lines changed: 2049 additions & 41 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ For few-shot text classification, the focused **[`setfit-on-jobs` skill](skills/
7777
| **embeddings** | Embed text/images (auto-batch, prompt-aware); build a searchable Lance vector DB on the Hub | [`embeddings`](https://huggingface.co/datasets/uv-scripts/embeddings) |
7878
| **embeddings & atlas** | Embed a dataset; build an interactive map | [`build-atlas`](https://huggingface.co/datasets/uv-scripts/build-atlas) |
7979
| **data processing** | Filter / dedup / stats over large datasets; turn bucket uploads into optimized Parquet with a webhook | [`dataset-stats`](https://huggingface.co/datasets/uv-scripts/dataset-stats) · [`deduplication`](https://huggingface.co/datasets/uv-scripts/deduplication) · [`data-processing`](https://huggingface.co/datasets/uv-scripts/data-processing) |
80-
| **classification** | Fine-tune an encoder classifier (LFM2.5-Encoder, ModernBERT, …), few-shot train one with SetFit on CPU or GPU, or zero-shot classify with an LLM | [`classification`](https://huggingface.co/datasets/uv-scripts/classification) |
80+
| **classification** | Fine-tune an encoder classifier (LFM2.5-Encoder, ModernBERT, …), few-shot train one with SetFit on CPU or GPU, fine-tune or zero-shot label with GLiNER2 (~300M), or zero-shot classify with an LLM | [`classification`](https://huggingface.co/datasets/uv-scripts/classification) |
8181
| **dataset creation** | Turn PDFs / image URLs into Hub datasets | [`dataset-creation`](https://huggingface.co/datasets/uv-scripts/dataset-creation) · [`iiif-tiles`](https://huggingface.co/datasets/uv-scripts/iiif-tiles) |
8282
| **synthetic data** | Generate datasets with LLMs | [`synthetic-data`](https://huggingface.co/datasets/uv-scripts/synthetic-data) |
8383
| **inference** | Run any open LLM / VLM over a dataset | [`vllm`](https://huggingface.co/datasets/uv-scripts/vllm) · [`openai-oss`](https://huggingface.co/datasets/uv-scripts/openai-oss) · [`transformers-inference`](https://huggingface.co/datasets/uv-scripts/transformers-inference) |

‎classification/GLINER2-NOTES.md‎

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# GLiNER2 scripts: tested runs, findings and dead ends
2+
3+
Notes behind `train-gliner2.py` and `classify-gliner2.py`. The README has what you need to run them;
4+
this file records what was tried, what worked, what did not, and the exact runs the README numbers
5+
come from. Much of it was run and written up by coding agents (Claude) and checked by a person.
6+
7+
## Tested commands
8+
9+
Each README command was run from the branch before merge (`t4-small`, 2026-09-23):
10+
11+
| Command | Result | Time | Cost |
12+
|---|---|---|---|
13+
| train, `biglam/blbooksgenre` `title_genre_classifiction`, defaults | zero-shot 0.793 → fine-tuned 0.925 (174-row carve-out) | 149 s training | ~$0.02 |
14+
| classify with that model, same dataset | 1,736 rows labelled | 20 s | <$0.01 |
15+
| classify zero-shot, `fancyzhx/ag_news` test, 4 labels | 7,600 rows labelled | 96 s | ~$0.02 |
16+
| train, `fancyzhx/ag_news`, `--max-train-samples 2000 --epochs 2` | 0.733 → 0.873 (2,000 test rows) | 137 s training, 298 s whole Job | ~$0.03 |
17+
18+
The ag_news README row (0.718 → 0.852) and this run (0.733 → 0.873) differ because the 2,000
19+
scored test rows are a different random sample. Expect roughly 0.72 → 0.85–0.87.
20+
21+
## Larger or fixed label sets
22+
23+
For tens of labels that are always scored together (a taxonomy, a fixed tag list), and for data
24+
you keep in a bucket instead of a Hub dataset:
25+
26+
```bash
27+
hf jobs uv run --flavor a10g-small --timeout 2h --secrets HF_TOKEN \
28+
-v hf://buckets/username/my-bucket:/bucket \
29+
https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-gliner2.py \
30+
--train-file /bucket/train.jsonl \
31+
--eval-file calibration=/bucket/calibration.jsonl --eval-file development=/bucket/development.jsonl \
32+
--labels-file /bucket/labels.json --label-column labels --label-augmentation off \
33+
--base-model fastino/gliner2.5-base-v1 \
34+
--no-push --output-dir /bucket/runs/gliner2 --export-predictions /bucket/runs/gliner2/predictions
35+
```
36+
37+
- `--labels-file` fixes the label set and its order for training, zero-shot and evaluation, so a
38+
label that is rare or missing in the training data is still an option.
39+
- `--label-augmentation off`: gliner2's trainer by default renames labels to "label 1", "label 2",
40+
… in half the rows and drops up to half of them, which helps a general zero-shot model. With a
41+
fixed label set it cost 2–3 points of top-1 on the 52-tag example.
42+
- `--eval-file NAME=PATH` (repeatable) scores each split in full and in file order.
43+
- `--export-predictions` writes every row's probability and raw logit for every label, so you can
44+
fit your own temperature or thresholds on one split and check them on another.
45+
- `--no-push` keeps the model in `--output-dir` instead of creating a Hub repo.
46+
47+
## Measured table notes
48+
49+
On the T4, TREC and IMDB ran out of memory at the default batch size of 16, and the script restarted
50+
them at batch size 4 with 4 gradient accumulation steps. Before that fallback existed, the TREC run
51+
"completed" with 1,006 of 1,020 steps skipped and scored 0.576 / 0.484, barely above zero-shot. Many
52+
labels are also slow: TREC trained at 9 rows/s against 55 rows/s for the 2-label task, because every
53+
label is part of the input. For hundreds of labels, use `train-classifier.py`. Prediction was not the
54+
limit: the 300 IMDB reviews were scored at batch size 32 on the T4 with no fallback.
55+
56+
The same BL books run (seed 42) scored 0.925 on a T4, 0.937 on an A10G in fp32 and 0.931 on an A10G in
57+
bf16 — one or two eval rows apart, so hardware and precision are not a way to gain accuracy, but they
58+
are one more thing to hold constant when you compare runs.
59+
60+
Two upstream options are deliberately absent: in `gliner2` 2.0.0, gradient checkpointing crashes
61+
with the 2.5 models, and a LoRA run trained but its final checkpoint did not load for scoring (LoRA
62+
also did not fix the 56-label out-of-memory case on a T4).
63+
64+
The BL books row is the mean and range of five seeds; the other rows are one seed each. Read the
65+
range before you compare two runs: `--seed` also picks the carve-out rows, and the zero-shot model
66+
never changes, so its 3-point spread is what 174 eval rows do to the number on their own. A
67+
difference smaller than that between two runs is not a result. Use a dataset with a fixed
68+
`--eval-split`, and as many eval rows as you can get, when you want to compare runs.
69+
70+
The ag_news, go_emotions and TREC rows are deliberately small runs (capped training rows, 2–3 epochs) that
71+
test the script, not tuned results. The BL books row trains on the full 1,562 titles; its eval is a 10%
72+
carve-out, so it is not comparable with published numbers for that dataset.
73+
74+
## A larger label set: 52 Hub task tags
75+
76+
`train-gliner2.py` was used to fine-tune a tagger that suggests a Hub dataset's task tags from its
77+
column names and first row (the worked example in the README).
78+
79+
- 16,000 training datasets, 1,000 calibration and 3,000 development datasets; calibration and
80+
development are newer datasets from owners not in the training data.
81+
- `gliner2.5-base-v1`, `--labels-file` (52 tags), multi-label, `--label-augmentation off`, 5 epochs,
82+
`rtx-pro-6000`, about 17 minutes of training.
83+
- Development top-1 in the owner's tags: base 0.695 / 0.686 (two seeds), small 0.653, zero-shot
84+
0.102. Always answering "text-generation" scores 0.320, so zero-shot is below a constant guess.
85+
- `--label-augmentation upstream` (gliner2's default) scored 0.664: turning it off added 2–3 points.
86+
- The two seeds differ by about 1 point, almost all of it on one owner's 33 near-identical
87+
datasets that the model labels tabular-regression or tabular-classification depending on the seed.
88+
- Owner tags are noisy: in a hand-checked sample, about 1 in 10 datasets was missing a tag that fits.
89+
90+
How it was set up, if you want to do something similar with your own label list:
91+
92+
- **Input text:** the dataset's column names and types, then its first row, built from the dataset
93+
viewer's preview and cut to about 370 tokens. Keep the exact same builder for training and
94+
prediction; a small difference in the text is a different input.
95+
- **Labels:** a fixed `--labels-file` of 52 tags, multi-label (`labels` is a list per row), with
96+
`--label-augmentation off`.
97+
- **Split by time and owner:** the evaluation rows are newer datasets from owners who are not in
98+
the training data, so the score is not inflated by near-duplicate datasets from the same owner.
99+
- **Two eval files** (`--eval-file calibration=… --eval-file development=…`) and
100+
`--export-predictions`: thresholds are chosen on one file and checked on the other.
101+
102+
## Speed and quantization
103+
104+
Per-row latency at batch size 1, fine-tuned 52-label models:
105+
106+
| Model | L4 (fp16) | T4 (fp16) | Apple M1 Pro CPU | Free CPU Space (2 vCPU) |
107+
|---|---|---|---|---|
108+
| gliner2.5-small | ~19 ms | — | — | ~0.3 s |
109+
| gliner2.5-base | ~19 ms | ~27 ms | ~0.19 s | ~0.7–1 s |
110+
111+
- On a GPU, small and base take the same time per row; fixed overhead dominates.
112+
- **Dynamic int8 did not work.** Agreement of the top label with fp32 on 64 rows: ONNX Runtime
113+
default 6%, `torch.ao` Linear 1.6%, per-channel 58%, MatMul-only per-channel 59%, skipping the
114+
feed-forward down-projection 91%, attention layers only 94%. Speed-up was at most 1.2×. The fp32
115+
margins between the top two labels were healthy, so activation outliers in the fine-tuned
116+
encoder are the likely cause. Calibrated static int8, or keeping sensitive layers in full
117+
precision, might work; it was not tried.
118+
- **ONNX:** `gliner2` 2.0.0 has no export. Exporting only the encoder matches fp32 exactly, but
119+
ran 1.8× slower than PyTorch on an Apple M1.
120+
- bf16 on a CPU keeps the same answers but was 6× slower on an M1.
121+
- On HF CPU Jobs, `os.cpu_count()` reports the host's cores, not the Job's vCPUs. Set torch's
122+
thread count explicitly or the run oversubscribes and stalls.
123+
124+
## Behaviour details
125+
126+
- **Single-label and multi-label**, auto-detected from the label column (a list per row is multi-label). An empty list is kept as a valid "none of these" answer.
127+
- **Several tasks in one model.** Repeat `--label-column` and each column becomes a task; the model answers all of them in one pass. `classify-gliner2.py` then writes one `predicted_<task>` and one `predicted_<task>_confidence` column per task.
128+
- **Evaluation split and metrics match `train-classifier.py` and `train-setfit.py`** (`--eval-split`, else `validation`, else `test`, else a carve-out; accuracy + macro F1), so the rungs are comparable. Multi-label tasks report micro/macro F1 and exact match.
129+
- **Label names are part of the prompt.** Real names (`Fiction`, `Sports`) work; integer codes make zero-shot meaningless, and the script warns. Brackets are stripped from label names because GLiNER2 rejects them at inference.
130+
- **It does not train on nothing.** The GLiNER2 trainer catches a CUDA out-of-memory error, skips the batch and carries on, so an undersized GPU looks like a healthy job that produces an untrained model. After 5 out-of-memory steps the script restarts itself at a quarter of the batch size, with 4× the gradient accumulation, so the effective batch size stays the same. It goes down to batch size 1, then stops before anything is pushed. The model card's reproduce command records the batch size that worked. Memory grows with batch size × number of labels × text length.
131+
- **The launch config ships with the script.** Both scripts carry a [`[tool.hf-jobs]` header](https://huggingface.co/docs/hub/jobs-configuration#define-the-launch-config-in-the-script) (`t4-small`, a 1 hour timeout, the `HF_TOKEN` secret). With `hf` CLI 1.32 or newer, `hf jobs uv run <script-url> <args>` is enough, and `--dry-run` shows what it resolves to. Flags still win, and the examples here keep them so they also work on older CLIs — which ignore the header and stop the Job after 30 minutes, before the model is pushed. Pass `--timeout` explicitly (the examples use `1h`; a large run needs more) whenever you cannot be sure which CLI launches the job.
132+
- **Outputs are private by default.** `train-gliner2.py` creates a private model repo and `classify-gliner2.py` a private dataset; pass `--public` to opt out. If the target repo already exists and is public, both scripts stop before doing any work. (`--private` is still accepted, and does nothing.)
133+
- **Local files, several eval splits, exported predictions.** Instead of a Hub dataset, `train-gliner2.py` can read JSON Lines files, for example from a bucket mounted with `-v`:
134+
135+
```bash
136+
hf jobs uv run --flavor a10g-small --timeout 2h --secrets HF_TOKEN \
137+
-v hf://buckets/username/my-bucket:/bucket \
138+
https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-gliner2.py \
139+
--train-file /bucket/train.jsonl \
140+
--eval-file calibration=/bucket/calibration.jsonl --eval-file development=/bucket/development.jsonl \
141+
--labels-file /bucket/labels.json --label-column labels --label-augmentation off \
142+
--no-push --output-dir /bucket/runs/gliner2 --export-predictions /bucket/runs/gliner2/predictions
143+
```
144+
145+
- `--eval-file NAME=PATH` (repeatable): each file is an eval split, scored zero-shot and fine-tuned, in full and in file order.
146+
- `--labels-file`: a JSON list or one label per line. It fixes the label set and its order for training, zero-shot and evaluation; a label in the data that is not in the file stops the run.
147+
- `--export-predictions DIR`: writes `DIR/{base,finetuned}-<split>/predictions.jsonl`, one line per row: `{"row": i, "probabilities": {task: {label: p}}, "logits": {task: {label: logit}}}` with every label. Probabilities are gliner2's (softmax for a single-label task, a sigmoid per label for multi-label); logits are the raw per-label scores. Exporting also switches off the `--max-eval-samples` cap for a Hub eval split.
148+
- `--no-push`: no Hub repo is created or written; the model stays in `--output-dir/final`.
149+
- `--label-augmentation off`: gliner2's trainer by default renames the labels to "label 1", "label 2", ... in half of the training rows and drops up to half of the labels (`upstream`). With a fixed label set that is always scored in full, `off` trains on the real, complete label set every time; label-order shuffling stays on.
150+
- A `run_manifest.json` (all arguments except the token, the label-augmentation config, precision, device and package versions, then the results) is written to `--output-dir`, the export directory and the model folder.
151+
- **Pick the GPU by label count and text length.** A `t4-small` fit short texts with 2, 4 and 28 labels at the default batch size. The 56-label TREC task and 2,000-character IMDB reviews both fell back to batch size 4, and IMDB did so on the A10G too. `a10g-small` (24 GB) trains about 2.3× faster and fit the 56-label TREC run at the default batch size, in 509s against 1,761s on the T4 at batch size 4. `--precision auto` uses bf16 on Ampere or newer GPUs (A10G, L4) and fp32 on a T4; on the A10G bf16 and fp32 ran at the same speed (62s and 59s), so bf16 there buys memory, not time.
152+
- **Texts are truncated** to `--max-text-chars` (default 2000), with a count.
153+
- **It is a GLiNER2 checkpoint**, loaded with `gliner2.classification.Classifier.from_pretrained(repo)`, not `AutoModelForSequenceClassification`. `gliner2` pins `transformers<5`, which keeps `huggingface_hub` below 1.0 inside the Job. The `hf` CLI 1.32 or newer that reads the `[tool.hf-jobs]` header is a separate install on your own machine, so the two versions do not conflict.
154+
155+
## Dead ends
156+
157+
- Gradient checkpointing crashes with the GLiNER2.5 models in `gliner2` 2.0.0.
158+
- A LoRA run trained, but its final checkpoint did not load for scoring, and LoRA did not fix the
159+
56-label out-of-memory case on a T4.
160+
- Before the out-of-memory restart existed, a TREC run "completed" with 1,006 of 1,020 steps
161+
skipped and scored barely above zero-shot. Check the logs for `OOM at step` when a result looks flat.

0 commit comments

Comments
 (0)