BAAI / Bunny-v1_0-3B

huggingface.co
Total runs: 2.0K
24-hour runs: -33
7-day runs: 133
30-day runs: -188
Model's Last Updated: November 28 2024
text-generation

Introduction of Bunny-v1_0-3B

Model Details of Bunny-v1_0-3B

Model Card

Logo

📖 Technical report | 🏠 Code | 🐰 Demo

This is the merged weights of bunny-phi-2-siglip-lora .

Bunny is a family of lightweight but powerful multimodal models. It offers multiple plug-and-play vision encoders, like EVA-CLIP, SigLIP and language backbones, including Llama-3-8B, Phi-1.5, StableLM-2, Qwen1.5, MiniCPM and Phi-2. To compensate for the decrease in model size, we construct more informative training data by curated selection from a broader data source. Remarkably, our Bunny-v1.0-3B model built upon SigLIP and Phi-2 outperforms the state-of-the-art MLLMs, not only in comparison with models of similar size but also against larger MLLM frameworks (7B), and even achieves performance on par with 13B models.

The model is pretrained on LAION-2M and finetuned on Bunny-695K. More details about this model can be found in GitHub .

comparison

Quickstart

Here we show a code snippet to show you how to use the model with transformers.

Before running the snippet, you need to install the following dependencies:

pip install torch transformers accelerate pillow

If the CUDA memory is enough, it would be faster to execute this snippet by setting CUDA_VISIBLE_DEVICES=0 .

Users especially those in Chinese mainland may want to refer to a HuggingFace mirror site .

import torch
import transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
from PIL import Image
import warnings

# disable some warnings
transformers.logging.set_verbosity_error()
transformers.logging.disable_progress_bar()
warnings.filterwarnings('ignore')

# set device
device = 'cuda'  # or cpu
torch.set_default_device(device)

