SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.06154 · 2024

GLOV: Guided Large Language Models as Implicit Optimizers for Vision Language Models

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
jmiemirza/glov canonical 4 of 7
FunctionStatusWhere it lives
repeat_kv Ran jmiemirza/glov/modeling_llama.py
pointer only (licence: NONE) · get_code("3c76e52815c5401d")
apply_rotary_pos_emb Ran jmiemirza/glov/modeling_llama.py
pointer only (licence: NONE) · get_code("583539efd6fd01fb")
int_list Ran jmiemirza/glov/args.py
pointer only (licence: NONE) · get_code("8d2a92006fbcd4fd")
rotate_half Ran jmiemirza/glov/modeling_llama.py
pointer only (licence: NONE) · get_code("e03d53ba9d4f9ae5")
build_model Not yet run jmiemirza/glov/clip/model.py
pointer only (licence: NONE) · get_code("d281a065f71841a7")
initialize_writer Not yet run jmiemirza/glov/main_clip.py
pointer only (licence: NONE) · get_code("ff2f02822f67b220")
initialize_writer Not yet run jmiemirza/glov/main_llava.py
pointer only (licence: NONE) · get_code("dff682bcaf658f79")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In this work, we propose GLOV, which enables Large Language Models (LLMs) to act as implicit optimizers for Vision-Language Models (VLMs) to enhance downstream vision tasks. GLOV prompts an LLM with the downstream task description, querying it for suitable VLM prompts (e.g., for zero-shot classification with CLIP). These prompts are ranked according to their fitness for the downstream vision task. In each respective optimization step, the ranked prompts are fed as in-context examples (with their accuracies) to equip the LLM with the knowledge of the type of prompts preferred by the downstream VLM. Furthermore, we explicitly guide the LLM's generation at each optimization step by adding an offset vector -- calculated from the embedding differences between previous positive and negative solutions -- to the intermediate layer of the network for the next generation. This offset vector biases the LLM generation toward the type of language the downstream VLM prefers, resulting in enhanced performance on the downstream vision tasks. We comprehensively evaluate our GLOV on two tasks: object recognition and the critical task of enhancing VLM safety. Our GLOV shows performance improvement by up to 15.0% and 57.5% for dual-encoder (e.g., CLIP) and encoder-decoder (e.g., LlaVA) models for object recognition and reduces the attack success rate (ASR) on state-of-the-art VLMs by up to $60.7\%$.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.06154")
get_code_for_paper("2410.06154")
have("2410.06154")

Connect an agent — have() is free.