Kev-4B-Web-Selector

Web-adapted Kev-4B, LoRA rank 16, checkpoint step 1,748. This is the selector used in our completed web-agent evaluations. It scores five supplied next-action candidates from a frozen OpenWebRL-4B-SFT actor using the task, screenshot, URL, and recent action history. It does not generate actions or run a browser itself.

This repository contains the complete trained language-side LoRA adapter and pointer head, processor assets, and an inference loader. The frozen base weights are downloaded separately from Qwen/Qwen3.5-4B-Base, pinned to revision 1001bb4d826a52d1f399e183466143f4da7b741b. Initialization was from released Kev-4B.

Load and score

Use a CUDA environment with the dependencies in requirements.txt. These versions match the training/evaluation environment. Optional torchao is not required; use an environment without it to avoid conflicts with older torchao versions.

Download the repository, install its requirements, and import the supplied loader:

hf download XunmeiLiu/Kev-4B-Web-Selector --local-dir kev-web
cd kev-web
pip install -r requirements.txt
from selector import KevSelector

model = KevSelector(checkpoint='.', device='cuda:0')
# Or: KevSelector('XunmeiLiu/Kev-4B-Web-Selector', device='cuda:0')
# Optional base_path='/path/to/the/pinned/Qwen3.5-4B-Base' uses local base weights.

# candidates: the five responses sampled by your actor, in their original order.
# Each item must have an 'action' string and an optional 'thought' string.
result = model.score_browser(
    intent=task_instruction,
    url=current_url,
    history=previous_action_summaries,
    candidates=candidates,
    image='/path/to/current_screenshot.png',
)
selected_candidate = candidates[result['selected']]  # zero-based index
print(result['scores'], result['probabilities'])

For a preformatted input, model.score(record) accepts state, instructions, options (ordered candidate strings), and image (screenshot path). The exact selection instruction is in instructions.txt. The browser helper formats numbered actions followed by their thoughts, uses the last eight action summaries (up to 300 characters each), and preserves candidate order. Actions use normalized [0,1000] coordinates on the screenshot.

Integration details:

  • Attach LoRA to Qwen3_5Model.language_model, not to the entire multimodal model. The loader checks that every adapter tensor matches the saved checkpoint.
  • option_isolation=False. Candidates share a causal sequence: later candidates can attend to earlier candidates; the final decision representation can attend to all candidates. This is not the candidate-isolation variant.
  • A pointer head projects the final decision token and each candidate-end token, then takes scaled dot products to produce candidate logits. No choice token is generated.
  • The default is raw logits, temperature 1.0. Probabilities are softmax(logits) once; selection is argmax(logits), with the first index winning an exact tie. These probabilities are not task-success estimates.
  • Screenshots use an area cap of 262,144 pixels; inputs are limited to 32,768 tokens and overlong inputs raise an error rather than silently truncate.
  • head.safetensors contains the same FP32 pointer weights as the original head.pt. The latter is retained for compatibility with our existing loader. Its inherited args and temperature_fit fields describe the upstream release, not this web fine-tuning run; use the recipe below and release_config.json for this run.

Training data and recipe

We reuse teacher-labeled action-selection records derived from OpenWebRL SFT demonstration trajectories. Each record contains a saved state and screenshot, five reasoning-and-action candidates sampled from OpenWebRL-4B-SFT at temperature 0.7, and a GPT-5.5-selected candidate index based on pre-execution context. Existing candidates and labels are reused; this Kev fine-tuning did not collect new rollouts or labels.

There are 27,956 training and 3,994 development decisions. The split is at the decision level, so states can overlap across splits. Candidate order is preserved, without permutation augmentation. Training minimizes categorical cross-entropy on the teacher-selected index and updates only the language-side LoRA and pointer head; the base model and visual components are frozen.

Setting Value
LoRA rank / alpha / dropout 16 / 32 / 0.05
Optimizer AdamW
Peak learning rate / weight decay 5e-5 / 0.01
Global batch size 16 decisions
Schedule 5% warmup, cosine decay, maximum 3 epochs
Checkpoint selection Development negative log-likelihood
Selected checkpoint Step 1,748, approximately one epoch
Precision BF16 backbone; FP32 adapters and pointer head

Online results

The frozen OpenWebRL-4B-SFT actor supplies five candidates per step at temperature 1.0, top-p 0.9, and at most 1,024 response tokens. Episodes have a 30-step limit. The selector uses raw-logit argmax.

Benchmark Successful / all tasks Overall success
WebVoyager 309 / 595 51.93%
Online Mind2Web 101 / 300 33.67%
DeepShop 83 / 150 55.33%

Each row is one complete run. WebVoyager and DeepShop use their benchmark-specific GPT-4o evaluators; Online Mind2Web uses AgentTrek with GPT-5.6 Terra. These are results for the actor-plus-selector pipeline, not standalone Kev accuracy. Live website changes and evaluation settings affect comparisons; these runs do not include matched same-window baseline controls. Further training and evaluation details are in the experiment report.

Release validation

Adapter and original head files are copied byte-for-byte from the selected checkpoint. Pointer-head safetensors are checked for exact tensor equality. Processor outputs, candidate token positions, and pointer-head computation are compared with the evaluation implementation on a synthetic input. This release preparation did not rerun a GPU forward pass; the checkpoint itself was used in the completed evaluations above.

Attribution and license

Based on Kev by Jared Palmer and Qwen3.5-4B-Base. The upstream adapter/head and base are Apache-2.0 licensed; this release uses Apache-2.0. The supplied loader adapts our visual Kev evaluation implementation. See LICENSE and NOTICE.

Downloads last month
24
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for XunmeiLiu/Kev-4B-Web-Selector

Adapter
(168)
this model