Experiments With Meta's SeamlessM4T Open Machine Translation Model: Government Publication Translations

Yesterday, Meta announced its new SeamlessM4T multimodal translation model. Let's run a quick simple benchmark of its textual Chinese to English translation accuracy by testing it on a selection of Chinese government publication passages with gold standard human translations and NMT translations via Google Translate. Immediately clear is that it must translate sentence-by-sentence. Attempting to translate multiple sentences at once yields semantic collapse, with heavy truncation and various failure states. Translating a sentence at a time yields results that closely match the human and NMT translations in most cases, though many sentences are more stilted and in at least one case the model enters a failure state.

Let's start by creating a brand-new GCE VM with 4 N1 cores and 26GB of RAM and an Nvidia V100 GPU. We'll use the "Deep Learning VM for TensorFlow 2.11 with CUDA 11.3 M110" image, running Debian 11, Python 3.10, TF 2.11 for CUDA 11.3 and Intel MKL-DNN installed.

Let's verify that the NVidia driver installed on startup and manually install as needed:

#lspci | grep -i nvidia
00:04.0 3D controller: NVIDIA Corporation GV100GL [Tesla V100 SXM2 16GB] (rev a1)
#nvidia-smi -l 2

#if driver or nvidia-smi not found, reinstall:
/opt/deeplearning/install-driver.sh
#if that fails, manually install:
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/535.104.05/NVIDIA-Linux-x86_64-535.104.05.run
chmod 755 NVIDIA-Linux-x86_64-535.104.05.run
./NVIDIA-Linux-x86_64-535.104.05.run

 

Following the installation instructions, we'll install it:

mkdir /FACEBOOK_SEAMLESSM4T/
cd /FACEBOOK_SEAMLESSM4T/
git clone https://github.com/facebookresearch/seamless_communication
cd seamless_communication
pip install .
conda install -y -c conda-forge libsndfile

