cpu4dream/llava-small-OpenELM-AIMv2-0.6B-auto
By cpu4dream · ↓ 6 · ♥ 0 · Updated 2024-12-20
What's in this repo
This page lists the files in cpu4dream/llava-small-OpenELM-AIMv2-0.6B-auto, including decoder_model_merged.onnx, decoder_model_merged_bnb4.onnx, decoder_model_merged_fp16.onnx and more.
- 24 ONNX models (.onnx files)
- 34 files, including 24 .onnx, 4 .json, 2 .py, 1 .md, 1 .safetensors, 1 .model
- Last updated 2024-12-20
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/decoder_model_merged.onnx | — | Download |
| onnx/decoder_model_merged_bnb4.onnx | — | Download |
| onnx/decoder_model_merged_fp16.onnx | — | Download |
| onnx/decoder_model_merged_int8.onnx | — | Download |
| onnx/decoder_model_merged_q4.onnx | — | Download |
| onnx/decoder_model_merged_q4f16.onnx | — | Download |
| onnx/decoder_model_merged_quantized.onnx | — | Download |
| onnx/decoder_model_merged_uint8.onnx | — | Download |
| onnx/embed_tokens.onnx | — | Download |
| onnx/embed_tokens_bnb4.onnx | — | Download |
Showing 10 of 24 .onnx files — see the full file list on the right.
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
**Tiny Llava 4 CPU 🐛
**
🚀 Model Overview
tiny-llava-open-elm-aimv2 is a lightweight image-text-to-text model that combines OpenELM 270M - INSTRUCT as the LLM backbone and AIMv2-Large-Patch14-224-distilled (309M) as the vision encoder. The model has been fine-tuned using LoRA (Low-Rank Adaptation) for efficient training. It was developed using the TinyLLaVA Factory codebase, which provides a modular framework for lightweight multi-modal models.
The model is designed to run efficiently on CPU, making it ideal for resource-constrained environments. It is trained and evaluated on POPE and TextVQA benchmarks. The total model size is 0.6B parameters.
Usage
Execute the following test code:
from transformers import AutoTokenizer, AutoModelForCausalLM
hf_path = 'cpu4dream/llava-small-OpenELM-AIMv2-0.6B-auto'
model = AutoModelForCausalLM.from_pretrained(hf_path, trust_remote_code=True)
model.cuda()
config = model.config
tokenizer = AutoTokenizer.from_pretrained(hf_path, use_fast=False, model_max_length = config.tokenizer_model_max_length,padding_side = config.tokenizer_padding_side)
prompt="What are these?"
image_url="http://images.cocodataset.org/test-stuff2017/000000000001.jpg"
output_text, genertaion_time = model.chat(prompt=prompt, image=image_url, tokenizer=tokenizer)
print('model output:', output_text)
print('runing time:', genertaion_time)
📊 Performance
| Model Name | VQAv2 | GQA | SQA | TextVQA | MM-VET | POPE | MME | MMMU |
|---|---|---|---|---|---|---|---|---|
| LLaVA-1.5-7B | 78.5 | 62.0 | 66.8 | 58.2 | 30.5 | 85.9 | 1510.7 | - |
| bczhou/TinyLLaVA-3.1B | 79.9 | 62.0 | 69.1 | 59.1 | 32.0 | 86.4 | 1464.9 | - |
| tinyllava/TinyLLaVA-Gemma-SigLIP-2.4B | 78.4 | 61.6 | 64.4 | 53.6 | 26.9 | 86.4 | 1339.0 | 31.7 |
| tinyllava/TinyLLaVA-Phi-2-SigLIP-3.1B | 80.1 | 62.1 | 73.0 | 60.3 | 37.5 | 87.2 | 1466.4 | 38.4 |
| cpu4dream/llava-small-OpenELM-AIMv2-0.6B | - | - | - | 39.68 | - | 83.93 | - | - |
🔗 References
Model info
Created: 2024-12-18
Updated: 2024-12-20
View on Hugging FaceFiles (34)
Related models
More from cpu4dream
No other models by this author.