Downloads · 30 days
23
7% of all-time downloads
randhir302/MoEVL-Tiny-0.5B
MoEVL-Tiny-0.5B is a image-text-to-text model from randhir302. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A pocket‑sized multimodal Mixture‑of‑Experts model trained for under $25.
Downloads · 30 days
23
7% of all-time downloads
All-time downloads
345
Public
Parameters
451M
5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.8 GB · 99%
From the Hugging Face model README
A pocket‑sized multimodal Mixture‑of‑Experts model trained for under $25.
MoEVL‑Tiny is an ultra‑efficient vision‑language model that pairs a frozen SigLIP‑SO400M vision encoder with a Qwen2.5‑0.5B language model augmented by custom sparse MoE layers and LoRA adapters. It is designed for on‑device image understanding, is capable of running on edge devices, and was trained entirely using free cloud credits.
google/siglip-so400m-patch14-384Qwen/Qwen2.5-0.5B-Instruct| Component | Specification |
|---|---|
| Vision Encoder | SigLIP‑SO400M (frozen, ~400M params) |
| Projector | 2‑layer MLP (SiLU activation) – trained from scratch |
| Language Model | Qwen2.5‑0.5B (Trained in 4-bit QLoRA, merged and uploaded in pure BF16) |
| Sparse MoE | Last 4 transformer blocks replaced by SwiGLU‑based MoE layers (4 experts, top‑2 routing) |
| Token Compression | 2D adaptive average pooling: 729 → 49 visual tokens to save compute |
Trainable parameters: ~25M (out of ~1.5B total capacity).
Active parameters per token: ~0.5B.
The model was trained in three specialized stages:
The custom architecture (modeling_moevl_tiny.py) is embedded in the repository. Simply use trust_remote_code=True to load it directly.
import torch
from transformers import AutoProcessor
from huggingface_hub import snapshot_download
import sys
# 1. Download custom code and load model
model_path = snapshot_download("randhir302/MoEVL-Tiny-0.5B")
sys.path.append(model_path)
from modeling_moevl_tiny import MoEVLTinyForConditionalGeneration
model = MoEVLTinyForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16
).to("cuda").eval()
# 2. Load standard SigLIP processor
processor = AutoProcessor.from_pretrained("google/siglip-so400m-patch14-384")
# 3. Prepare image and inference
image = ... # PIL Image
pixel_values = processor(images=image, return_tensors="pt").pixel_values
answer = model.generate(pixel_values, prompt_text="Describe this image.", max_new_tokens=128)
print(answer)
The model's internal generate method defaults to:
temperature=0.3top_p=0.9top_k=50repetition_penalty=1.5no_repeat_ngram_size=4(These can be overridden by passing the corresponding arguments to the generate() function).
The model has been tested on hand‑picked out-of-distribution images (Picsum, Pexels) and a 100‑sample subset from the training domain. While quantitative metrics (BLEU) are currently low due to the small data regime, qualitative outputs demonstrate solid visual grounding:
@misc{MoEVL-Tiny-0.5B,
author = {Randhir Kumar},
title = {MoEVL-Tiny: A Pocket-Sized Multimodal Mixture-of-Experts Model Trained for Under $25},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{[https://huggingface.co/randhir302/MoEVL-Tiny-0.5B](https://huggingface.co/randhir302/MoEVL-Tiny-0.5B)}}
}