# create model
model = AutoModelForCausalLM.from_pretrained(
    'BAAI/Bunny-v1_0-3B',
    torch_dtype=torch.float16, # float32 for cpu
    device_map='auto',
    trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(
    'BAAI/Bunny-v1_0-3B',
    trust_remote_code=True)

# text prompt
prompt = 'Why is the image funny?'
text = f"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\n{prompt} ASSISTANT:"
text_chunks = [tokenizer(chunk).input_ids for chunk in text.split('<image>')]
input_ids = torch.tensor(text_chunks[0] + [-200] + text_chunks[1], dtype=torch.long).unsqueeze(0).to(device)

# image, sample images can be found in images folder
image = Image.open('example_2.png')
image_tensor = model.process_images([image], model.config).to(dtype=model.dtype, device=device)

# generate
output_ids = model.generate(
    input_ids,
    images=image_tensor,
    max_new_tokens=100,
    use_cache=True
    repetition_penalty=1.0 # increase this to avoid chattering
)[0]

print(tokenizer.decode(output_ids[input_ids.shape[1]:], skip_special_tokens=True).strip())

License

This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses. The content of this project itself is licensed under the Apache license 2.0.

Runs of BAAI Bunny-v1_0-3B on huggingface.co

2.0K
Total runs
-33
24-hour runs
-78
3-day runs
133
7-day runs
-188
30-day runs

More Information About Bunny-v1_0-3B huggingface.co Model

More Bunny-v1_0-3B license Visit here:

https://choosealicense.com/licenses/apache-2.0

Bunny-v1_0-3B huggingface.co

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

Bunny-v1_0-3B huggingface.co Url

https://huggingface.co/BAAI/Bunny-v1_0-3B

BAAI Bunny-v1_0-3B online free

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

BAAI Bunny-v1_0-3B online free url in huggingface.co:

https://huggingface.co/BAAI/Bunny-v1_0-3B

Bunny-v1_0-3B install

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

Bunny-v1_0-3B install url in huggingface.co:

https://huggingface.co/BAAI/Bunny-v1_0-3B

Url of Bunny-v1_0-3B

Bunny-v1_0-3B huggingface.co Url

Provider of Bunny-v1_0-3B huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 5.9M
Run Growth: 628.0K
Growth Rate: 10.69%
Updated: February 22 2024
huggingface.co

Total runs: 2.3M
Run Growth: -1.8M
Growth Rate: -75.18%
Updated: February 21 2024
huggingface.co

Total runs: 2.2M
Run Growth: -79.5K
Growth Rate: -3.66%
Updated: July 03 2024
huggingface.co

Total runs: 1.6M
Run Growth: -512.9K
Growth Rate: -31.42%
Updated: February 21 2024
huggingface.co

Total runs: 983.7K
Run Growth: 160.9K
Growth Rate: 16.95%
Updated: April 02 2024
huggingface.co

Total runs: 798.7K
Run Growth: 153.9K
Growth Rate: 19.41%
Updated: December 13 2023
huggingface.co

Total runs: 449.0K
Run Growth: -4.2K
Growth Rate: -0.94%
Updated: October 12 2023
huggingface.co

Total runs: 197.8K
Run Growth: 21.7K
Growth Rate: 10.99%
Updated: November 14 2023
huggingface.co

Total runs: 138.8K
Run Growth: 74.2K
Growth Rate: 53.10%
Updated: October 12 2023
huggingface.co

Total runs: 41.3K
Run Growth: -38.0K
Growth Rate: -106.96%
Updated: April 17 2024
huggingface.co

Total runs: 33.6K
Run Growth: 32.3K
Growth Rate: 96.05%
Updated: October 12 2023
huggingface.co

Total runs: 28.4K
Run Growth: 11.5K
Growth Rate: 40.34%
Updated: October 12 2023
huggingface.co

Total runs: 19.9K
Run Growth: -15.4K
Growth Rate: -74.67%
Updated: January 15 2025
huggingface.co

Total runs: 6.0K
Run Growth: 2.4K
Growth Rate: 37.66%
Updated: December 26 2022
huggingface.co

Total runs: 5.0K
Run Growth: 899
Growth Rate: 18.62%
Updated: September 21 2023
huggingface.co

Total runs: 4.9K
Run Growth: 148
Growth Rate: 3.08%
Updated: August 15 2024
huggingface.co

Total runs: 4.0K
Run Growth: -12.2K
Growth Rate: -313.51%
Updated: February 22 2024
huggingface.co

Total runs: 2.9K
Run Growth: -305
Growth Rate: -10.51%
Updated: October 12 2023
huggingface.co

Total runs: 2.7K
Run Growth: -11.8K
Growth Rate: -272.27%
Updated: October 23 2024
huggingface.co

Total runs: 2.6K
Run Growth: 1.9K
Growth Rate: 73.04%
Updated: September 18 2023
huggingface.co

Total runs: 2.4K
Run Growth: 520
Growth Rate: 22.33%
Updated: August 15 2024
huggingface.co

Total runs: 2.4K
Run Growth: 380
Growth Rate: 17.87%
Updated: February 07 2024
huggingface.co

Total runs: 1.5K
Run Growth: -3.5K
Growth Rate: -136.57%
Updated: October 23 2024
huggingface.co

Total runs: 1.4K
Run Growth: -3.0K
Growth Rate: -174.67%
Updated: October 24 2024
huggingface.co

Total runs: 824
Run Growth: 260
Growth Rate: 30.48%
Updated: June 07 2024
huggingface.co

Total runs: 656
Run Growth: -9.9K
Growth Rate: -1869.68%
Updated: March 07 2024
huggingface.co

Total runs: 586
Run Growth: 14
Growth Rate: 2.48%
Updated: October 27 2023
huggingface.co

Total runs: 502
Run Growth: 0
Growth Rate: 0.00%
Updated: January 15 2025
huggingface.co

Total runs: 462
Run Growth: 129
Growth Rate: 29.05%
Updated: April 02 2024
huggingface.co

Total runs: 426
Run Growth: 0
Growth Rate: 0.00%
Updated: January 14 2025
huggingface.co

Total runs: 296
Run Growth: 288
Growth Rate: 97.30%
Updated: April 18 2023
huggingface.co

Total runs: 217
Run Growth: -48
Growth Rate: -22.43%
Updated: October 29 2023
huggingface.co

Total runs: 194
Run Growth: 75
Growth Rate: 36.23%
Updated: June 24 2024
huggingface.co

Total runs: 143
Run Growth: -239
Growth Rate: -147.53%
Updated: August 15 2024
huggingface.co

Total runs: 114
Run Growth: 0
Growth Rate: 0.00%
Updated: January 20 2025
huggingface.co

Total runs: 102
Run Growth: 38
Growth Rate: 36.89%
Updated: December 21 2023
huggingface.co

Total runs: 94
Run Growth: 50
Growth Rate: 53.19%
Updated: August 23 2023
huggingface.co

Total runs: 91
Run Growth: 58
Growth Rate: 63.74%
Updated: August 15 2024
huggingface.co

Total runs: 68
Run Growth: -276
Growth Rate: -394.29%
Updated: June 21 2024
huggingface.co

Total runs: 65
Run Growth: 0
Growth Rate: 0.00%
Updated: January 01 2025
huggingface.co

Total runs: 49
Run Growth: -22
Growth Rate: -44.90%
Updated: October 27 2023
huggingface.co

Total runs: 49
Run Growth: -57
Growth Rate: -114.00%
Updated: December 21 2023
huggingface.co

Total runs: 47
Run Growth: -10.2K
Growth Rate: -21691.49%
Updated: February 07 2024
huggingface.co

Total runs: 42
Run Growth: -10
Growth Rate: -23.81%
Updated: August 15 2024
huggingface.co

Total runs: 41
Run Growth: 9
Growth Rate: 21.95%
Updated: August 28 2024
huggingface.co

Total runs: 40
Run Growth: -261
Growth Rate: -606.98%
Updated: June 24 2024
huggingface.co

Total runs: 31
Run Growth: -171
Growth Rate: -551.61%
Updated: April 19 2024
huggingface.co

Total runs: 27
Run Growth: 15
Growth Rate: 53.57%
Updated: July 24 2023
huggingface.co

Total runs: 20
Run Growth: -57
Growth Rate: -271.43%
Updated: December 31 2022
huggingface.co

Total runs: 19
Run Growth: -103
Growth Rate: -490.48%
Updated: May 13 2024
huggingface.co

Total runs: 17
Run Growth: -20
Growth Rate: -111.11%
Updated: July 02 2024
huggingface.co

Total runs: 16
Run Growth: -15
Growth Rate: -88.24%
Updated: December 25 2023