Skip to content

epic: token classification and span extraction (OpenAI Privacy Filter, GLiNER2.5) #2391

Closed
3 of 3 issues completed

Description

@inureyes

Problem / Background

mlx-vlm added models whose output is per-token tags or extracted spans rather than text or a sequence score: BERT *ForTokenClassification checkpoints such as Rampart and OpenAI Privacy Filter on a shared tagging and redaction pipeline (Neywa-Labs/mlx-vlm#2341, https://github.com/Blaizzy/mlx-vlm/blob/main/mlx_vlm/token_classification.py), and GLiNER2.5, which extracts spans for request-time labels (Neywa-Labs/mlx-vlm#2020, Neywa-Labs/mlx-vlm#2363). mlxcel's only classification surface is sequence-level /v1/rerank, so none of these can be served.

Goal

mlxcel tag and mlxcel extract with upstream's output shapes, a BERT / XLM-R token-classification head validated on Rampart, OpenAI Privacy Filter with its calibrated Viterbi decoder, and GLiNER2.5 on a new DeBERTa-v2 encoder, all matching mlx-vlm on their published checkpoints.

Sub-issues

Phase 1

Phase 2

Acceptance Criteria

Technical Considerations

Phase 1 (#2383) is the shared output surface plus the BERT token-classification head. Phase 2 is OpenAI Privacy Filter (#2387) and GLiNER2.5 with the DeBERTa-v2 encoder (#2390); they are independent of each other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:modelsModel architectures, weights, loading, metadatapriority:mediumMedium prioritystatus:doneCompletedtype:enhancementNew features, capabilities, or significant additions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions