Laya Router Fine-Tuned Model

A fine-tuned Laya decision model that selects a route for a request. It predicts one of these labels:

  • qwen3-0.6b for simple text-only requests
  • qwen3.5-4b for more involved text tasks such as coding and reasoning
  • qwen3VL for requests that require understanding attached images or video
  • cloud for requests that exceed local model capabilities or context limits, when cloud use is permitted

This checkpoint is a router only. It returns a route label; it does not load or call the Qwen or cloud models. The application must implement that dispatch separately. Image routing also requires the application to pass the image to the vision model.

Use Locally

Install Laya, then load the checkpoint directory and its bundled question schema:

pip install laya==0.4.13
import json
import laya

checkpoint_dir = "/path/to/laya-router-finetuned"
agent = laya.load(checkpoint_dir)

with open(f"{checkpoint_dir}/questions.json", encoding="utf-8") as file:
    questions = json.load(file)

result = agent.predict("Write a small Python Snake game.", questions)
route = result["answers"]["what_model"]["choice"]
print(route)  # For example: qwen3.5-4b

Keep the question schema used at inference consistent with the schema in questions.json.

Training Results

On the 39-example held-out evaluation set, the base Laya checkpoint scored 74.4% accuracy and this fine-tuned checkpoint scored 97.4% accuracy. These are results on a small synthetic dataset, so they should not be treated as a guarantee of performance on real-world prompts. Test with fresh examples representative of your use before relying on the router.

The model reported mean confidence of 0.9998 after fine-tuning, while the training report notes that confidence calibration had limited evidence. Do not interpret a high confidence score as certainty.

Files

  • model.safetensors, encoder/, and tokenizer/ contain the checkpoint needed for inference.
  • questions.json contains the route question schema.
  • train_report.json contains evaluation metrics and training configuration.
  • checkpoint_latest/ is an additional training checkpoint snapshot and is not required for normal inference.
Downloads last month

-

Downloads are not tracked for this model. How to track
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 palboy/laya-model-router

Finetuned
(197)
this model