Add GLiNER2.5-Decide support and Sort Anything / Sort Decisions demos - #13
Merged
Merged
Conversation
GLiNER2Manager learns the Decide packages from FluidInference/gliner2-5-decide-coreml: `.decide` (128 tokens) and `.decideLong` (256 tokens), up to 4 heads x 32 labels per call. Adds a multi-head schema sequence ([SEP_STRUCT] between heads, as GLiNER's SchemaTransformer builds it) and classifyConcurrently(text:heads:), which uses per-call inputs and Core ML's async prediction so several calls can be in flight on one model. Single-head sequences are unchanged (all saved base and multilingual fixtures still match). The fp16 packages are pinned rather than W8: on the GPU the W8 packages trigger a load-time preparation that peaked at 8.7 GB and added about 8 s of load, while fp16 peaks near 1 GB. SortAnythingDemo sorts 1,000 DBpedia-14 test abstracts into categories editable at run time (Show: paced flying cards; Turbo: 4 calls in flight). SortDecisionsDemo streams Fastino's Fast Decisions dev split with every head of a document answered in one call. Both fetch their data from Hugging Face at pinned revisions and cache it; nothing is bundled. Headless checks on an M5 Pro: 1,000 DBpedia items in about 5.9 s at 89.0%, identical to the gliner2 PyTorch release on all 1,000; Fast Decisions 62.7% average, identical to the Python Core ML path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds GLiNER2.5-Decide (Fastino, Apache-2.0) via the Core ML packages in FluidInference/gliner2-5-decide-coreml, plus two demos.
GLiNER2Variant.decide(128 tokens) and.decideLong(256 tokens): up to 4 heads × 32 labels per call, fp16 packages pinned by revision and checksum.[SEP_STRUCT]between heads) andGLiNER2Manager.classifyConcurrently(text:heads:), which uses Core ML's async prediction so several calls can run at once. Single-head sequences are unchanged; all saved base/multilingual fixtures still match.SortAnythingDemo/SortAnythingCheck: 1,000 DBpedia-14 abstracts sorted into run-time categories.SortDecisionsDemo/SortDecisionsCheck: Fastino's Fast Decisions dev split, every head of a document in one call.Measured on an M5 Pro:
Fast Decisions (dev): 62.7% average, identical to the Python Core ML path.
Notes for review:
🤖 Generated with Claude Code