SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.11451 · EMNLP · 2022

Zero-shot Cross-lingual Transfer of Prompt-based Tuning with a Unified Multilingual Prompt

Furu Wei, Shuming Ma, Dongdong Zhang, Houfeng Wang, Lianzhe Huang

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 6 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
mojave-pku/uniprompt canonical 6 of 7
FunctionStatusWhere it lives
default_dev_objective Ran mojave-pku/uniprompt/src/trainer.py
code served (permissive licence) · get_code("1bf6d4ba3fc6988e")
finetune_metrics Ran mojave-pku/uniprompt/src/processors.py
code served (permissive licence) · get_code("779c63432e25c60e")
input_example_to_string Ran mojave-pku/uniprompt/src/dataset.py
code served (permissive licence) · get_code("e768e25ca95f70cd")
input_example_to_tuple Ran mojave-pku/uniprompt/src/dataset.py
code served (permissive licence) · get_code("fbef70dc7c700501")
paddings Ran mojave-pku/uniprompt/src/dataset.py
code served (permissive licence) · get_code("1766592e2b828d07")
text_classification_metrics Ran mojave-pku/uniprompt/src/processors.py
code served (permissive licence) · get_code("cc5d5197b945da2f")
update_state_dict_for_two_tower Not yet run mojave-pku/uniprompt/src/state_dict_transfer.py
code served (permissive licence) · get_code("eefb90eeed0654fe")

Repositories linked to this paper

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

Abstract

Prompt-based tuning has been proven effective for pretrained language models (PLMs). While most of the existing work focuses on the monolingual prompts, we study the multilingual prompts for multilingual PLMs, especially in the zero-shot cross-lingual setting. To alleviate the effort of designing different prompts for multiple languages, we propose a novel model that uses a unified prompt for all languages, called UniPrompt. Different from the discrete prompts and soft prompts, the unified prompt is model-based and languageagnostic. Specifically, the unified prompt is initialized by a multilingual PLM to produce language-independent representation, after which is fused with the text input. During inference, the prompts can be pre-computed so that no extra computation cost is needed. To collocate with the unified prompt, we propose a new initialization method for the target label word to further improve the model's transferability across languages. Extensive experiments show that our proposed methods can significantly outperform the strong baselines across different languages. We release data and code to facilitate future research 1 .

For agents

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

get_harvested_code_for_paper("2202.11451")
get_code_for_paper("2202.11451")
have("2202.11451")

Connect an agent — have() is free.