Views
No views yet
alpharomercoma/vqwen3-4b.LlavaForConditionalGeneration — no trust_remote_code.openai/clip-vit-large-patch14-336 — frozenLinear 1024→2560 → GELU → Linear 2560→2560) — trained (only delta)Qwen/Qwen3-4B — frozenLinear layers). Everything else is
loaded unchanged from its base checkpoint.liuhaotian/LLaVA-Pretrain — 558 K BLIP-captioned image–text
pairs from LAION/CC/SBU. Conversation format is plain (no chat template,
no system prompt): <image> on the human turn, caption on the assistant
turn, loss masked on the human side.| Global batch size | 256 |
| Learning rate | 1e-3, cosine, warmup ratio 0.03 |
| Weight decay | 0.0 |
| Epochs | 1 |
| Max sequence length | 2048 |
| Precision | bf16 |
1import torch
2from PIL import Image
3from transformers import LlavaForConditionalGeneration, AutoProcessor
4
5model_id = "alpharomercoma/vqwen3-4b-pretrain"
6model = LlavaForConditionalGeneration.from_pretrained(
7 model_id, dtype=torch.bfloat16, device_map="auto"
8).eval()
9processor = AutoProcessor.from_pretrained(model_id)
10
11image = Image.open("my_image.jpg").convert("RGB")
12messages = [{
13 "role": "user",
14 "content": [
15 {"type": "image"},
16 {"type": "text", "text": "Describe this image."},
17 ],
18}]
19prompt = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
20inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device)
21inputs["pixel_values"] = inputs["pixel_values"].to(torch.bfloat16)
22out = model.generate(**inputs, max_new_tokens=64, do_sample=False)
23print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))| Stage | Raw delta (Kaggle) | Bundled (HF) |
|---|---|---|
| Stage-1 alignment | vqwen-projector | this model |
| Stage-2 instruction | vqwen-lora | vqwen3-4b |
openai/clip-vit-large-patch14-336Qwen/Qwen3-4Bliuhaotian/LLaVA-Pretrain