Update README.md
Browse filesupgraded vision tower to siglip2
README.md
CHANGED
|
@@ -11,54 +11,42 @@ pipeline_tag: visual-question-answering
|
|
| 11 |
license: apache-2.0
|
| 12 |
base_model:
|
| 13 |
- keeeeenw/MicroLlama
|
| 14 |
-
- google/siglip-so400m-patch14-384
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# MicroLLaVA
|
| 18 |
|
| 19 |
A compact vision language model that you can pretrain and finetune on a single consumer GPU.
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
| Item | Detail |
|
| 24 |
|-----------------|--------|
|
| 25 |
| Framework | Transformers + PyTorch |
|
| 26 |
| Checkpoint type | `safetensors` |
|
| 27 |
| LLM | [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) (about 300M parameters) |
|
| 28 |
-
| Vision tower | [`siglip-so400m-patch14-384`](https://huggingface.co/google/
|
| 29 |
| Hardware used | Single NVIDIA RTX 4090 |
|
| 30 |
| Training stack | No DeepSpeed required |
|
| 31 |
| Intended tasks | Visual Question Answering, caption-style prompts |
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
-
## Introduction
|
| 36 |
|
| 37 |
MicroLLaVA is a [TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory) based model that pairs a very small language model [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) with an efficient SigLIP vision encoder.
|
| 38 |
The goal is to create a vision language model that almost anyone can train and iterate on with one consumer GPU.
|
| 39 |
|
| 40 |
- **Language model**: [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) with ~300M parameters
|
| 41 |
-
- **Vision encoder**: [`
|
| 42 |
- **Training codebase**: [TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory) with additional changes in my fork: [Custom fork with training tweaks](https://github.com/keeeeenw/TinyLLaVA_Factory)
|
| 43 |
|
| 44 |
-
---
|
| 45 |
-
|
| 46 |
-
## Files included
|
| 47 |
-
|
| 48 |
-
| File | Purpose |
|
| 49 |
-
|----------------------------|---------|
|
| 50 |
-
| `config.json` | Model configuration for Transformers |
|
| 51 |
-
| `generation_config.json` | Generation defaults |
|
| 52 |
-
| `model.safetensors` | Weights |
|
| 53 |
-
| `tokenizer.model` | SentencePiece model |
|
| 54 |
-
| `tokenizer_config.json` | Tokenizer configuration |
|
| 55 |
-
| `special_tokens_map.json` | Special token mapping |
|
| 56 |
-
| `trainer_state.json` | Trainer state |
|
| 57 |
-
| `training_args.bin` | Training arguments |
|
| 58 |
-
| `log.txt` | Training log |
|
| 59 |
-
|
| 60 |
-
If your workflow uses a custom processor, also include `preprocessor_config.json` or `processor_config.json` so `AutoProcessor.from_pretrained` works.
|
| 61 |
-
|
| 62 |
Because of its compact size, this model can be trained entirely on a single NVIDIA RTX 4090 without DeepSpeed.
|
| 63 |
|
| 64 |
Pretraining on **LAION-CC-SBU-558K** took about **5 hours** on a single NVIDIA RTX 4090 without DeepSpeed.
|
|
@@ -73,7 +61,7 @@ Supervised finetuning on all datasets from the TinyLLaVA Factory guide (except `
|
|
| 73 |
from transformers import AutoTokenizer, AutoProcessor, AutoModelForCausalLM
|
| 74 |
import torch
|
| 75 |
|
| 76 |
-
repo_id = "keeeeenw/MicroLlava
|
| 77 |
|
| 78 |
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 79 |
|
|
@@ -97,10 +85,29 @@ print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
|
|
| 97 |
|
| 98 |
## Evaluation
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
-
|
| 103 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
Community contributions with benchmark results are welcome and encouraged.
|
| 106 |
|
|
@@ -141,7 +148,7 @@ To reproduce results and training runs:
|
|
| 141 |
title = {MicroLLaVA: a TinyLLaVA based VLM with MicroLlama 300M for single GPU training},
|
| 142 |
author = {Zixiao Ken Wang},
|
| 143 |
year = {2025},
|
| 144 |
-
url = {https://huggingface.co/keeeeenw/MicroLlava
|
| 145 |
}
|
| 146 |
```
|
| 147 |
|
|
@@ -162,7 +169,6 @@ This work builds upon the efforts of many in the open-source AI community:
|
|
| 162 |
|
| 163 |
- **[TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory)** maintainers and contributors for creating the training framework
|
| 164 |
- **[`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama)** I am also the creator of MicroLlama. Please help support my work!
|
| 165 |
-
- **
|
| 166 |
- Contributors to **LAION-CC-SBU-558K** and other datasets used in pretraining and finetuning
|
| 167 |
-
- The Hugging Face ecosystem for hosting, tools, and community support
|
| 168 |
-
|
|
|
|
| 11 |
license: apache-2.0
|
| 12 |
base_model:
|
| 13 |
- keeeeenw/MicroLlama
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# MicroLLaVA
|
| 17 |
|
| 18 |
A compact vision language model that you can pretrain and finetune on a single consumer GPU.
|
| 19 |
|
| 20 |
+
|
| 21 |
+
## 📰 News and Updates
|
| 22 |
+
|
| 23 |
+
* 08/17/2025: this hugging face repo is renamed to https://huggingface.co/keeeeenw/MicroLlava.
|
| 24 |
+
* 08/17/2025: improved **VQAv2** average dev-test score from **44.01%** to **56.91%** by upgrading the vision tower from SigLip to SigLip2.
|
| 25 |
+
* 08/09/2025: initial version of MicroLlava released
|
| 26 |
+
|
| 27 |
+
## 🚀 TLDR
|
| 28 |
|
| 29 |
| Item | Detail |
|
| 30 |
|-----------------|--------|
|
| 31 |
| Framework | Transformers + PyTorch |
|
| 32 |
| Checkpoint type | `safetensors` |
|
| 33 |
| LLM | [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) (about 300M parameters) |
|
| 34 |
+
| Vision tower | [`siglip-so400m-patch14-384`](https://huggingface.co/google/siglip2-so400m-patch14-384) |
|
| 35 |
| Hardware used | Single NVIDIA RTX 4090 |
|
| 36 |
| Training stack | No DeepSpeed required |
|
| 37 |
| Intended tasks | Visual Question Answering, caption-style prompts |
|
| 38 |
|
| 39 |
---
|
| 40 |
|
| 41 |
+
## 📋 Introduction
|
| 42 |
|
| 43 |
MicroLLaVA is a [TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory) based model that pairs a very small language model [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) with an efficient SigLIP vision encoder.
|
| 44 |
The goal is to create a vision language model that almost anyone can train and iterate on with one consumer GPU.
|
| 45 |
|
| 46 |
- **Language model**: [`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama) with ~300M parameters
|
| 47 |
+
- **Vision encoder**: [`siglip2-so400m-patch14-384`](https://huggingface.co/google/siglip2-so400m-patch14-384)
|
| 48 |
- **Training codebase**: [TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory) with additional changes in my fork: [Custom fork with training tweaks](https://github.com/keeeeenw/TinyLLaVA_Factory)
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
Because of its compact size, this model can be trained entirely on a single NVIDIA RTX 4090 without DeepSpeed.
|
| 51 |
|
| 52 |
Pretraining on **LAION-CC-SBU-558K** took about **5 hours** on a single NVIDIA RTX 4090 without DeepSpeed.
|
|
|
|
| 61 |
from transformers import AutoTokenizer, AutoProcessor, AutoModelForCausalLM
|
| 62 |
import torch
|
| 63 |
|
| 64 |
+
repo_id = "keeeeenw/MicroLlava"
|
| 65 |
|
| 66 |
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 67 |
|
|
|
|
| 85 |
|
| 86 |
## Evaluation
|
| 87 |
|
| 88 |
+
### VQAv2 Evaluation Results (MicroLlama 300M + Siglip2-so400m-patch4-384)
|
| 89 |
+
|
| 90 |
+
| Question Type | Accuracy |
|
| 91 |
+
|---------------|----------|
|
| 92 |
+
| Yes/No | 72.32% |
|
| 93 |
+
| Number | 43.89% |
|
| 94 |
+
| Other | 46.65% |
|
| 95 |
+
| **Overall** | **56.91%** |
|
| 96 |
+
|
| 97 |
+
*Evaluated on VQAv2 test-dev split*
|
| 98 |
+
|
| 99 |
+
### (Previous version) VQAv2 Evaluation Results (MicroLlama 300M + Siglip-so400m-patch4-384)
|
| 100 |
|
| 101 |
+
| Question Type | Accuracy |
|
| 102 |
+
|---------------|----------|
|
| 103 |
+
| Yes/No | 65.08% |
|
| 104 |
+
| Number | 28.97% |
|
| 105 |
+
| Other | 29.32% |
|
| 106 |
+
| **Overall** | **44.01%** |
|
| 107 |
+
|
| 108 |
+
*Evaluated on VQAv2 test-dev split*
|
| 109 |
+
|
| 110 |
+
More evaluation results will be added in the coming days.
|
| 111 |
|
| 112 |
Community contributions with benchmark results are welcome and encouraged.
|
| 113 |
|
|
|
|
| 148 |
title = {MicroLLaVA: a TinyLLaVA based VLM with MicroLlama 300M for single GPU training},
|
| 149 |
author = {Zixiao Ken Wang},
|
| 150 |
year = {2025},
|
| 151 |
+
url = {https://huggingface.co/keeeeenw/MicroLlava}
|
| 152 |
}
|
| 153 |
```
|
| 154 |
|
|
|
|
| 169 |
|
| 170 |
- **[TinyLLaVA Factory](https://github.com/TinyLLaVA/TinyLLaVA_Factory)** maintainers and contributors for creating the training framework
|
| 171 |
- **[`keeeeenw/MicroLlama`](https://huggingface.co/keeeeenw/MicroLlama)** I am also the creator of MicroLlama. Please help support my work!
|
| 172 |
+
- **SigLIP2** authors for the efficient vision encoder architecture
|
| 173 |
- Contributors to **LAION-CC-SBU-558K** and other datasets used in pretraining and finetuning
|
| 174 |
+
- The Hugging Face ecosystem for hosting, tools, and community support
|
|
|