File size: 2,760 Bytes
9352ecf 775629d 9352ecf be1efd4 775629d be1efd4 775629d 09ae06d 775629d 20a6a77 775629d |
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
---
library_name: clot
license: mit
datasets:
- zhongshsh/CLoT-Oogiri-GO
---
<p align="center">
<img src="logo.png" width="550" height="150">
</p>
## Creative Leap-of-Thought (CLoT)
This repository is the **checkpoint** of "Let's Think Outside the Box: Exploring Leap-of-Thought in Large Language Models with Creative Humor Generation" [[paper]](https://arxiv.org/abs/2312.02439).
## Introduction
To the best of our knowledge, we are the first to profoundly explore the Leap-of-Thought (LoT) ability in multimodal large language models (LLMs). This involves challenging LLMs to **think outside the box**, a non-sequential thinking skill equally crucial alongside popular sequential thinking abilities, such as Chain-of-Thought based methods. In this study, we delve into the LLM's LoT ability through the lens of a humor generation game called Oogiri (大喜利). The Oogiri game serves as an ideal platform for exploring the LLM's LoT ability, as it compels participants to think outside the box and provide unexpected and humorous responses to multimodal information (including I2T, T2T, and IT2T).
🤣👉**Click [[project page]](https://zhongshsh.github.io/CLoT/) for funny examples**👈.
## Quickstart 🤗
We provide a simple Chinese example for using CLoT with zero-shot inference. Specifically, we just need a few lines of code as shown below.
```python
from transformers import AutoTokenizer
from transformers.generation import GenerationConfig
from peft import AutoPeftModelForCausalLM
import torch
mpath = "zhongshsh/CLoT-cn"
tokenizer = AutoTokenizer.from_pretrained(mpath, trust_remote_code=True)
generation_config = GenerationConfig.from_pretrained(mpath, trust_remote_code=True)
model = AutoPeftModelForCausalLM.from_pretrained(
mpath,
device_map="cuda",
trust_remote_code=True
).eval()
query = tokenizer.from_list_format([
{'image': 'https://i.postimg.cc/Fz0bVzpm/test.png'},
{'text': '让我们打破常规思维思考问题。请仔细阅读图片,写出一个令人感到意外且搞笑的句子。'},
])
response, history = model.chat(tokenizer, query=query, history=None, generation_config=generation_config)
print(response)
```
## Notice
We strongly advise users against spreading or allowing others to spread the following content, including but not limited to hate speech, violence, pornography, and fraudulent materials.
## Citation
```
@misc{zhong2023clot,
title={Let's Think Outside the Box: Exploring Leap-of-Thought in Large Language Models with Creative Humor Generation},
author={Zhong, Shanshan and Huang, Zhongzhan and Gao, Shanghua and Wen, Weushao and Lin, Liang and Zitnik, Marinka and Zhou, Pan},
journal={arXiv preprint arXiv:2312.02439},
year={2023}
}
```
|