forked from EvolvingLMMs-Lab/lmms-eval
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbagel.sh
More file actions
32 lines (29 loc) · 930 Bytes
/
bagel.sh
File metadata and controls
32 lines (29 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Bagel Model Evaluation Script
#
# This script demonstrates how to run lmms-eval with the Bagel multimodal model
# for text-to-image generation tasks.
#
# Prerequisites:
# 1. Clone Bagel repository at lmms-eval root:
# cd /path/to/lmms-eval
# git clone https://github.com/ByteDance-Seed/Bagel.git
#
# 2. Model weights can be anywhere (specify via MODEL_PATH below)
# Download from https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT
#
# Usage:
# bash examples/models/bagel.sh
# Set model path - should point to the model weights directory
# Can be absolute path or relative path
MODEL_PATH=$1
export GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY>
TASK=$2
# Run evaluation with BFloat16 (default, full precision)
accelerate launch -m lmms_eval \
--model bagel \
--model_args pretrained=${MODEL_PATH},mode=1 \
--tasks $TASK \
--batch_size 1 \
--log_samples \
--output_path ./logs/