#fix a bug whereby the model files aren't copied properly...
cp /FACEBOOK_SEAMLESSM4T/seamless_communication/src/seamless_communication/assets/cards/* /opt/conda/lib/python3.10/site-packages/seamless_communication/assets/cards/

Now let's try translating our set of Chinese example passages in a single block of text:

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。 女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。中国陕西历史博物馆珍藏的千年“鎏金铜蚕”,在印度尼西亚发现的千年沉船“黑石号”等,见证了这段历史。 和平合作。公元前140多年的中国汉代,一支从长安出发的和平使团,开始打通东方通往西方的道路,完成了“凿空之旅”,这就是著名的张骞出使西域。中国唐宋元时期,陆上和海上丝绸之路同步发展,中国、意大利、摩洛哥的旅行家杜环、马可·波罗、伊本·白图泰都在陆上和海上丝绸之路留下了历史印记。15世纪初的明代,中国著名航海家郑和七次远洋航海,留下千古佳话。这些开拓事业之所以名垂青史,是因为使用的不是战马和长矛,而是驼队和善意;依靠的不是坚船和利炮,而是宝船和友谊。一代又一代“丝路人”架起了东西方合作的纽带、和平的桥梁。 开放包容。古丝绸之路跨越尼罗河流域、底格里斯河和幼发拉底河流域、印度河和恒河流域、黄河和长江流域,跨越埃及文明、巴比伦文明、印度文明、中华文明的发祥地,跨越佛教、基督教、伊斯兰教信众的汇集地,跨越不同国度和肤色人民的聚居地。不同文明、宗教、种族求同存异、开放包容,并肩书写相互尊重的壮丽诗篇,携手绘就共同发展的美好画卷。酒泉、敦煌、吐鲁番、喀什、撒马尔罕、巴格达、君士坦丁堡等古城,宁波、泉州、广州、北海、科伦坡、吉达、亚历山大等地的古港,就是记载这段历史的“活化石”。历史告诉我们:文明在开放中发展,民族在融合中共存。" t2tt eng –src_lang cmn

Unfortunately, these yields only the following repeated text:

Ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen, ladies and gentlemen.

Whereas the gold standard human translation of the passage can be seen below. Clearly it missed the entire text other than the three words in the third clause that it just repeated:

Distinguished Heads of State and Government, Heads of International Organizations, Ladies and Gentlemen, Dear Friends, In this lovely season of early Summer when every living thing is full of energy, I wish to welcome all of you, distinguished guests representing over 100 countries, to attend this important forum on the Belt and Road Initiative held in Beijing. This is indeed a gathering of great minds. In the coming two days, I hope that by engaging in full exchanges of views, we will contribute to pursuing the Belt and Road Initiative, a project of the century, so that it will benefit people across the world. Ladies and Gentlemen, Dear Friends, Over 2,000 years ago, our ancestors, trekking across vast steppes and deserts, opened the transcontinental passage connecting Asia, Europe and Africa, known today as the Silk Road. Our ancestors, navigating rough seas, created sea routes linking the East with the West, namely, the maritime Silk Road. These ancient silk routes opened windows of friendly engagement among nations, adding a splendid chapter to the history of human progress. The thousand-year-old "gilt bronze silkworm" displayed at China's Shaanxi History Museum and the Belitung shipwreck discovered in Indonesia bear witness to this exciting period of history. Peace and cooperation. In China's Han Dynasty around 140 B.C., Zhang Qian, a royal emissary, left Chang'an, capital of the Han Dynasty. He traveled westward on a mission of peace and opened an overland route linking the East and the West, a daring undertaking which came to be known as Zhang Qian's journey to the Western regions. Centuries later, in the years of Tang, Song and Yuan Dynasties, such silk routes, both over land and at sea, boomed. Great adventurers, including Du Huan of China, Marco Polo of Italy and ibn Batutah of Morocco, left their footprints along these ancient routes. In the early 15th century, Zheng He, the famous Chinese navigator in the Ming Dynasty, made seven voyages to the Western Seas, a feat which still is remembered today. These pioneers won their place in history not as conquerors with warships, guns or swords. Rather, they are remembered as friendly emissaries leading camel caravans and sailing treasure-loaded ships. Generation after generation, the silk routes travelers have built a bridge for peace and East-West cooperation. Openness and inclusiveness. The ancient silk routes spanned the valleys of the Nile, the Tigris and Euphrates, the Indus and Ganges and the Yellow and Yangtze Rivers. They connected the birthplaces of the Egyptian, Babylonian, Indian and Chinese civilizations as well as the lands of Buddhism, Christianity and Islam and homes of people of different nationalities and races. These routes enabled people of various civilizations, religions and races to interact with and embrace each other with open mind. In the course of exchange, they fostered a spirit of mutual respect and were engaged in a common endeavor to pursue prosperity. Today, ancient cities of Jiuquan, Dunhuang, Tulufan, Kashi, Samarkand, Baghdad and Constantinople as well as ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah and Alexandria stand as living monuments to these past interactions. This part of history shows that civilization thrives with openness and nations prosper through exchange.

What if we chop off the second half and leave the first half as-is?

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。 女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。中国陕西历史博物馆珍藏的千年“鎏金铜蚕”,在印度尼西亚发现的千年沉船“黑石号”等,见证了这段历史。 和平合作。" t2tt eng –src_lang cmn

This again skips the opening of the passage, then translates two sentences and skips the rest of the text, but also deviates substantially from the actual text:

On this beautiful occasion, guests from all walks of life from more than 100 countries gathered in Beijing to discuss the big plan of building cooperation along the Belt and Road, which is very important. Today, the group of scholars has come to an end, the young and the old have gathered, and I look forward to all of you gathering your thoughts and ideas, to promote the construction of the Belt and Road, to make this century work for the benefit of all peoples.

Let's drop another sentence from the end of the passage to shorten it even further:

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。 女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。中国陕西历史博物馆珍藏的千年“鎏金铜蚕”,在印度尼西亚发现的千年沉船“黑石号”等,见证了这段历史。" t2tt eng –src_lang cmn

The translation remains unchanged since it was already truncating that sentence in its translation:

On this beautiful occasion, guests from all walks of life from more than 100 countries gathered in Beijing to discuss the plan of cooperation for the construction of the Belt and Road, which is very important. Today, the group of scholars has come to an end, the young and the old have gathered, and I look forward to all of you gathering your thoughts and ideas, to promote the construction of the Belt and Road, to make this century work for the benefit of all peoples.

We'll truncate it even further:

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。 女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。" t2tt eng –src_lang cmn

And the translation remains unchanged:

On this beautiful occasion, guests from all walks of life from more than 100 countries gathered in Beijing to discuss the big plan of cooperation for the construction of the Belt and Road, which is very important. Today, the group of scholars has come to an end, the young and the old have gathered, and I look forward to all of you gathering your thoughts and voices, to promote the construction of the Belt and Road, so that the work of this century can benefit the peoples of all countries.

Clearly the model appears to be length-limited, so let's go back and translate it clause by clause like we did in our original experiment.

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。" t2tt eng –src_lang cmn

Yielding the following. Note how even with this short amount of text, Meta's model truncates most of the passage:

  • SeamlessM4T: Dear Heads of State and Government, heads of international organizations, ladies and gentlemen, friends: On this beautiful occasion, guests from all walks of life from more than 100 countries have gathered in Beijing to discuss the Belt and Road Initiative, which is very important.
  • Authoritative: Distinguished Heads of State and Government, Heads of International Organizations, Ladies and Gentlemen, Dear Friends, In this lovely season of early Summer when every living thing is full of energy, I wish to welcome all of you, distinguished guests representing over 100 countries, to attend this important forum on the Belt and Road Initiative held in Beijing. This is indeed a gathering of great minds. In the coming two days, I hope that by engaging in full exchanges of views, we will contribute to pursuing the Belt and Road Initiative, a project of the century, so that it will benefit people across the world.
  • Google Translate: Dear heads of state, heads of government, heads of international organizations, ladies and gentlemen, friends: On the day of Meng Xia, all things show together. In this beautiful season, guests from all walks of life from more than 100 countries gather in Beijing to discuss the construction and cooperation of the Belt and Road Initiative, which is of great significance. Today, a group of talented people is here, and young and old are gathered together. I look forward to everyone brainstorming, speaking freely, and offering suggestions for promoting the construction of the Belt and Road, so that this century-old project will benefit people from all over the world.

Next:

time python scripts/m4t/predict/predict.py "女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。中国陕西历史博物馆珍藏的千年“鎏金铜蚕”,在印度尼西亚发现的千年沉船“黑石号”等,见证了这段历史。" t2tt eng –src_lang cmn

Note how it again truncates much of the text, but also mistranslates even the part it does process, including "blue road" and "waves of terror":

  • SeamlessM4T: Ladies and gentlemen, friends, more than 2,000 years ago, our ancestors built a blue road, crossed the steppe desert, opened the land Silk Road connecting Asia, Europe and Africa; our ancestors sailed, crossed the waves of terror, broke out of the sea Silk Road connecting the East and the East. The ancient Silk Road opened a new window of friendship between nations and wrote a new chapter in the progress of human development.
  • Authoritative: Ladies and Gentlemen, Dear Friends, Over 2,000 years ago, our ancestors, trekking across vast steppes and deserts, opened the transcontinental passage connecting Asia, Europe and Africa, known today as the Silk Road. Our ancestors, navigating rough seas, created sea routes linking the East with the West, namely, the maritime Silk Road. These ancient silk routes opened windows of friendly engagement among nations, adding a splendid chapter to the history of human progress. The thousand-year-old "gilt bronze silkworm" displayed at China's Shaanxi History Museum and the Belitung shipwreck discovered in Indonesia bear witness to this exciting period of history.
  • Google Translate: Ladies and gentlemen, friends! More than 2,000 years ago, our ancestors traveled through the grasslands and deserts and opened up the land Silk Road connecting Asia, Europe and Africa; our ancestors set sail and crossed the turbulent waves to create the Maritime Silk Road connecting the East and the West. The ancient Silk Road opened a new window for friendly exchanges among countries and wrote a new chapter in the development and progress of mankind. The thousand-year-old "gilded copper silkworm" collected by the Shaanxi History Museum in China, and the thousand-year-old shipwreck "Black Stone" discovered in Indonesia have witnessed this period of history.

Next:

time python scripts/m4t/predict/predict.py "和平合作。公元前140多年的中国汉代,一支从长安出发的和平使团,开始打通东方通往西方的道路,完成了“凿空之旅”,这就是著名的张骞出使西域。中国唐宋元时期,陆上和海上丝绸之路同步发展,中国、意大利、摩洛哥的旅行家杜环、马可·波罗、伊本·白图泰都在陆上和海上丝绸之路留下了历史印记。15世纪初的明代,中国著名航海家郑和七次远洋航海,留下千古佳话。这些开拓事业之所以名垂青史,是因为使用的不是战马和长矛,而是驼队和善意;依靠的不是坚船和利炮,而是宝船和友谊。一代又一代“丝路人”架起了东西方合作的纽带、和平的桥梁。" t2tt eng –src_lang cmn

Again, the majority is truncated. But, this time it makes an extremely serious error, translating "140BC" to "more than 140 years ago", along with other errors:

  • SeamlessM4T: More than 140 years ago, the Chinese Han Dynasty, a peace missionary from Chang'an, began to pave the road from east to west, completing the journey of Zhejiang. This is the famous Zhang Zhen, who made the Western Silk Road develop simultaneously on land and at sea during the Tang Dynasty of China, and the Silk Road developed simultaneously on land and at sea during the Tang Dynasty of China.
  • Authoritative: Peace and cooperation. In China's Han Dynasty around 140 B.C., Zhang Qian, a royal emissary, left Chang'an, capital of the Han Dynasty. He traveled westward on a mission of peace and opened an overland route linking the East and the West, a daring undertaking which came to be known as Zhang Qian's journey to the Western regions. Centuries later, in the years of Tang, Song and Yuan Dynasties, such silk routes, both over land and at sea, boomed. Great adventurers, including Du Huan of China, Marco Polo of Italy and ibn Batutah of Morocco, left their footprints along these ancient routes. In the early 15th century, Zheng He, the famous Chinese navigator in the Ming Dynasty, made seven voyages to the Western Seas, a feat which still is remembered today. These pioneers won their place in history not as conquerors with warships, guns or swords. Rather, they are remembered as friendly emissaries leading camel caravans and sailing treasure-loaded ships. Generation after generation, the silk routes travelers have built a bridge for peace and East-West cooperation.
  • Google Translate: Peaceful cooperation. In the Han Dynasty of China more than 140 BC, a peace mission from Chang'an began to open up the road from the east to the west, and completed the "hollowing out journey". This is the famous Zhang Qian's mission to the Western Regions. During the Tang, Song and Yuan dynasties in China, the land and sea silk roads developed simultaneously. Du Huan, Marco Polo, and Ibn Battuta, the travelers from China, Italy, and Morocco, all left behind on the land and sea silk roads. a historical mark. In the Ming Dynasty at the beginning of the 15th century, the famous Chinese navigator Zheng He made seven voyages to the oceans, leaving a long story. The reason why these pioneering undertakings are famous in history is that they did not use war horses and spears, but camel teams and goodwill; they relied not on strong ships and sharp guns, but on treasure ships and friendship. Generations of "Silk Road people" have built a bond of cooperation and a bridge of peace between the East and the West.

And finally:

time python scripts/m4t/predict/predict.py "开放包容。古丝绸之路跨越尼罗河流域、底格里斯河和幼发拉底河流域、印度河和恒河流域、黄河和长江流域,跨越埃及文明、巴比伦文明、印度文明、中华文明的发祥地,跨越佛教、基督教、伊斯兰教信众的汇集地,跨越不同国度和肤色人民的聚居地。不同文明、宗教、种族求同存异、开放包容,并肩书写相互尊重的壮丽诗篇,携手绘就共同发展的美好画卷。酒泉、敦煌、吐鲁番、喀什、撒马尔罕、巴格达、君士坦丁堡等古城,宁波、泉州、广州、北海、科伦坡、吉达、亚历山大等地的古港,就是记载这段历史的“活化石”。历史告诉我们:文明在开放中发展,民族在融合中共存。" t2tt eng –src_lang cmn

Once again we have heavy truncation, but at least here even though the translation is stilted, it largely preserves the underlying meaning:

  • SeamlessM4T: Opening the ancient Silk Road across the Nile River Basin, the Tigris River and the Euphrates River Basin, the Indus River and the Yangtze River Basin, the Yellow River and the Yangtze River Basin, across the Egyptian civilization, the Babylonian civilization, the Indian civilization, the birthplace of Chinese civilization, across the gathering places of Buddhism, Christianity, Islam, across the settlements of different countries and peoples of different skin colors, different civilizations, religions, different races seeking to coexist, open the door to tolerance, write magnificent poems of mutual respect, work together to paint beautiful volumes on common development.
  • Authoritative: Openness and inclusiveness. The ancient silk routes spanned the valleys of the Nile, the Tigris and Euphrates, the Indus and Ganges and the Yellow and Yangtze Rivers. They connected the birthplaces of the Egyptian, Babylonian, Indian and Chinese civilizations as well as the lands of Buddhism, Christianity and Islam and homes of people of different nationalities and races. These routes enabled people of various civilizations, religions and races to interact with and embrace each other with open mind. In the course of exchange, they fostered a spirit of mutual respect and were engaged in a common endeavor to pursue prosperity. Today, ancient cities of Jiuquan, Dunhuang, Tulufan, Kashi, Samarkand, Baghdad and Constantinople as well as ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah and Alexandria stand as living monuments to these past interactions. This part of history shows that civilization thrives with openness and nations prosper through exchange.
  • Google Translate: Open and inclusive. The ancient Silk Road crossed the Nile River Basin, the Tigris River and Euphrates River Basin, the Indus River and the Ganges River Basin, the Yellow River and the Yangtze River Basin, crossed the birthplaces of Egyptian civilization, Babylonian civilization, Indian civilization, and Chinese civilization, and crossed the collection of followers of Buddhism, Christianity, and Islam. A place where people of different nationalities and colors live together. Different civilizations, religions, and races seek common ground while reserving differences, are open and inclusive, write magnificent poems of mutual respect side by side, and paint a beautiful picture of common development together. The ancient cities of Jiuquan, Dunhuang, Turpan, Kashgar, Samarkand, Baghdad, and Constantinople, and the ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah, and Alexandria are the "living fossils" that record this period of history. ". History tells us: Civilizations develop in openness, and nations coexist in fusion.

PerLet's try splitting the passage above in half:

time python scripts/m4t/predict/predict.py "开放包容。古丝绸之路跨越尼罗河流域、底格里斯河和幼发拉底河流域、印度河和恒河流域、黄河和长江流域,跨越埃及文明、巴比伦文明、印度文明、中华文明的发祥地,跨越佛教、基督教、伊斯兰教信众的汇集地,跨越不同国度和肤色人民的聚居地。不同文明、宗教、种族求同存异、开放包容,并肩书写相互尊重的壮丽诗篇,携手绘就共同发展的美好画卷。" t2tt eng –src_lang cmn

This yields largely the same translation as above, with only small changes:

Opening the ancient Silk Road across the Nile River Basin, the Tigris River and the Euphrates River Basin, the Indus River and the Yangtze River Basin, the Yellow River and the Yangtze River Basin, across the Egyptian civilization, the Babylonian civilization, the Indian civilization, the birthplace of Chinese civilization, across the gathering place of Buddhism, Christianity, Islam, across the gathering place of different countries and peoples of different colors, different civilizations, religions, races seeking to coexist, open to tolerance, write magnificent poems of mutual respect, work together to paint beautiful pictures of common development.

And the second half:

time python scripts/m4t/predict/predict.py "酒泉、敦煌、吐鲁番、喀什、撒马尔罕、巴格达、君士坦丁堡等古城,宁波、泉州、广州、北海、科伦坡、吉达、亚历山大等地的古港,就是记载这段历史的“活化石”。历史告诉我们:文明在开放中发展,民族在融合中共存。" t2tt eng –src_lang cmn

Unfortunately, despite providing a much shorter passage of text, the model skips over the first list of cities and instead begins its translation halfway through the passage and even goes so far as to merge Constantinople from the first list of cities with the second list and mistranslates Beihai as The North Sea.

  • SeamlessM4T: The ancient ports of ancient cities such as Constantinople, Ningbo, Guangzhou, the North Sea, Colombo, Jeddah, Alexandria, etc. are the living fossils that record this history. History tells us that civilization develops in openness, and nations coexist in integration.
  • Authoritative: Today, ancient cities of Jiuquan, Dunhuang, Tulufan, Kashi, Samarkand, Baghdad and Constantinople as well as ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah and Alexandria stand as living monuments to these past interactions. This part of history shows that civilization thrives with openness and nations prosper through exchange.
  • Google Translate: The ancient cities of Jiuquan, Dunhuang, Turpan, Kashgar, Samarkand, Baghdad, and Constantinople, and the ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah, and Alexandria are the "living fossils" that record this period of history. ". History tells us: Civilizations develop in openness, and nations coexist in fusion.

What if we instead translate the passage sentence-by-sentence?

time python scripts/m4t/predict/predict.py "尊敬的各位国家元首,政府首脑,各位国际组织负责人,女士们,先生们,朋友们:孟夏之日,万物并秀。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "在这美好时节,来自100多个国家的各界嘉宾齐聚北京,共商一带一路建设合作大计,具有十分重要的意义。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "今天,群贤毕至,少长咸集,我期待着大家集思广益、畅所欲言,为推动一带一路建设献计献策,让这一世纪工程造福各国人民。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "女士们、先生们、朋友们!2000多年前,我们的先辈筚路蓝缕,穿越草原沙漠,开辟出联通亚欧非的陆上丝绸之路;我们的先辈扬帆远航,穿越惊涛骇浪,闯荡出连接东西方的海上丝绸之路。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "古丝绸之路打开了各国友好交往的新窗口,书写了人类发展进步的新篇章。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "中国陕西历史博物馆珍藏的千年“鎏金铜蚕”,在印度尼西亚发现的千年沉船“黑石号”等,见证了这段历史。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "和平合作。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "公元前140多年的中国汉代,一支从长安出发的和平使团,开始打通东方通往西方的道路,完成了“凿空之旅”,这就是著名的张骞出使西域。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "中国唐宋元时期,陆上和海上丝绸之路同步发展,中国、意大利、摩洛哥的旅行家杜环、马可·波罗、伊本·白图泰都在陆上和海上丝绸之路留下了历史印记。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "15世纪初的明代,中国著名航海家郑和七次远洋航海,留下千古佳话。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "这些开拓事业之所以名垂青史,是因为使用的不是战马和长矛,而是驼队和善意;依靠的不是坚船和利炮,而是宝船和友谊。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "一代又一代“丝路人”架起了东西方合作的纽带、和平的桥梁。 " t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "开放包容。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "古丝绸之路跨越尼罗河流域、底格里斯河和幼发拉底河流域、印度河和恒河流域、黄河和长江流域,跨越埃及文明、巴比伦文明、印度文明、中华文明的发祥地,跨越佛教、基督教、伊斯兰教信众的汇集地,跨越不同国度和肤色人民的聚居地。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "不同文明、宗教、种族求同存异、开放包容,并肩书写相互尊重的壮丽诗篇,携手绘就共同发展的美好画卷。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "酒泉、敦煌、吐鲁番、喀什、撒马尔罕、巴格达、君士坦丁堡等古城,宁波、泉州、广州、北海、科伦坡、吉达、亚历山大等地的古港,就是记载这段历史的“活化石”。" t2tt eng --src_lang cmn
time python scripts/m4t/predict/predict.py "历史告诉我们:文明在开放中发展,民族在融合中共存。" t2tt eng --src_lang cmn

You can see the complete list below. Overall, translating sentence by sentence considerably improves accuracy, though in at least one case it significantly degrades to just "The ancient ports of ancient cities such as the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain.". Running sentence-by-sentence like this requires 16s per translation, though that is primarily the model loading process.

 

  • SeamlessM4T: Distinguished Heads of State, Heads of Government, Heads of International Organizations, Ladies and Gentlemen, Friends: On the Day of the Monkey, all things come together.
  • Authoritative: Distinguished Heads of State and Government, Heads of International Organizations, Ladies and Gentlemen, Dear Friends,
  • Google Translate: Dear heads of state, heads of government, heads of international organizations, ladies and gentlemen, friends: On the day of Meng Xia, all things show together.
  • SeamlessM4T: On this auspicious occasion, guests from more than 100 countries from all walks of life gathered in Beijing to discuss the plan to build cooperation along the Belt and Road.
  • Authoritative: In this lovely season of early Summer when every living thing is full of energy, I wish to welcome all of you, distinguished guests representing over 100 countries, to attend this important forum on the Belt and Road Initiative held in Beijing.
  • Google Translate: In this beautiful season, guests from all walks of life from more than 100 countries gather in Beijing to discuss the construction and cooperation of the Belt and Road Initiative, which is of great significance.
  • SeamlessM4T: Today, at the end of the group, I look forward to gathering all of you to think broadly and speak freely, to promote the construction of the Belt and Road, to make the project of this century benefit the peoples of all countries.
  • Authoritative: This is indeed a gathering of great minds. In the coming two days, I hope that by engaging in full exchanges of views, we will contribute to pursuing the Belt and Road Initiative, a project of the century, so that it will benefit people across the world.
  • Google Translate: Today, a group of talented people is here, and young and old are gathered together. I look forward to everyone brainstorming, speaking freely, and offering suggestions for promoting the construction of the Belt and Road, so that this century-old project will benefit people from all over the world.
  • SeamlessM4T: Ladies and gentlemen, friends, more than 2,000 years ago, our ancestors built the Silk Road across the steppes and deserts, opening the Silk Road on land between Asia, Europe and Africa; our ancestors sailed across the waves and storms, breaking out of the Silk Road on sea, connecting the East and the West.
  • Authoritative: Ladies and Gentlemen, Dear Friends, Over 2,000 years ago, our ancestors, trekking across vast steppes and deserts, opened the transcontinental passage connecting Asia, Europe and Africa, known today as the Silk Road. Our ancestors, navigating rough seas, created sea routes linking the East with the West, namely, the maritime Silk Road.
  • Google Translate: Ladies and gentlemen, friends! More than 2,000 years ago, our ancestors traveled through the grasslands and deserts and opened up the land Silk Road connecting Asia, Europe and Africa; our ancestors set sail and crossed the turbulent waves to create the Maritime Silk Road connecting the East and the West.
  • SeamlessM4T: The ancient Silk Road opened a new window of friendly interaction between nations and wrote a new chapter in the progress of human development.
  • Authoritative: These ancient silk routes opened windows of friendly engagement among nations, adding a splendid chapter to the history of human progress.
  • Google Translate: The ancient Silk Road opened a new window for friendly exchanges among countries and wrote a new chapter in the development and progress of mankind.
  • SeamlessM4T: The Millennium Gold Copper Silk, housed in the Shaanxi History Museum of China, and the Millennium Shipwreck, Black Stone, found in Indonesia, are witnesses to this period of history.
  • Authoritative: The thousand-year-old "gilt bronze silkworm" displayed at China's Shaanxi History Museum and the Belitung shipwreck discovered in Indonesia bear witness to this exciting period of history.
  • Google Translate: The thousand-year-old "gilded copper silkworm" collected by the Shaanxi History Museum in China, and the thousand-year-old shipwreck "Black Stone" discovered in Indonesia have witnessed this period of history.
  • SeamlessM4T: Peace and cooperation.
  • Authoritative: Peace and cooperation.
  • Google Translate: Peaceful cooperation.
  • SeamlessM4T: In more than 140 B.C.E., the Han Dynasty of China, a peace missionary from Chang'an, began to pave the road from east to west, completing the journey from east to west.
  • Authoritative: In China's Han Dynasty around 140 B.C., Zhang Qian, a royal emissary, left Chang'an, capital of the Han Dynasty. He traveled westward on a mission of peace and opened an overland route linking the East and the West, a daring undertaking which came to be known as Zhang Qian's journey to the Western regions.
  • Google Translate: In the Han Dynasty of China more than 140 BC, a peace mission from Chang'an began to open up the road from the east to the west, and completed the "hollowing out journey". This is the famous Zhang Qian's mission to the Western Regions.
  • SeamlessM4T: During the Tang Dynasty in China, the land and sea Silk Roads developed simultaneously, and the Chinese-Italian-Moroccan traveler Du Ling, Marco Polo, and Ibn Battuta left their historical mark on both the land and sea Silk Roads.
  • Authoritative: Centuries later, in the years of Tang, Song and Yuan Dynasties, such silk routes, both over land and at sea, boomed. Great adventurers, including Du Huan of China, Marco Polo of Italy and ibn Batutah of Morocco, left their footprints along these ancient routes.
  • Google Translate: During the Tang, Song and Yuan dynasties in China, the land and sea silk roads developed simultaneously. Du Huan, Marco Polo, and Ibn Battuta, the travelers from China, Italy, and Morocco, all left behind on the land and sea silk roads. a historical mark.
  • SeamlessM4T: In the early 15th century Ming Dynasty, the famous Chinese navigator Zheng He made seven ocean voyages, leaving behind a thousand ancient sayings.
  • Authoritative: In the early 15th century, Zheng He, the famous Chinese navigator in the Ming Dynasty, made seven voyages to the Western Seas, a feat which still is remembered today.
  • Google Translate: In the Ming Dynasty at the beginning of the 15th century, the famous Chinese navigator Zheng He made seven voyages to the oceans, leaving a long story.
  • SeamlessM4T:  These pioneering ventures are famous because they use not war horses and spears, but camels and goodwill; they rely not on ships and cannons, but on treasure ships and friendship.
  • Authoritative: These pioneers won their place in history not as conquerors with warships, guns or swords. Rather, they are remembered as friendly emissaries leading camel caravans and sailing treasure-loaded ships.
  • Google Translate: The reason why these pioneering undertakings are famous in history is that they did not use war horses and spears, but camel teams and goodwill; they relied not on strong ships and sharp guns, but on treasure ships and friendship.
  • SeamlessM4T:  Generation after generation of Silk Road people have built bonds of cooperation between East and West, bridges of peace.
  • Authoritative: Generation after generation, the silk routes travelers have built a bridge for peace and East-West cooperation.
  • Google Translate: Generations of "Silk Road people" have built a bond of cooperation and a bridge of peace between the East and the West.
  • SeamlessM4T: Open and inclusive.
  • Authoritative: Openness and inclusiveness.
  • Google Translate: Open and inclusive.
  • SeamlessM4T: The ancient Silk Road crossed the Nile River basin, the Tigris River and the Euphrates River basin, the Indus River and the Yangtze River basin, the Yellow River and the Yangtze River basin, the birthplace of the Egyptian civilization, the Babylonian civilization, the Indian civilization, the Chinese civilization, the gathering place of the followers of Buddhism, Christianity and Islam, the gathering place of people of different nationalities and colors.
  • Authoritative: The ancient silk routes spanned the valleys of the Nile, the Tigris and Euphrates, the Indus and Ganges and the Yellow and Yangtze Rivers. They connected the birthplaces of the Egyptian, Babylonian, Indian and Chinese civilizations as well as the lands of Buddhism, Christianity and Islam and homes of people of different nationalities and races.
  • Google Translate: The ancient Silk Road crossed the Nile River Basin, the Tigris River and Euphrates River Basin, the Indus River and the Ganges River Basin, the Yellow River and the Yangtze River Basin, crossed the birthplaces of Egyptian civilization, Babylonian civilization, Indian civilization, and Chinese civilization, and crossed the collection of followers of Buddhism, Christianity, and Islam. A place where people of different nationalities and colors live together.
  • SeamlessM4T: Different civilizations, religions, and races seek to coexist, to be open and inclusive, to write magnificent poems of mutual respect, to work together to paint a beautiful picture of common development.
  • Authoritative: These routes enabled people of various civilizations, religions and races to interact with and embrace each other with open mind. In the course of exchange, they fostered a spirit of mutual respect and were engaged in a common endeavor to pursue prosperity.
  • Google Translate: Different civilizations, religions, and races seek common ground while reserving differences, are open and inclusive, write magnificent poems of mutual respect side by side, and paint a beautiful picture of common development together.
  • SeamlessM4T: The ancient ports of ancient cities such as the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain, the fountain.
  • Authoritative: Today, ancient cities of Jiuquan, Dunhuang, Tulufan, Kashi, Samarkand, Baghdad and Constantinople as well as ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah and Alexandria stand as living monuments to these past interactions.
  • Google Translate: The ancient cities of Jiuquan, Dunhuang, Turpan, Kashgar, Samarkand, Baghdad, and Constantinople, and the ancient ports of Ningbo, Quanzhou, Guangzhou, Beihai, Colombo, Jeddah, and Alexandria are the "living fossils" that record this period of history. ".
  • SeamlessM4T: History tells us that civilization develops in openness and nations coexist in integration.
  • Authoritative: This part of history shows that civilization thrives with openness and nations prosper through exchange.
  • Google Translate: History tells us: Civilizations develop in openness, and nations coexist in fusion.