yangbang18 commited on
Commit
e4a2037
·
1 Parent(s): a719654

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md CHANGED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ - de
6
+ - fr
7
+ library_name: sentence-transformers
8
+ license: apache-2.0
9
+ ---
10
+
11
+ # ZeroNLG
12
+
13
+ Without any labeled downstream pairs for training, ZeroNLG is an unified framework that deals with multiple natural language generation (NLG) tasks in a zero-shot manner, including image-to-text, video-to-text, and text-to-text generation tasks across English, Chinese, German, and French.
14
+
15
+ Pre-trained data: a machine-translated version of [CC3M](https://huggingface.co/datasets/conceptual_captions), including
16
+ - 1.1M English sentences
17
+ - 1.1M English-Chinese pairs
18
+ - 1.1M English-German pairs
19
+ - 1.1M English-French pairs
20
+
21
+
22
+ Paper: [ZeroNLG: Aligning and Autoencoding Domains for Zero-Shot Multimodal and Multilingual Natural Language Generation](https://arxiv.org/abs/2303.06458)
23
+
24
+ Authors: *Bang Yang\*, Fenglin Liu\*, Yuexian Zou, Xian Wu, Yaowei Wang, David A. Clifton*
25
+
26
+
27
+
28
+ ## Quick Start
29
+ Please follow our [github repo](https://github.com/yangbang18/ZeroNLG) to prepare the environment at first.
30
+
31
+ ```python
32
+ from zeronlg import ZeroNLG
33
+
34
+ # Automatically download the model from Huggingface Hub
35
+ # Note: this model is especially pre-trained for machine translation
36
+ model = ZeroNLG('zeronlg-4langs-mt')
37
+
38
+ # Translating English into Chinese
39
+ # Note: the multilingual encoder is langauge-agnostic, so the `lang` below means the langauge to be generated
40
+ output = model.forward_translate(texts='a girl and a boy are playing', lang='zh', num_beams=3)
41
+ # output = "一 个 女 孩 和 一 个 男 孩 一 起 玩"
42
+ ```
43
+
44
+ ## Zero-Shot Performance
45
+ ### Machine translation
46
+ Model: [zeronlg-4langs-mt](https://huggingface.co/yangbang18/zeronlg-4langs-mt) only.
47
+
48
+ | En->Zh | En<-Zh | En->De | En<-De | En->Fr | En<-Fr | Zh->De | Zh<-De | Zh->Fr | Zh<-Fr | De->Fr | De<-Fr|
49
+ | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
50
+ 6.0|9.2|21.6|23.2|27.2|26.8|7.8|4.6|6.1|9.7|20.9|19.6
51
+
52
+
53
+ ## Citation
54
+ ```bibtex
55
+ @article{Yang2023ZeroNLG,
56
+ title={ZeroNLG: Aligning and Autoencoding Domains for Zero-Shot Multimodal and Multilingual Natural Language Generation},
57
+ author={Yang, Bang and Liu, Fenglin and Zou, Yuexian and Wu, Xian and Wang, Yaowei and Clifton, David A.},
58
+ journal={arXiv preprint arXiv:2303.06458}
59
+ year={2023}
60
+ }
61
+ ```