Polyvalent Router (Fine-Tuned LAYA Head)

Fine-tuned LAYA System-1 routing classifier for the Polyvalent multi-specialist architecture. Given a structured dialogue state, it dynamically routes the interaction to either the base vision-language model (BASE) or the forensic deepfake specialist (DEEPFAKE).

Intended Use and Scope

  • Intended Use: Binary routing of user interaction requests based on 5-field dialogue runtime state (message, history, assets, active_image_id, last_analysis).
  • Out-of-Scope: Not intended as a general conversational agent, standalone classifier for unstructured text without runtime state schema, or direct image pixel inspector.

Training Data and Procedure

  • Backbone: ModernBERT-large (answerdotai/ModernBERT-large), fine-tuned with LAYA decision criteria.
  • Dataset: 2,000 reviewed, balanced dialogue turns with multimodal contextual metadata (Pushkarrrr15151/PolyVL-router-requests).
  • Procedure: 4 epochs, AdamW optimizer, bf16 mixed precision, seed 42.

Evaluation

Evaluated on group-held-out dev (n=200) and test (n=300) splits:

  • Accuracy: 98.0% (vs 59.0% zero-shot baseline)
  • Macro F1: 0.9785 (vs 0.5806 zero-shot baseline)
  • Deepfake Precision / Recall / F1: 97.3% / 97.3% / 97.3%
  • Base False Activation Rate: 1.59% (reduced from 65.08%)
  • Latency: ~12-18ms CPU, <5ms GPU

How to Load

import json
import torch
from safetensors.torch import load_file
from transformers import AutoTokenizer, AutoConfig
from input_serializer import serialize_state

# Load tokenizer and encoder configuration
tokenizer = AutoTokenizer.from_pretrained("./tokenizer")
config = AutoConfig.from_pretrained("./encoder")

# Load fine-tuned weights
weights = load_file("./model.safetensors")

# Format runtime state
state = {
    "message": "Is this face genuine or manipulated?",
    "assets": [{"id": "img_1", "kind": "image", "support": "supported", "availability": "available"}],
    "active_image_id": "img_1",
    "last_analysis": None,
    "history": []
}

text = serialize_state(state)
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True)
# Perform inference with LAYA decision head

Base Revision

  • Base Model: answerdotai/ModernBERT-large
  • Architecture: 22-layer ModernBERT encoder with LAYA 2-layer classification head.

Licences and Attributions

  • Model weights: Apache-2.0
  • ModernBERT upstream: Apache-2.0
  • LAYA SDK: Apache-2.0

Citation

@article{polyvalent2026,
  title={Polyvalent: Single-Base Multi-Specialist Architecture with Dynamic Adapter Residency},
  author={Polyvalent Research Team},
  year={2026}
}
Downloads last month
-
Safetensors
Model size
0.4B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Pushkarrrr15151/PolyVL-router-laya

Finetuned
(437)
this model