nxphi47 commited on
Commit
b3a3daf
1 Parent(s): 02bcec3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +171 -0
README.md CHANGED
@@ -2,4 +2,175 @@
2
  license: other
3
  license_name: seallms
4
  license_link: https://huggingface.co/SeaLLMs/SeaLLM-13B-Chat/blob/main/LICENSE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: other
3
  license_name: seallms
4
  license_link: https://huggingface.co/SeaLLMs/SeaLLM-13B-Chat/blob/main/LICENSE
5
+ language:
6
+ - en
7
+ - zh
8
+ - vi
9
+ - id
10
+ - th
11
+ - ms
12
+ - km
13
+ - lo
14
+ - my
15
+ - tl
16
+ tags:
17
+ - multilingual
18
+ - sea
19
  ---
20
+
21
+ <p align="center">
22
+ <img src="sealmmm.png" width="200" />
23
+ </p>
24
+
25
+ > SeaLLM will be able to "see"!
26
+
27
+ # *SeaMMM-7B* - Large Multilingual Multimodal Models for Southeast Asia
28
+
29
+
30
+ <p align="center">
31
+ <a href="https://damo-nlp-sg.github.io/SeaLLMs/" target="_blank" rel="noopener">Website</a>
32
+ &nbsp;&nbsp;
33
+ <a href="https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1" target="_blank" rel="noopener"> 🤗 Tech Memo</a>
34
+ &nbsp;&nbsp;
35
+ <a href="https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B" target="_blank" rel="noopener"> 🤗 DEMO</a>
36
+ &nbsp;&nbsp;
37
+ <a href="https://github.com/DAMO-NLP-SG/SeaLLMs" target="_blank" rel="noopener">Github</a>
38
+ &nbsp;&nbsp;
39
+ <a href="https://arxiv.org/pdf/2312.00738.pdf" target="_blank" rel="noopener">Technical Report</a>
40
+ </p>
41
+
42
+ <!-- 🔥<span style="color: #ff3860">[HOT]</span> SeaLLMs project now has a dedicated website - [damo-nlp-sg.github.io/SeaLLMs](https://damo-nlp-sg.github.io/SeaLLMs/) -->
43
+
44
+
45
+ We introduce and [showcase](https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B) the first iteration of [SeaLMMM](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1) -- A unified multilingual and multimodal that excel in both text-only and vision tasks in multiple languages spoken in Southeast Asia.
46
+
47
+ ### SeaLMMM-7B abilities
48
+ * SeaLMMM-7B is one of the strongest 7B vision-language models at **text-only tasks**, with performance similar to [SeaLLM-7B-v2](https://huggingface.co/SeaLLMs/SeaLLM-7B-v2). It is a text-first-vision-second model.
49
+ * SeaLMMM-7B **is** able to handle most SEA languages, making it more multilingual than En-only LLava, Bilingual (En+Zh) Qwen-VL or Yi-VL.
50
+ * Unlike LLava or specialized VLMs, which demand only one image at the begining, SeaLMMM-7B can seamlessly handle text-only conversations at the begining and visual instructions in the middle of the conversations and support topic and language switching.
51
+
52
+
53
+ ### Release and DEMO
54
+
55
+ - DEMO: [SeaLLMs/SeaLLM-7b](https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B).
56
+ - Model weights:
57
+ - [SeaLMMM-7B-v0.1](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1).
58
+ - Explore SeaLLMs:
59
+ - [SeaLLMs/SeaLLM-7B-v2.5](https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v2.5).
60
+ - [SeaLLMs/SeaLLM-7B-v2](https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v2).
61
+ - [SeaLLMs/SeaLLM-7B-v1](https://huggingface.co/spaces/SeaLLMs/SeaLLM-7B-v1).
62
+
63
+
64
+ <blockquote style="color:red">
65
+ <p><strong style="color: red">Terms of Use and License</strong>:
66
+ By using our released weights, codes, and demos, you agree to and comply with the terms and conditions specified in our <a href="https://huggingface.co/SeaLLMs/SeaLLM-Chat-13b/edit/main/LICENSE" target="_blank" rel="noopener">SeaLLMs Terms Of Use</a>.
67
+ </blockquote>
68
+
69
+ > **Disclaimer**:
70
+ > We must note that even though the weights, codes, and demos are released in an open manner, similar to other pre-trained language models, and despite our best efforts in red teaming and safety fine-tuning and enforcement, our models come with potential risks, including but not limited to inaccurate, misleading or potentially harmful generation.
71
+ > Developers and stakeholders should perform their own red teaming and provide related security measures before deployment, and they must abide by and comply with local governance and regulations.
72
+ > In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights, codes, or demos.
73
+
74
+ > The logo was generated by DALL-E 3.
75
+
76
+
77
+ ## Overview
78
+
79
+ SeaLMMM-7B-v0.1 is a multimodal extension of SeaLLM-7B-v2. It adopts the Llava-1.6 (Llava-NEXT) architecture. It is trained by jointly train SeaLLM's multilingual text-only datasets along with Llava-1.5 English-only vision data, as well as in-house synthetically generated multilingual multimodal vision data and open-source data, such as [ThaiIDCardSynt](https://huggingface.co/datasets/matichon/ThaiIDCardSynt).
80
+
81
+
82
+ ### English Vision QA Tasks
83
+
84
+ | Multimodal Models | VQA2 | GQA | Vizwiz | SQA-IMG | TextQA
85
+ | --- | --- | --- | --- | --- | --- |
86
+ | Qwen-VL-Chat | 78.20 | 57.50 | 38.90 | 68.20 | 61.50
87
+ | Llava-1.5-7b | 78.50 | 62.00 | 50.00 | 66.80 | 58.20
88
+ | Llava-1.5-13b | 80.00 | 63.30 | 53.60 | 71.60 | 61.30
89
+ | [SeaLMMM-7B-v0.1](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1) | ? | 61.58 | 58.00 | 71.79 | 63.47
90
+
91
+ ### Multilingual Text-only World Knowledge
92
+
93
+ We evaluate models on 3 benchmarks following the recommended default setups: 5-shot MMLU for En, 3-shot [M3Exam](https://arxiv.org/pdf/2306.05179.pdf) (M3e) for En, Zh, Vi, Id, Th, and zero-shot [VMLU](https://vmlu.ai/) for Vi.
94
+
95
+ On text-only benchmarks, [SeaLMMM-7B-v0.1](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1) is generally on-par with [SeaLLM-7B-v2](https://huggingface.co/SeaLLMs/SeaLLM-7B-v2) - its base LLM model. This demonstrates that our multimodal training regime does not vastly degrade text-only performance.
96
+
97
+ | Model | Langs | En<br>MMLU | En<br>M3e | Zh<br>M3e | Vi<br>M3e | Id<br>M3e | Th<br>M3e
98
+ |-----| ----- | --- | -- | ----- | ---- | --- | --- |
99
+ | GPT-3.5 | Multi | 68.90 | 75.46 | 60.20 | 58.64 | 49.27 | 37.41
100
+ | Vistral-7B-chat | Mono | 56.86 | 67.00 | 44.56 | 54.33 | 36.49 | 25.27
101
+ | Qwen1.5-7B-chat | Multi | 61.00 | 52.07 | 81.96 | 43.38 | 24.29 | 20.25
102
+ | SailorLM | Multi | 52.72 | 59.76 | 67.74 | 50.14 | 39.53 | 37.73
103
+ | SeaLLM-7B-v2 | Multi | 61.89 | 70.91 | 55.43 | 51.15 | 42.25 | 35.52
104
+ | SeaLLM-7B-v2.5 | Multi | 64.05 | 76.87 | 62.54 | 63.11 | 48.64 | 46.86
105
+ | ---
106
+ | [SeaLMMM-7B-v0.1](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1) | Multi | 60.31 | 70.43 | 52.78 | 50.47 | 42.37 | 33.53
107
+
108
+
109
+
110
+ ## Multilingual Multimodal Showcases
111
+
112
+ [SeaLMMM-7B-v0.1](https://huggingface.co/SeaLLMs/SeaLMMM-7B-v0.1) has better vision understanding and solving abilities in languages beyond English and Chinese, especially SEA languages, such as Vietnamese and Indonesian.
113
+
114
+ ![two_cat.png](two_cat.png)
115
+
116
+ Image: find "x" in Vietnamese. Left: Llava-1.6-34B. Right: SeaLMMM-7B-v0.1.
117
+ <div class="row" style="display: flex; clear: both;">
118
+ <img src="llava_1.6_34b_find_x_vi.png" alt="Forest" style="float: left; width: 39%">
119
+ <img src="find_x_vi.png" alt="Snow" style="float: left; width: 59%">
120
+ </div>
121
+
122
+
123
+ ### Limitations
124
+ * Despite being multilingual, SeaLMMM-7B-v0.1 multi-modal capabilities still work best in English, while we're working to improve it in other languages.
125
+ * For OCR, it can only read English.
126
+ * SeaLMMM-7B-v0.1 sometimes still think it cannot process image in multi-turn setting, due to existing text-only SFT, future versions fill fix this.
127
+ * Multi-modal multi-turn capabilities are still limited.
128
+
129
+
130
+ ### Usage
131
+
132
+ #### Instruction format
133
+
134
+ **Unlike others, image token is `<|image|>`**
135
+
136
+ ```python
137
+ prompt = """<|im_start|>system
138
+ You are a helpful assistant.</s>
139
+ <|im_start|>user
140
+ <|image|>
141
+ What is in the image?</s>
142
+ <|im_start|>assistant
143
+ There is 2 cats in the image.</s>"""
144
+
145
+ # <|im_start|> is not a special token.
146
+ # Transformers chat_template should be consistent with vLLM format below.
147
+
148
+ # ! ENSURE 1 and only 1 bos `<s>` at the beginning of sequence
149
+ print(tokenizer.convert_ids_to_tokens(tokenizer.encode(prompt)))
150
+
151
+ """
152
+ ```
153
+
154
+ ## Acknowledgement to Our Linguists
155
+
156
+ We would like to express our special thanks to our professional and native linguists, Tantong Champaiboon, Nguyen Ngoc Yen Nhi and Tara Devina Putri, who helped build, evaluate, and fact-check our sampled pretraining and SFT dataset as well as evaluating our models across different aspects, especially safety.
157
+
158
+ ## Citation
159
+
160
+ If you find our project useful, we hope you would kindly star our repo and cite our work as follows: Corresponding Author: [[email protected]](mailto:[email protected])
161
+
162
+ **Author list and order will change!**
163
+
164
+ * `*` and `^` are equal contributions.
165
+
166
+ ```
167
+ @article{damonlpsg2023seallm,
168
+ author = {Xuan-Phi Nguyen*, Wenxuan Zhang*, Xin Li*, Mahani Aljunied*, Weiwen Xu, Hou Pong Chan,
169
+ Zhiqiang Hu, Chenhui Shen^, Yew Ken Chia^, Xingxuan Li, Jianyu Wang,
170
+ Qingyu Tan, Liying Cheng, Guanzheng Chen, Yue Deng, Sen Yang,
171
+ Chaoqun Liu, Hang Zhang, Lidong Bing},
172
+ title = {SeaLLMs - Large Language Models for Southeast Asia},
173
+ year = 2023,
174
+ Eprint = {arXiv:2312.00738},
175
+ }
176
+ ```