SEL Qwen 4B

SEL scores locations in a text or image for a given question. It returns scores aligned to source tokens or image patches in one backbone pass. Text results include character offsets and image results include patch coordinates.

This release contains the rank-16 LoRA and selection head from Run09 4B, epoch 2, step 15,622. The base model is Qwen 3.5 4B at revision 851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a. The LoRA adapts the language backbone. The vision encoder and token embeddings were frozen during training. The eight full-attention layers run bidirectionally, and the 24 gated delta layers retain their directional computation.

SEL source code · Research article · 27B checkpoint · Training data

Run inference

Use Linux, Python 3.12, and a CUDA GPU with BF16 support. Install the standalone SEL dependencies from commit c7ba97e7958c095de7b1edb263d00f91b949190f, including FlashAttention 2. Use the example in this repository to load the 4B base, the adapter, and the selection head together.

hf download spock-oss/sel-qwen-4b --local-dir ./sel-qwen-4b

CUDA_VISIBLE_DEVICES=0 python ./sel-qwen-4b/run_selection.py \
  --text 'This agreement is governed by the laws of Oregon.' \
  --query 'Which state governs this agreement?'

Use --image /path/to/image.png for an image and --environment to supply task rules. Pass --base /path/to/snapshot to reuse the pinned base weights. The example uses BF16 dense inference and the validation-calibrated cutoffs of 0.10 for text and 0.40 for images. Override the cutoff with --threshold. The reference example accepts up to 2,048 input tokens, including the query and any visual tokens. The Spock playground uses an FP8 vLLM deployment.

Files

File Contents
adapter_model.safetensors Trained LoRA tensors
adapter_config.json PEFT configuration and pinned base model
selection_head.safetensors Dense scorer, router, and linked pointer
sel_config.json Checkpoint step, training context, and selection cutoffs
run_selection.py Runnable 4B loading and inference example

The released SEL files use the MIT license. The separately downloaded Qwen base model uses Apache 2.0.

Evaluation

The test set contains 2,605 examples across 26 tasks. Macro F1 averages questions, while task-average F1 weights each task equally. Cutoffs were selected on validation and then applied to test.

Calibrated metric Score
Validation macro F1 59.24%
Test macro F1 60.85%
Test macro F1, text 59.03%
Test macro F1, images 62.42%
Test F1, equal weight per task 65.03%
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for spock-oss/sel-qwen-4b

Finetuned
Qwen/Qwen3.5-4B
Adapter
(1,098)
this model

Dataset used to train spock-oss/sel-qwen-4b