Downloads · 30 days
0
SatyaJaiss/SigLIP-Qwen-1.7B-COCO-Captioner
SigLIP-Qwen-1.7B-COCO-Captioner is a machine learning model from SatyaJaiss. Use it for the machine learning 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.
This is a custom Multimodal Large Language Model (MLLM) designed for Image Captioning. It combines a state-of-the-art vision encoder with a lightweight LLM using a custom Q-Former style adapter.
Downloads · 30 days
0
Access
Public
Updated Jan 13, 2026
Repo size
3.8 GB
Likes
0
Public
Click a slice to open those files.
.bin3.8 GB · 100%
From the Hugging Face model README
This is a custom Multimodal Large Language Model (MLLM) designed for Image Captioning. It combines a state-of-the-art vision encoder with a lightweight LLM using a custom Q-Former style adapter.
google/siglip2-base-patch16-512 (Frozen)Qwen/Qwen3-1.7B (LoRA Fine-tuned)The model was trained in two stages on an NVIDIA H100 GPU:
Note: This model uses a custom architecture code (model_architecture.py) which is included in the repository. You must load the architecture class before loading the weights.
import torch
from transformers import AutoTokenizer
from huggingface_hub import hf_hub_download
from model_architecture import MultiModalQwen, MMConfig
from PIL import Image
from torchvision import transforms
# 1. Initialize Configuration & Model
cfg = MMConfig()
model = MultiModalQwen(cfg)
# 2. Download and Load Weights
ckpt_path = hf_hub_download(repo_id="SatyaJaiss/SigLIP-Qwen-1.7B-COCO-Captioner", filename="pytorch_model.bin")
state_dict = torch.load(ckpt_path, map_location="cpu")
model.load_state_dict(state_dict)
model.to("cuda").eval()
# 3. Load Tokenizer
tokenizer = AutoTokenizer.from_pretrained("SatyaJaiss/SigLIP-Qwen-1.7B-COCO-Captioner")
# 4. Prepare Image
image_path = "path/to/your/image.jpg"
image = Image.open(image_path).convert("RGB")
transform = transforms.Compose([
transforms.Resize((512, 512)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
])
pixel_values = transform(image).unsqueeze(0).to("cuda").bfloat16()
# 5. Generate Caption
prompts = ["Caption: "]
inputs = tokenizer(prompts, return_tensors="pt").to("cuda")
with torch.no_grad():
gen_ids = model.generate(
pixel_values=pixel_values,
input_ids=inputs.input_ids,
attention_mask=inputs.attention_mask,
max_new_tokens=30,
do_sample=False
)
print(tokenizer.decode(gen_ids[0], skip_special_tokens=True))