--- base_model: Qwen/Qwen3-VL-4B-Instruct license: apache-2.0 pipeline_tag: visual-question-answering tags: - glance - qwen3-vl - vision-language - logits - visual-question-answering - replicate --- # Glance Qwen3-VL-4B Probability-first visual decisions using [Glance](https://github.com/yoheinakajima/glance) with [Qwen3-VL-4B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct). This repository documents the public deployment and integration. It does not duplicate the base Qwen weights. The runtime downloads the pinned upstream model and uses Glance to project the model's hidden state directly onto yes/no or multiple-choice answers. ## Try it - [Interactive Hugging Face Space](https://huggingface.co/spaces/yoheinakajima/glance-qwen3-vl-4b-demo) - [Public Replicate model](https://replicate.com/untapped/glance-qwen3-vl-4b) Replicate users can run the public model with their own account and credits. ## Capabilities - Binary yes/no visual decisions - Multiple-choice visual classification with 2–8 options - Probability distribution and confidence score - Structured output without token-by-token answer generation - Scale-to-zero Nvidia L40S deployment ## Replicate API ```python import base64 import json import replicate image_base64 = base64.b64encode(open("image.jpg", "rb").read()).decode("ascii") output = replicate.run( "untapped/glance-qwen3-vl-4b", input={ "image_base64": image_base64, "question": "Is there a cat in this image?", "question_type": "yes_no", "options_json": "[]", }, ) print(output) ``` For multiple choice: ```python output = replicate.run( "untapped/glance-qwen3-vl-4b", input={ "image_base64": image_base64, "question": "Which animal is shown?", "question_type": "choice", "options_json": json.dumps(["Cat", "Dog", "Bird"]), }, ) ``` ## Output ```json { "answer": "Yes", "confidence": 0.98, "probabilities": [ {"label": "Yes", "probability": 0.99}, {"label": "No", "probability": 0.01} ] } ``` ## Architecture The deployment uses the native Glance Qwen backend. It does not prompt the model to generate an answer. Instead, Glance reads the model's final hidden state and scores the requested answer labels directly. The base model is loaded from the pinned upstream `Qwen/Qwen3-VL-4B-Instruct` revision during worker setup. ## Source and licenses - Base model: [Qwen3-VL-4B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct) - Glance: [yoheinakajima/glance](https://github.com/yoheinakajima/glance) - Deployment: [Replicate model](https://replicate.com/untapped/glance-qwen3-vl-4b) Use of the base model and Glance remains subject to their respective licenses.