NanoLot v0.1 (tiny multimodal decision model)

Student distilled from Qwen/Qwen3-VL-2B-Instruct. Not generative — outputs P(option|image,question,options).

Primitives: Choice / Score / Noul via option-conditioned scorer score_i=f(state,option_i) + softmax. Student: prajjwal1/bert-tiny + facebook/deit-tiny-patch16-224 + fusion(256) + MLP scorer (~12M params). Loss: a*CE(hard)+(1-a)*KL(teacher||student), temp-scaled for calibration.

Use

import json, torch
from safetensors.torch import load_file
from nanolot_model import NanoLotForDecision, predict
from transformers import AutoTokenizer, AutoImageProcessor

REPO = "nnlgsakib/nanolot"
cfg = json.load(open(hf_hub_download(REPO, "config.json")))

model = NanoLotForDecision(text_id=cfg["text_id"], vision_id=cfg["vision_id"], d=cfg["hidden"])
model.load_state_dict(load_file(hf_hub_download(REPO, "model.safetensors")), map_location="cpu")
model.eval()
tok      = AutoTokenizer.from_pretrained(REPO)
img_proc = AutoImageProcessor.from_pretrained(REPO)

predict(model, tok, img_proc, image,
        "What is in this image?", ["cat", "dog", "bird"])
# -> {'answer': 'cat', 'probabilities': {'cat': 0.81, ...}, 'confidence': 0.81}

Apply cfg["temperature"] to the logits for calibrated routing thresholds.

Downloads last month
48
Safetensors
Model size
10.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support