Skip to content

Named entity recognition and linking with gliner#433

Open
ealmloff wants to merge 38 commits into
mainfrom
ner
Open

Named entity recognition and linking with gliner#433
ealmloff wants to merge 38 commits into
mainfrom
ner

Conversation

@ealmloff

@ealmloff ealmloff commented Apr 14, 2026

Copy link
Copy Markdown
Member

Adds support for entity recognition and linking with some small models in gliner family

ealmloff added 30 commits April 12, 2026 21:29
Integrates main's "Target Naga IR directly (#435)", segment-anything (#432),
unified conformance library (#434), and README rename.

Conflict resolutions of note:
- kalosm-language: kept ner's kalosm-chunking crate extraction; wired it into
  main's feature-gated layout (chunking feature now pulls dep:kalosm-chunking;
  dropped the now-unused direct srx dep, which lives in kalosm-chunking).
- fusor-core/matmul: took main's restructured matmul; ported ner's batch-dim
  broadcasting (out_shape max + relaxed assertion) into matmul/kernel.rs.
- fusor-core/tensor: ported ner's Tensor::materialized() and the wasm32 guard on
  debug_assert_real() into main's tensor/ module; added the matching
  gpu::Tensor::materialized() wrapper in fusor.
- fusor/lib.rs: took main's unified F16/F32 q_mat_mul arm (dequantize+mat_mul);
  kept ner's Tensor::materialize()/materialized() additions.
- fusor/layers/linear.rs + quantized.rs + activations.rs: took main's versions
  (q_mat_mul_3d, unified gelu with tanh_exact, tests moved to conformance crate)
  which supersede ner's equivalent fixes.
- rbert self_attention: kept ner's flash_attention(BatchKeyMask) path, which
  matches the idiom main already uses in modern_bert and is supported by the
  merged fusor flash_attention API.
- device.rs: kept main's rewrite + ner's FUSOR_DISABLE_SHADER_F16 env guard.
- rgliner / rgliner-web: aligned with main's fusor cpu/gpu backend split
  (added cpu/gpu features forwarding to fusor + rbert); removed the obsolete
  kalosm-common/tokio feature (main's kalosm-common now loads synchronously
  via ureq and no longer exposes tokio); ungated with_cache.

Dropped as superseded by main's rewrites (verify rgliner batched inference):
- compute_graph/resolve.rs dead-node-pruning fix: main rewrote the resolver
  (single-target -> multi-target, fusion rules split into separate modules with
  their own dead-node handling) and added fusion_correctness conformance tests;
  ner's single-target fix is structurally incompatible (references self.target).
- quantized/matmul/sgemv batch guard: main's tile-ir qmatmul dispatches a
  dedicated batch_size dimension for the single-row path, covered by the
  quantized_matmul_batched conformance test.

Verified: cargo check passes for the full workspace, the wasm32 rgliner-web
demo, and the conformance test suite.
# Conflicts:
#	Cargo.lock
#	fusor-ml/fusor/src/lib.rs
@ealmloff ealmloff marked this pull request as ready for review June 20, 2026 23:04
@ealmloff ealmloff added enhancement New feature or request models Related to the models Floneum supports labels Jun 20, 2026
@github-actions

Copy link
Copy Markdown

Preview available at https://floneum.github.io/kalosm/pr-preview/pr-433/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request models Related to the models Floneum supports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant