circulus / TinyHawk-v1

huggingface.co
Total runs: 8
24-hour runs: -1
7-day runs: 0
30-day runs: 3
Model's Last Updated: January 18 2024
image-text-to-text

Introduction of TinyHawk-v1

Model Details of TinyHawk-v1

WORK IN PROGRESS

We present TinyLLaVA, a small vision-language chatbot (1.4B) that reaches comparable performances with contemporary vision language models on common benchmarks, using less parameters. TinyLLaVA was trained by finetuning TinyLlama on the LLaVA-1.5 dataset, following the training recipe of LLaVA-1.5 . For more details, please refer to the LLaVA-1.5 paper .

Model Performance

We have evaluated TinyLLaVA on GQA , VizWiz , VQAv2 , TextVQA and SQA .

Model VQAv2 GQA SQA TextVQA VizWiz
TinyLLaVA-v1-1.4B 73.41 57.54 59.40 46.37 49.56
BLIP-2 41.00 41.00 61.00 42.50 19.60
LLaVA-v1.5-7B 78.50 62.00 66.80 61.3 50
LLaVA-v1.5-13B 80.00 63.30 71.60 61.3 53.6
Qwen-VL-7B 78.80 59.30 67.10 63.8 35.2
Qwen-VL-13B 78.20 57.50 68.20 61.5 38.9

More evaluations are ongoing.

Model Preparations
- Transformers Version

Make sure to have transformers >= 4.35.3 .

- Prompt Template

The model supports multi-image and multi-prompt generation. When using the model, make sure to follow the correct prompt template ( USER: <image>xxx\nASSISTANT: ), where <image> token is a place-holding special token for image embeddings.

Model Inference from pipeline and transformers
- Using pipeline :

Below we used "bczhou/tiny-llava-v1-hf" checkpoint.

from transformers import pipeline
from PIL import Image
import requests
model_id = "bczhou/tiny-llava-v1-hf"
pipe = pipeline("image-to-text", model=model_id)
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
image = Image.open(requests.get(url, stream=True).raw)
prompt = "USER: <image>\nWhat does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud\nASSISTANT:"
outputs = pipe(image, prompt=prompt, generate_kwargs={"max_new_tokens": 200})
print(outputs[0])
>>> {"generated_text': 'USER:  \nWhat does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud\nASSISTANT: The label 15 represents lava, which is a type of volcanic rock."}
- Using pure transformers :

Below is an example script to run generation in float16 precision on a GPU device:

import requests
from PIL import Image
import torch
from transformers import AutoProcessor, LlavaForConditionalGeneration
model_id = "bczhou/tiny-llava-v1-hf"
prompt = "USER: <image>\nWhat are these?\nASSISTANT:"
image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
model = LlavaForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
).to(0)
processor = AutoProcessor.from_pretrained(model_id)
raw_image = Image.open(requests.get(image_file, stream=True).raw)
inputs = processor(prompt, raw_image, return_tensors='pt').to(0, torch.float16)
output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
print(processor.decode(output[0][2:], skip_special_tokens=True))
Contact

This model was trained by Baichuan Zhou , from Beihang Univerisity, under the supervision of Prof. Lei Huang .

Runs of circulus TinyHawk-v1 on huggingface.co

8
Total runs
-1
24-hour runs
0
3-day runs
0
7-day runs
3
30-day runs

More Information About TinyHawk-v1 huggingface.co Model

More TinyHawk-v1 license Visit here:

https://choosealicense.com/licenses/mit

TinyHawk-v1 huggingface.co

TinyHawk-v1 huggingface.co is an AI model on huggingface.co that provides TinyHawk-v1's model effect (), which can be used instantly with this circulus TinyHawk-v1 model. huggingface.co supports a free trial of the TinyHawk-v1 model, and also provides paid use of the TinyHawk-v1. Support call TinyHawk-v1 model through api, including Node.js, Python, http.

TinyHawk-v1 huggingface.co Url

https://huggingface.co/circulus/TinyHawk-v1

circulus TinyHawk-v1 online free

TinyHawk-v1 huggingface.co is an online trial and call api platform, which integrates TinyHawk-v1's modeling effects, including api services, and provides a free online trial of TinyHawk-v1, you can try TinyHawk-v1 online for free by clicking the link below.

circulus TinyHawk-v1 online free url in huggingface.co:

https://huggingface.co/circulus/TinyHawk-v1

TinyHawk-v1 install

TinyHawk-v1 is an open source model from GitHub that offers a free installation service, and any user can find TinyHawk-v1 on GitHub to install. At the same time, huggingface.co provides the effect of TinyHawk-v1 install, users can directly use TinyHawk-v1 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

TinyHawk-v1 install url in huggingface.co:

https://huggingface.co/circulus/TinyHawk-v1

Url of TinyHawk-v1

TinyHawk-v1 huggingface.co Url

Provider of TinyHawk-v1 huggingface.co

circulus
ORGANIZATIONS

Other API from circulus

huggingface.co

Total runs: 42
Run Growth: -76
Growth Rate: -180.95%
Updated:March 19 2023
huggingface.co

Total runs: 22
Run Growth: 17
Growth Rate: 77.27%
Updated:November 21 2023
huggingface.co

Total runs: 16
Run Growth: 9
Growth Rate: 56.25%
Updated:February 27 2023
huggingface.co

Total runs: 14
Run Growth: 4
Growth Rate: 28.57%
Updated:March 17 2023
huggingface.co

Total runs: 12
Run Growth: 3
Growth Rate: 25.00%
Updated:March 17 2023