Skip to content

Feat/streaming#45

Merged
Ingvarstep merged 25 commits into
mainfrom
feat/streaming
Jul 17, 2026
Merged

Feat/streaming#45
Ingvarstep merged 25 commits into
mainfrom
feat/streaming

Conversation

@BioMikeUkr

Copy link
Copy Markdown
Member

Streaming Classification for Decoder-KV Architecture

Adds incremental multi-session streaming classification to the GLiClass decoder-KV model.

New: gliclass/streaming/
Complete streaming pipeline with per-session KV cache management, batched multi-session processing, and pluggable classification trigger strategies. Six built-in strategies: EveryChunkStrategy, EveryNTokensStrategy, OnDelimiterStrategy, NeverStrategy, SlidingWindowStrategy, ComposedStrategy. Pipeline supports CPU offloading with pinned memory, async GPU transfers, sub-batch chunking, and explicit session management (delete_session, clear_sessions, active_sessions). Installable as pip install gliclass[streaming], does not affect the core package.

New: Decoder-KV architecture
GLiClassDecoderKV pairs a causal LM backbone Qwen3.0-Qwen3.5 support with DecoderKVScorer, a lightweight bidirectional DeBERTa-v2 encoder reading label hidden states at <>/<> positions.

Updated: gliclass/training.py
Added save_optimizer_state to TrainingArguments — skips saving optimizer and scheduler state in checkpoints to reduce checkpoint size on large models.

@BioMikeUkr
BioMikeUkr requested a review from Ingvarstep July 10, 2026 13:23
@Ingvarstep
Ingvarstep merged commit 413520a into main Jul 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants