{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "English2Tigrigna", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "accelerator": "GPU" }, "cells": [ { "cell_type": "code", "metadata": { "id": "BE3onLtiHvP5", "colab_type": "code", "outputId": "5e0a4bc0-b6a8-4225-da07-21371e9dd01d", "colab": { "base_uri": "https://localhost:8080/", "height": 34 } }, "source": [ "from google.colab import drive\n", "drive.mount('/content/drive')" ], "execution_count": 8, "outputs": [ { "output_type": "stream", "text": [ "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "iapTRdQLH2MO", "colab_type": "code", "colab": {} }, "source": [ "# TODO: Set your source and target languages. Keep in mind, these traditionally use language codes as found here:\n", "# These will also become the suffix's of all vocab and corpus files used throughout\n", "import os\n", "source_language = \"en\"\n", "target_language = \"ti\"\n", "tag = \"baseline\" # Give a unique name to your folder - this is to ensure you don't rewrite any models you've already submitted\n", "\n", "os.environ[\"src\"] = source_language # Sets them in bash as well, since we often use bash scripts\n", "os.environ[\"tgt\"] = target_language\n", "os.environ[\"tag\"] = tag\n", "\n", "# This will save it to a folder in our gdrive instead!\n", "!mkdir -p \"/content/drive/My Drive/masakhane/$src-$tgt\"\n", "os.environ[\"gdrive_path\"] = \"/content/drive/My Drive/masakhane/%s-%s\" % (source_language, target_language)" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "JI0nLF_Zt6Of", "colab_type": "code", "outputId": "11a31484-6c94-47df-d15e-0a035cae13d3", "colab": { "resources": { "http://localhost:8080/nbextensions/google.colab/files.js": { "data": "Ly8gQ29weXJpZ2h0IDIwMTcgR29vZ2xlIExMQwovLwovLyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKLy8geW91IG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vbnNlOiB7CiAgICAgICAgICBhY3Rpb246ICdhcHBlbmQnLAogICAgICAgICAgZmlsZTogZmlsZS5uYW1lLAogICAgICAgICAgZGF0YTogYmFzZTY0LAogICAgICAgIH0sCiAgICAgIH07CiAgICAgIHBlcmNlbnQudGV4dENvbnRlbnQgPQogICAgICAgICAgYCR7TWF0aC5yb3VuZCgocG9zaXRpb24gLyBmaWxlRGF0YS5ieXRlTGVuZ3RoKSAqIDEwMCl9JSBkb25lYDsKICAgIH0KICB9CgogIC8vIEFsbCBkb25lLgogIHlpZWxkIHsKICAgIHJlc3BvbnNlOiB7CiAgICAgIGFjdGlvbjogJ2NvbXBsZXRlJywKICAgIH0KICB9Owp9CgpzY29wZS5nb29nbGUgPSBzY29wZS5nb29nbGUgfHwge307CnNjb3BlLmdvb2dsZS5jb2xhYiA9IHNjb3BlLmdvb2dsZS5jb2xhYiB8fCB7fTsKc2NvcGUuZ29vZ2xlLmNvbGFiLl9maWxlcyA9IHsKICBfdXBsb2FkRmlsZXMsCiAgX3VwbG9hZEZpbGVzQ29udGludWUsCn07Cn0pKHNlbGYpOwo=", "ok": true, "headers": [ [ "content-type", "application/javascript" ] ], "status": 200, "status_text": "" } }, "base_uri": "https://localhost:8080/", "height": 74 } }, "source": [ "from google.colab import files\n", "uploaded = files.upload()" ], "execution_count": 7, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "\n", " \n", " \n", " Upload widget is only available when the cell has been executed in the\n", " current browser session. Please rerun this cell to enable.\n", " \n", " " ], "text/plain": [ "" ] }, "metadata": { "tags": [] } }, { "output_type": "stream", "text": [ "Saving en_ti.csv to en_ti (2).csv\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "3v_ndeVfPA3q", "colab": {} }, "source": [ "import pandas as pd\n", "import io\n", "data = pd.read_csv(io.BytesIO(uploaded['en_ti.csv']))\n", "# Dataset is now stored in a Pandas Dataframe" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "gQF4yAXfuOSA", "colab_type": "code", "outputId": "a94612f9-c218-4ddf-c936-325baa87f418", "colab": { "base_uri": "https://localhost:8080/", "height": 204 } }, "source": [ "data.head()" ], "execution_count": 10, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
EnglishTigrigna
017 When Aʹbram was 99 years old, Jehovah appe...17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...
12 I will establish my covenant between me and...2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...
23 At this Aʹbram fell facedown, and God conti...3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦
34 “As for me, look! my covenant is with you,+...4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...
45 Your name will no longer be Aʹbram;* your n...5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ...
\n", "
" ], "text/plain": [ " English Tigrigna\n", "0 17 When Aʹbram was 99 years old, Jehovah appe... 17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...\n", "1 2 I will establish my covenant between me and... 2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...\n", "2 3 At this Aʹbram fell facedown, and God conti... 3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦\n", "3 4 “As for me, look! my covenant is with you,+... 4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...\n", "4 5 Your name will no longer be Aʹbram;* your n... 5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ..." ] }, "metadata": { "tags": [] }, "execution_count": 10 } ] }, { "cell_type": "code", "metadata": { "id": "Bzs9F6kVuOYb", "colab_type": "code", "colab": {} }, "source": [ "data = data.rename(columns={\"English\":\"source_sentence\", \"Tigrigna\":\"target_sentence\"})\n" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "5HPQuXBK6o8J", "colab_type": "code", "outputId": "27778738-69a8-40b9-8745-6d89798900d1", "colab": { "base_uri": "https://localhost:8080/", "height": 204 } }, "source": [ "data.head()" ], "execution_count": 12, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
source_sentencetarget_sentence
017 When Aʹbram was 99 years old, Jehovah appe...17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...
12 I will establish my covenant between me and...2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...
23 At this Aʹbram fell facedown, and God conti...3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦
34 “As for me, look! my covenant is with you,+...4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...
45 Your name will no longer be Aʹbram;* your n...5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ...
\n", "
" ], "text/plain": [ " source_sentence target_sentence\n", "0 17 When Aʹbram was 99 years old, Jehovah appe... 17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...\n", "1 2 I will establish my covenant between me and... 2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...\n", "2 3 At this Aʹbram fell facedown, and God conti... 3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦\n", "3 4 “As for me, look! my covenant is with you,+... 4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...\n", "4 5 Your name will no longer be Aʹbram;* your n... 5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ..." ] }, "metadata": { "tags": [] }, "execution_count": 12 } ] }, { "cell_type": "code", "metadata": { "id": "KWs3fc6vN9ro", "colab_type": "code", "outputId": "899e1f7a-bfd9-47fb-ff57-f7458f26f32e", "colab": { "base_uri": "https://localhost:8080/", "height": 886 } }, "source": [ "data[data.duplicated()]" ], "execution_count": 13, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
source_sentencetarget_sentence
350914 Jehovah continued to speak to Moses, saying:14 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦
36429 Jehovah continued to speak to Moses, saying:9 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦
102856 David then established garrisons in Syria o...6 ዳዊት ድማ ኣብ ሶርያ ናይ ደማስቆ ዝዓረደ ሰራዊት ኣንበረ፣ ሶርያውያ...
116194 He also kept sacrificing and making sacrifi...4 ኣብ በረኽትን+ ኣብ ልዕሊ ዅርባታትን ኣብ ትሕቲ ዅሉ ልሙዕ ኦምን+ ...
118594 “Your father made our yoke harsh.+ But if y...4 “ኣቦኻ ኣርዑትና ኣበርቲዑልና።+ ግናኸ፡ ነቲ ብርቱዕ መግዛእቲ ኣቦኻ...
118616 King Re·ho·boʹam then consulted with the ol...6 ንጉስ ሮብዓም ከኣ ምስቶም ኣቦኡ ሰሎሞን ብህይወቱ ኸሎ ዜገልግልዎ ዝ...
118638 However, he rejected the advice that the ol...8 ንሱ ግና ነቲ እቶም ዓበይቲ ዝመኸርዎ ምኽሪ ሓዲጉስ፡ ምስቶም ምስኡ ...
118649 He asked them: “What advice do you offer on...9 ንዓታቶም ድማ፡ “ነዞም፡ ‘ነቲ ኣቦኻ ኣብ ልዕሌና ዘንበሮ ኣርዑት ኣ...
1186712 Jer·o·boʹam and all the people came to Re·...12 ከምቲ ንጉስ፡ “ኣብ ሳልሰይቲ መዓልቲ ተመለሱኒ” ዝበሎም፡ የሮብዓም...
1187217 But Re·ho·boʹam continued to reign over th...17 ሮብዓም ግና ኣብ ልዕሊ እቶም ኣብ ከተማታት ይሁዳ ዚነብሩ ዝነበሩ ...
163525 Be exalted above the heavens, O God;May yo...5 ኦ ኣምላኽ፡ ኣብ ልዕሊ ሰማያት ልዕል በል፣ክብርኻ ኣብ ልዕሊ ዅላ ...
183593 They said to him: “This is what Hez·e·kiʹah...3 ንሳቶም ከኣ ከምዚ በልዎ፦ “ህዝቅያስ ከምዚ ይብል፦ ‘እዛ መዓልቲ እ...
183615 So the servants of King Hez·e·kiʹah went in...5 እቶም ገላዉ ንጉስ ህዝቅያስ ከኣ ናብ ኢሳይያስ ከዱ።+
1836610 “This is what you should say to King Hez·e...10 “ንህዝቅያስ ንጉስ ይሁዳ ኸምዚ በልዎ፦ ‘እቲ እትእመኖ ኣምላኽካ፡ ...
1836711 Look! You have heard what the kings of As·...11 እንሆ፡ ነገስታት ኣሶር ንዅለን ሃገራት ብምጥፋእ ዝገበርወን ሰሚዕካ...
1837014 Hez·e·kiʹah took the letters out of the ha...14 ህዝቅያስ ድማ ነተን ደብዳበታት ካብ ኢድ እቶም ልኡኻት ተቐቢሉ ኣን...
2102111 And the word of Jehovah again came to me, ...11 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦
214592 Then the word of Jehovah came to me, saying:2 ሽዑ፡ ከምዚ ዚብል ቃል የሆዋ መጸኒ፦
2163518 And the word of Jehovah again came to me, ...18 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦
2165015 The word of Jehovah again came to me, saying:15 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦
2167417 And the word of Jehovah again came to me, ...17 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦
229988 The word of Jehovah again came to me, saying:8 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦
244805 Others fell on rocky ground where there was...5 ገሊኡ ኸኣ ብዙሕ ሓመድ ኣብ ዘይብሉ ኸውሒ ወደቐ፣ ዓሚቝ ሓመድ ስለ ...
244816 But when the sun rose, they were scorched, ...6 ጸሓይ ምስ በረቐት ግና ሓረረ፣ ሱር ስለ ዘይብሉ ድማ ነቐጸ።
292052 May you have undeserved kindness and peace ...2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...
293602 May you have undeserved kindness and peace ...2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...
299173 May you have undeserved kindness and peace ...3 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...
\n", "
" ], "text/plain": [ " source_sentence target_sentence\n", "3509 14 Jehovah continued to speak to Moses, saying: 14 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦\n", "3642 9 Jehovah continued to speak to Moses, saying: 9 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦\n", "10285 6 David then established garrisons in Syria o... 6 ዳዊት ድማ ኣብ ሶርያ ናይ ደማስቆ ዝዓረደ ሰራዊት ኣንበረ፣ ሶርያውያ...\n", "11619 4 He also kept sacrificing and making sacrifi... 4 ኣብ በረኽትን+ ኣብ ልዕሊ ዅርባታትን ኣብ ትሕቲ ዅሉ ልሙዕ ኦምን+ ...\n", "11859 4 “Your father made our yoke harsh.+ But if y... 4 “ኣቦኻ ኣርዑትና ኣበርቲዑልና።+ ግናኸ፡ ነቲ ብርቱዕ መግዛእቲ ኣቦኻ...\n", "11861 6 King Re·ho·boʹam then consulted with the ol... 6 ንጉስ ሮብዓም ከኣ ምስቶም ኣቦኡ ሰሎሞን ብህይወቱ ኸሎ ዜገልግልዎ ዝ...\n", "11863 8 However, he rejected the advice that the ol... 8 ንሱ ግና ነቲ እቶም ዓበይቲ ዝመኸርዎ ምኽሪ ሓዲጉስ፡ ምስቶም ምስኡ ...\n", "11864 9 He asked them: “What advice do you offer on... 9 ንዓታቶም ድማ፡ “ነዞም፡ ‘ነቲ ኣቦኻ ኣብ ልዕሌና ዘንበሮ ኣርዑት ኣ...\n", "11867 12 Jer·o·boʹam and all the people came to Re·... 12 ከምቲ ንጉስ፡ “ኣብ ሳልሰይቲ መዓልቲ ተመለሱኒ” ዝበሎም፡ የሮብዓም...\n", "11872 17 But Re·ho·boʹam continued to reign over th... 17 ሮብዓም ግና ኣብ ልዕሊ እቶም ኣብ ከተማታት ይሁዳ ዚነብሩ ዝነበሩ ...\n", "16352 5 Be exalted above the heavens, O God;May yo... 5 ኦ ኣምላኽ፡ ኣብ ልዕሊ ሰማያት ልዕል በል፣ክብርኻ ኣብ ልዕሊ ዅላ ...\n", "18359 3 They said to him: “This is what Hez·e·kiʹah... 3 ንሳቶም ከኣ ከምዚ በልዎ፦ “ህዝቅያስ ከምዚ ይብል፦ ‘እዛ መዓልቲ እ...\n", "18361 5 So the servants of King Hez·e·kiʹah went in... 5 እቶም ገላዉ ንጉስ ህዝቅያስ ከኣ ናብ ኢሳይያስ ከዱ።+\n", "18366 10 “This is what you should say to King Hez·e... 10 “ንህዝቅያስ ንጉስ ይሁዳ ኸምዚ በልዎ፦ ‘እቲ እትእመኖ ኣምላኽካ፡ ...\n", "18367 11 Look! You have heard what the kings of As·... 11 እንሆ፡ ነገስታት ኣሶር ንዅለን ሃገራት ብምጥፋእ ዝገበርወን ሰሚዕካ...\n", "18370 14 Hez·e·kiʹah took the letters out of the ha... 14 ህዝቅያስ ድማ ነተን ደብዳበታት ካብ ኢድ እቶም ልኡኻት ተቐቢሉ ኣን...\n", "21021 11 And the word of Jehovah again came to me, ... 11 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n", "21459 2 Then the word of Jehovah came to me, saying: 2 ሽዑ፡ ከምዚ ዚብል ቃል የሆዋ መጸኒ፦\n", "21635 18 And the word of Jehovah again came to me, ... 18 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n", "21650 15 The word of Jehovah again came to me, saying: 15 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦\n", "21674 17 And the word of Jehovah again came to me, ... 17 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n", "22998 8 The word of Jehovah again came to me, saying: 8 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦\n", "24480 5 Others fell on rocky ground where there was... 5 ገሊኡ ኸኣ ብዙሕ ሓመድ ኣብ ዘይብሉ ኸውሒ ወደቐ፣ ዓሚቝ ሓመድ ስለ ...\n", "24481 6 But when the sun rose, they were scorched, ... 6 ጸሓይ ምስ በረቐት ግና ሓረረ፣ ሱር ስለ ዘይብሉ ድማ ነቐጸ።\n", "29205 2 May you have undeserved kindness and peace ... 2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...\n", "29360 2 May you have undeserved kindness and peace ... 2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...\n", "29917 3 May you have undeserved kindness and peace ... 3 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ..." ] }, "metadata": { "tags": [] }, "execution_count": 13 } ] }, { "cell_type": "code", "metadata": { "id": "wQh76ndELmrY", "colab_type": "code", "outputId": "8fa7b0b0-fbc1-44eb-f102-c7952bcdbf3d", "colab": { "base_uri": "https://localhost:8080/", "height": 51 } }, "source": [ "print(\"Length of Data before Removing duplicate: \",len(data))\n", "data = data.drop_duplicates()\n", "print(\"Length of Data after Removing duplicate: \",len(data))" ], "execution_count": 14, "outputs": [ { "output_type": "stream", "text": [ "Length of Data before Removing duplicate: 31078\n", "Length of Data after Removing duplicate: 31051\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "ihDdYUR0ukwj", "colab_type": "code", "colab": {} }, "source": [ "# Do the split between dev/test/train and create parallel corpora\n", "num_dev_patterns = 1000\n", "num_test_patterns = 1000\n", "df = data\n", "# Lower case the corpora\n", "df[\"source_sentence\"] = df[\"source_sentence\"].str.lower()\n", "df[\"target_sentence\"] = df[\"target_sentence\"].str.lower()\n", "\n", "\n", "devtest = df.tail(num_dev_patterns + num_test_patterns)\n", "test = devtest.tail(num_test_patterns)\n", "dev = devtest.head(num_dev_patterns)\n", "stripped = df.drop(df.tail(num_dev_patterns + num_test_patterns).index)\n", "\n", "stripped[[\"source_sentence\"]].to_csv(\"train.en\", index=False)\n", "stripped[[\"target_sentence\"]].to_csv(\"train.ti\", index=False)\n", "\n", "dev[[\"source_sentence\"]].to_csv(\"dev.en\", index=False)\n", "dev[[\"target_sentence\"]].to_csv(\"dev.ti\", index=False)\n", "\n", "test[[\"source_sentence\"]].to_csv(\"test.en\", index=False)\n", "test[[\"target_sentence\"]].to_csv(\"test.ti\", index=False)" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "eeszbBPNukz5", "colab_type": "code", "outputId": "4fc9aff5-f305-4819-8d5d-99e932e15a4f", "colab": { "base_uri": "https://localhost:8080/", "height": 1000 } }, "source": [ "# Install JoeyNMT\n", "! git clone https://github.com/joeynmt/joeynmt.git\n", "! cd joeynmt; pip3 install ." ], "execution_count": 16, "outputs": [ { "output_type": "stream", "text": [ "fatal: destination path 'joeynmt' already exists and is not an empty directory.\n", "Processing /content/joeynmt\n", "Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.16.0)\n", "Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (4.3.0)\n", "Requirement already satisfied: numpy<2.0,>=1.14.5 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.16.5)\n", "Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (41.2.0)\n", "Requirement already satisfied: torch>=1.1 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.2.0)\n", "Requirement already satisfied: tensorflow>=1.14 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.15.0rc3)\n", "Requirement already satisfied: torchtext in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.3.1)\n", "Requirement already satisfied: sacrebleu>=1.3.6 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.4.2)\n", "Requirement already satisfied: subword-nmt in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.3.6)\n", "Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (3.0.3)\n", "Requirement already satisfied: seaborn in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.9.0)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (5.1.2)\n", "Requirement already satisfied: pylint in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (2.4.2)\n", "Requirement already satisfied: six>=1.12 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.12.0)\n", "Requirement already satisfied: olefile in /usr/local/lib/python3.6/dist-packages (from pillow->joeynmt==0.0.1) (0.46)\n", "Requirement already satisfied: gast==0.2.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.2.2)\n", "Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.8.0)\n", "Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.1.7)\n", "Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.0)\n", "Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.8.0)\n", "Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.0)\n", "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.1.0)\n", "Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.11.2)\n", "Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (3.1.0)\n", "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.33.6)\n", "Requirement already satisfied: keras-applications>=1.0.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.0.8)\n", "Requirement already satisfied: tensorflow-estimator==1.15.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.1)\n", "Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.1.0)\n", "Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (3.7.1)\n", "Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from torchtext->joeynmt==0.0.1) (4.28.1)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from torchtext->joeynmt==0.0.1) (2.21.0)\n", "Requirement already satisfied: typing in /usr/local/lib/python3.6/dist-packages (from sacrebleu>=1.3.6->joeynmt==0.0.1) (3.7.4.1)\n", "Requirement already satisfied: portalocker in /usr/local/lib/python3.6/dist-packages (from sacrebleu>=1.3.6->joeynmt==0.0.1) (1.5.1)\n", "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (0.10.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (1.1.0)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (2.4.2)\n", "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (2.5.3)\n", "Requirement already satisfied: pandas>=0.15.2 in /usr/local/lib/python3.6/dist-packages (from seaborn->joeynmt==0.0.1) (0.24.2)\n", "Requirement already satisfied: scipy>=0.14.0 in /usr/local/lib/python3.6/dist-packages (from seaborn->joeynmt==0.0.1) (1.3.1)\n", "Requirement already satisfied: mccabe<0.7,>=0.6 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (0.6.1)\n", "Requirement already satisfied: astroid<2.4,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (2.3.1)\n", "Requirement already satisfied: isort<5,>=4.2.5 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (4.3.21)\n", "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow>=1.14->joeynmt==0.0.1) (3.1.1)\n", "Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow>=1.14->joeynmt==0.0.1) (0.16.0)\n", "Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.8->tensorflow>=1.14->joeynmt==0.0.1) (2.8.0)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (2019.9.11)\n", "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (3.0.4)\n", "Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (1.24.3)\n", "Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (2.8)\n", "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas>=0.15.2->seaborn->joeynmt==0.0.1) (2018.9)\n", "Requirement already satisfied: typed-ast<1.5,>=1.4.0; implementation_name == \"cpython\" and python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from astroid<2.4,>=2.3.0->pylint->joeynmt==0.0.1) (1.4.0)\n", "Requirement already satisfied: lazy-object-proxy==1.4.* in /usr/local/lib/python3.6/dist-packages (from astroid<2.4,>=2.3.0->pylint->joeynmt==0.0.1) (1.4.2)\n", "Building wheels for collected packages: joeynmt\n", " Building wheel for joeynmt (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for joeynmt: filename=joeynmt-0.0.1-cp36-none-any.whl size=69430 sha256=f18c7a68e6d29b980a95ab8910305f43832d240435cf8c605f1bfcc3330e773b\n", " Stored in directory: /tmp/pip-ephem-wheel-cache-xusokv4l/wheels/db/01/db/751cc9f3e7f6faec127c43644ba250a3ea7ad200594aeda70a\n", "Successfully built joeynmt\n", "Installing collected packages: joeynmt\n", " Found existing installation: joeynmt 0.0.1\n", " Uninstalling joeynmt-0.0.1:\n", " Successfully uninstalled joeynmt-0.0.1\n", "Successfully installed joeynmt-0.0.1\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "rDWEwGnAuk3M", "colab_type": "code", "outputId": "b48f3bf5-10f3-4b34-bdfa-ba9e048a8e36", "colab": { "base_uri": "https://localhost:8080/", "height": 479 } }, "source": [ "# One of the huge boosts in NMT performance was to use a different method of tokenizing. \n", "# Usually, NMT would tokenize by words. However, using a method called BPE gave amazing boosts to performance\n", "\n", "# Do subword NMT\n", "! mkdir joeynmt/data/\n", "! mkdir joeynmt/data/enti/\n", "! export data_path=joeynmt/data/$src$tgt/\n", "! subword-nmt learn-joint-bpe-and-vocab --input train.$src train.$tgt -s 4000 -o bpe.codes.4000 --write-vocabulary vocab.$src vocab.$tgt\n", "\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < train.$src > train.bpe.$src\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < train.$tgt > train.bpe.$tgt\n", "\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < dev.$src > dev.bpe.$src\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < dev.$tgt > dev.bpe.$tgt\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < test.$src > test.bpe.$src\n", "! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < test.$tgt > test.bpe.$tgt\n", "\n", "# Create directory, move everyone we care about to the correct location\n", "# Create the /data/enti/ folder explicityly\n", "! cp train.* joeynmt/data/enti/ \n", "! cp test.* joeynmt/data/enti/\n", "! cp dev.* joeynmt/data/enti/\n", "! cp bpe.codes.4000 $data_path\n", "! ls $data_path\n", "\n", "# Create that vocab using build_vocab\n", "! sudo chmod 777 joeynmt/scripts/build_vocab.py\n", "! joeynmt/scripts/build_vocab.py joeynmt/data/$src$tgt/train.bpe.$src joeynmt/data/$src$tgt/train.bpe.$tgt --output_path joeynmt/data/$src$tgt/vocab.txt\n", "\n", "# Some output\n", "! echo \"BPE Tigrigna Sentences\"\n", "! tail -n 5 test.bpe.$tgt\n", "! echo \"Combined BPE Vocab\"\n", "! tail -n 10 joeynmt/data/enti/vocab.txt" ], "execution_count": 17, "outputs": [ { "output_type": "stream", "text": [ "mkdir: cannot create directory ‘joeynmt/data/’: File exists\n", "mkdir: cannot create directory ‘joeynmt/data/enti/’: File exists\n", "cp: missing destination file operand after 'bpe.codes.4000'\n", "Try 'cp --help' for more information.\n", " bpe.codes.4000 drive\t\t sample_data\t train.bpe.en vocab.ti\n", " dev.bpe.en\t 'en_ti (1).csv' test.bpe.en\t train.bpe.ti\n", " dev.bpe.ti\t 'en_ti (2).csv' test.bpe.ti\t train.en\n", " dev.en\t\t en_ti.csv\t test.en\t train.ti\n", " dev.ti\t\t joeynmt\t test.ti\t vocab.en\n", "BPE Tigrigna Sentences\n", "17 እቲ መንፈ@@ ስን እታ መር@@ ዓ@@ ት@@ ን፡+ “@@ ንዓ@@ !” ይብ@@ ሉ ኣለዉ። እቲ ዚ@@ ሰም@@ ዕ እውን፡ “@@ ንዓ@@ !” ይበል@@ ። ዝ@@ ጸም@@ አ ኸኣ ይ@@ ም@@ ጻእ@@ ፣+ ዝ@@ ደለ@@ የ እውን ማይ ህይወት ብ@@ ና@@ ጻ ይ@@ ውሰ@@ ድ@@ ።+ \n", "18 “@@ ቃል ትን@@ ቢ@@ ት እዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ እዚኣ ንዚ@@ ሰም@@ ዑ ዘ@@ በሉ እ@@ ምስክ@@ ረ@@ ሎም ኣለኹ@@ ፦ ሓደ እኳ ናብ@@ ዚ እንተ ወሲ@@ ኹ@@ ፡+ ኣምላኽ ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ እዚኣ ተጻሒ@@ ፉ ዘሎ መዓ@@ ታት ኪ@@ ው@@ ስ@@ ኸ@@ ሉ እዩ፣+\n", "19 ሓደ እኳ ኻብ ቃል እዚ ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ ዘሎ ትን@@ ቢ@@ ት እዚ እንተ ኣ@@ ጕ@@ ዲ@@ ሉ፡ ኣምላኽ ካብ@@ ተን ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ ተጻሒ@@ ፈ@@ ን ዘለ@@ ዋ ኣእዋም ህይወ@@ ትን+ ቅድ@@ ስቲ ኸተማ@@ ን+ ግ@@ ዲ@@ ኡ ኼ@@ ጕድ@@ ለ@@ ሉ እዩ። \n", "20 “እቲ ነዚ ነገር እዚ ዚ@@ ምስክ@@ ር፡ ‘@@ እወ፡ ቀ@@ ልጢ@@ ፈ እ@@ መጽእ ኣለኹ@@ ’ ይብል ኣሎ@@ ።”+ “ኣ@@ ሜ@@ ን@@ ! ጐይታ@@ ና የ@@ ሱ@@ ስ፡ ንዓ@@ ።” \n", "21 ጸ@@ ጋ ጐይታ@@ ና የሱስ ምስ ቅዱ@@ ሳት ይኹን።\n", "Combined BPE Vocab\n", "sac@@\n", "ፉእ\n", "pharʹa@@\n", "syr@@\n", "mediat@@\n", "ቈ\n", "ዜ\n", "ጩ\n", "ቊ\n", "ቤ\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "eIRhhPqHIMpt", "colab_type": "code", "outputId": "f18ba96a-81a4-427a-ced0-33d0fdf99baa", "colab": { "base_uri": "https://localhost:8080/", "height": 68 } }, "source": [ "\n", "# Also move everything we care about to a mounted location in google drive (relevant if running in colab) at gdrive_path\n", "! cp train.* \"$gdrive_path\"\n", "! cp test.* \"$gdrive_path\"\n", "! cp dev.* \"$gdrive_path\"\n", "! cp bpe.codes.4000 \"$gdrive_path\"\n", "! ls \"$gdrive_path\"" ], "execution_count": 18, "outputs": [ { "output_type": "stream", "text": [ "bpe.codes.4000\tdev.en\t test.bpe.ti train.bpe.en\ttrain.ti\n", "dev.bpe.en\tdev.ti\t test.en\t train.bpe.ti\n", "dev.bpe.ti\ttest.bpe.en test.ti\t train.en\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "5qW0fXlfuk7Q", "colab_type": "code", "colab": {} }, "source": [ "# This creates the config file for our JoeyNMT system. It might seem overwhelming so we've provided a couple of useful parameters you'll need to update\n", "# (You can of course play with all the parameters if you'd like!)\n", "name = '%s%s' % (source_language, target_language)\n", "\n", "config = \"\"\"\n", "name: \"{name}_transformer\"\n", "\n", "data:\n", " src: \"{source_language}\"\n", " trg: \"{target_language}\"\n", " train: \"data/{name}/train.bpe\"\n", " dev: \"data/{name}/dev.bpe\"\n", " test: \"data/{name}/test.bpe\"\n", " level: \"bpe\"\n", " lowercase: False\n", " max_sent_length: 100\n", " src_vocab: \"data/{name}/vocab.txt\"\n", " trg_vocab: \"data/{name}/vocab.txt\"\n", "\n", "testing:\n", " beam_size: 5\n", " alpha: 1.0\n", "\n", "training:\n", " #load_model: \"models/{name}_transformer/12000.ckpt\" # if given, load a pre-trained model from this checkpoint\n", " random_seed: 42\n", " optimizer: \"adam\"\n", " normalization: \"tokens\"\n", " adam_betas: [0.9, 0.999] \n", " scheduling: \"noam\" # Try switching from plateau to Noam scheduling\n", " learning_rate_factor: 0.5 # factor for Noam scheduler (used with Transformer)\n", " learning_rate_warmup: 1000 # warmup steps for Noam scheduler (used with Transformer)\n", " patience: 8\n", " decrease_factor: 0.7\n", " loss: \"crossentropy\"\n", " learning_rate: 0.0002\n", " learning_rate_min: 0.00000001\n", " weight_decay: 0.0\n", " label_smoothing: 0.1\n", " batch_size: 4096\n", " batch_type: \"token\"\n", " eval_batch_size: 3600\n", " eval_batch_type: \"token\"\n", " batch_multiplier: 1\n", " early_stopping_metric: \"ppl\"\n", " epochs: 14 # TODO: Decrease for when playing around and checking of working. Around 30 is sufficient to check if its working at all\n", " validation_freq: 400 # Decrease this for testing\n", " logging_freq: 100\n", " eval_metric: \"bleu\"\n", " model_dir: \"models/{name}_transformer\"\n", " overwrite: True\n", " shuffle: True\n", " use_cuda: True\n", " max_output_length: 100\n", " print_valid_sents: [0, 1, 2, 3]\n", " keep_last_ckpts: 3\n", "\n", "model:\n", " initializer: \"xavier\"\n", " bias_initializer: \"zeros\"\n", " init_gain: 1.0\n", " embed_initializer: \"xavier\"\n", " embed_init_gain: 1.0\n", " tied_embeddings: True\n", " tied_softmax: True\n", " encoder:\n", " type: \"transformer\"\n", " num_layers: 6\n", " num_heads: 8\n", " embeddings:\n", " embedding_dim: 512\n", " scale: True\n", " dropout: 0.\n", " # typically ff_size = 4 x hidden_size\n", " hidden_size: 512\n", " ff_size: 2048\n", " dropout: 0.3\n", " decoder:\n", " type: \"transformer\"\n", " num_layers: 6\n", " num_heads: 8\n", " embeddings:\n", " embedding_dim: 512\n", " scale: True\n", " dropout: 0.\n", " # typically ff_size = 4 x hidden_size\n", " hidden_size: 512\n", " ff_size: 2048\n", " dropout: 0.3\n", "\"\"\".format(name=name, source_language=source_language, target_language=target_language)\n", "with open(\"joeynmt/configs/transformer_{name}.yaml\".format(name=name),'w') as f:\n", " f.write(config)" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "5dFwTRna7UXb", "colab_type": "code", "outputId": "6f04280c-c235-493b-b280-69ffd192fe21", "colab": { "base_uri": "https://localhost:8080/", "height": 1000 } }, "source": [ "!cd joeynmt; python3 -m joeynmt train configs/transformer_$src$tgt.yaml" ], "execution_count": 32, "outputs": [ { "output_type": "stream", "text": [ "2019-10-14 08:23:45,064 Hello! This is Joey-NMT.\n", "2019-10-14 08:23:46,749 Total params: 46436864\n", "2019-10-14 08:23:46,750 Trainable parameters: ['decoder.layer_norm.bias', 'decoder.layer_norm.weight', 'decoder.layers.0.dec_layer_norm.bias', 'decoder.layers.0.dec_layer_norm.weight', 'decoder.layers.0.feed_forward.layer_norm.bias', 'decoder.layers.0.feed_forward.layer_norm.weight', 'decoder.layers.0.feed_forward.pwff_layer.0.bias', 'decoder.layers.0.feed_forward.pwff_layer.0.weight', 'decoder.layers.0.feed_forward.pwff_layer.3.bias', 'decoder.layers.0.feed_forward.pwff_layer.3.weight', 'decoder.layers.0.src_trg_att.k_layer.bias', 'decoder.layers.0.src_trg_att.k_layer.weight', 'decoder.layers.0.src_trg_att.output_layer.bias', 'decoder.layers.0.src_trg_att.output_layer.weight', 'decoder.layers.0.src_trg_att.q_layer.bias', 'decoder.layers.0.src_trg_att.q_layer.weight', 'decoder.layers.0.src_trg_att.v_layer.bias', 'decoder.layers.0.src_trg_att.v_layer.weight', 'decoder.layers.0.trg_trg_att.k_layer.bias', 'decoder.layers.0.trg_trg_att.k_layer.weight', 'decoder.layers.0.trg_trg_att.output_layer.bias', 'decoder.layers.0.trg_trg_att.output_layer.weight', 'decoder.layers.0.trg_trg_att.q_layer.bias', 'decoder.layers.0.trg_trg_att.q_layer.weight', 'decoder.layers.0.trg_trg_att.v_layer.bias', 'decoder.layers.0.trg_trg_att.v_layer.weight', 'decoder.layers.0.x_layer_norm.bias', 'decoder.layers.0.x_layer_norm.weight', 'decoder.layers.1.dec_layer_norm.bias', 'decoder.layers.1.dec_layer_norm.weight', 'decoder.layers.1.feed_forward.layer_norm.bias', 'decoder.layers.1.feed_forward.layer_norm.weight', 'decoder.layers.1.feed_forward.pwff_layer.0.bias', 'decoder.layers.1.feed_forward.pwff_layer.0.weight', 'decoder.layers.1.feed_forward.pwff_layer.3.bias', 'decoder.layers.1.feed_forward.pwff_layer.3.weight', 'decoder.layers.1.src_trg_att.k_layer.bias', 'decoder.layers.1.src_trg_att.k_layer.weight', 'decoder.layers.1.src_trg_att.output_layer.bias', 'decoder.layers.1.src_trg_att.output_layer.weight', 'decoder.layers.1.src_trg_att.q_layer.bias', 'decoder.layers.1.src_trg_att.q_layer.weight', 'decoder.layers.1.src_trg_att.v_layer.bias', 'decoder.layers.1.src_trg_att.v_layer.weight', 'decoder.layers.1.trg_trg_att.k_layer.bias', 'decoder.layers.1.trg_trg_att.k_layer.weight', 'decoder.layers.1.trg_trg_att.output_layer.bias', 'decoder.layers.1.trg_trg_att.output_layer.weight', 'decoder.layers.1.trg_trg_att.q_layer.bias', 'decoder.layers.1.trg_trg_att.q_layer.weight', 'decoder.layers.1.trg_trg_att.v_layer.bias', 'decoder.layers.1.trg_trg_att.v_layer.weight', 'decoder.layers.1.x_layer_norm.bias', 'decoder.layers.1.x_layer_norm.weight', 'decoder.layers.2.dec_layer_norm.bias', 'decoder.layers.2.dec_layer_norm.weight', 'decoder.layers.2.feed_forward.layer_norm.bias', 'decoder.layers.2.feed_forward.layer_norm.weight', 'decoder.layers.2.feed_forward.pwff_layer.0.bias', 'decoder.layers.2.feed_forward.pwff_layer.0.weight', 'decoder.layers.2.feed_forward.pwff_layer.3.bias', 'decoder.layers.2.feed_forward.pwff_layer.3.weight', 'decoder.layers.2.src_trg_att.k_layer.bias', 'decoder.layers.2.src_trg_att.k_layer.weight', 'decoder.layers.2.src_trg_att.output_layer.bias', 'decoder.layers.2.src_trg_att.output_layer.weight', 'decoder.layers.2.src_trg_att.q_layer.bias', 'decoder.layers.2.src_trg_att.q_layer.weight', 'decoder.layers.2.src_trg_att.v_layer.bias', 'decoder.layers.2.src_trg_att.v_layer.weight', 'decoder.layers.2.trg_trg_att.k_layer.bias', 'decoder.layers.2.trg_trg_att.k_layer.weight', 'decoder.layers.2.trg_trg_att.output_layer.bias', 'decoder.layers.2.trg_trg_att.output_layer.weight', 'decoder.layers.2.trg_trg_att.q_layer.bias', 'decoder.layers.2.trg_trg_att.q_layer.weight', 'decoder.layers.2.trg_trg_att.v_layer.bias', 'decoder.layers.2.trg_trg_att.v_layer.weight', 'decoder.layers.2.x_layer_norm.bias', 'decoder.layers.2.x_layer_norm.weight', 'decoder.layers.3.dec_layer_norm.bias', 'decoder.layers.3.dec_layer_norm.weight', 'decoder.layers.3.feed_forward.layer_norm.bias', 'decoder.layers.3.feed_forward.layer_norm.weight', 'decoder.layers.3.feed_forward.pwff_layer.0.bias', 'decoder.layers.3.feed_forward.pwff_layer.0.weight', 'decoder.layers.3.feed_forward.pwff_layer.3.bias', 'decoder.layers.3.feed_forward.pwff_layer.3.weight', 'decoder.layers.3.src_trg_att.k_layer.bias', 'decoder.layers.3.src_trg_att.k_layer.weight', 'decoder.layers.3.src_trg_att.output_layer.bias', 'decoder.layers.3.src_trg_att.output_layer.weight', 'decoder.layers.3.src_trg_att.q_layer.bias', 'decoder.layers.3.src_trg_att.q_layer.weight', 'decoder.layers.3.src_trg_att.v_layer.bias', 'decoder.layers.3.src_trg_att.v_layer.weight', 'decoder.layers.3.trg_trg_att.k_layer.bias', 'decoder.layers.3.trg_trg_att.k_layer.weight', 'decoder.layers.3.trg_trg_att.output_layer.bias', 'decoder.layers.3.trg_trg_att.output_layer.weight', 'decoder.layers.3.trg_trg_att.q_layer.bias', 'decoder.layers.3.trg_trg_att.q_layer.weight', 'decoder.layers.3.trg_trg_att.v_layer.bias', 'decoder.layers.3.trg_trg_att.v_layer.weight', 'decoder.layers.3.x_layer_norm.bias', 'decoder.layers.3.x_layer_norm.weight', 'decoder.layers.4.dec_layer_norm.bias', 'decoder.layers.4.dec_layer_norm.weight', 'decoder.layers.4.feed_forward.layer_norm.bias', 'decoder.layers.4.feed_forward.layer_norm.weight', 'decoder.layers.4.feed_forward.pwff_layer.0.bias', 'decoder.layers.4.feed_forward.pwff_layer.0.weight', 'decoder.layers.4.feed_forward.pwff_layer.3.bias', 'decoder.layers.4.feed_forward.pwff_layer.3.weight', 'decoder.layers.4.src_trg_att.k_layer.bias', 'decoder.layers.4.src_trg_att.k_layer.weight', 'decoder.layers.4.src_trg_att.output_layer.bias', 'decoder.layers.4.src_trg_att.output_layer.weight', 'decoder.layers.4.src_trg_att.q_layer.bias', 'decoder.layers.4.src_trg_att.q_layer.weight', 'decoder.layers.4.src_trg_att.v_layer.bias', 'decoder.layers.4.src_trg_att.v_layer.weight', 'decoder.layers.4.trg_trg_att.k_layer.bias', 'decoder.layers.4.trg_trg_att.k_layer.weight', 'decoder.layers.4.trg_trg_att.output_layer.bias', 'decoder.layers.4.trg_trg_att.output_layer.weight', 'decoder.layers.4.trg_trg_att.q_layer.bias', 'decoder.layers.4.trg_trg_att.q_layer.weight', 'decoder.layers.4.trg_trg_att.v_layer.bias', 'decoder.layers.4.trg_trg_att.v_layer.weight', 'decoder.layers.4.x_layer_norm.bias', 'decoder.layers.4.x_layer_norm.weight', 'decoder.layers.5.dec_layer_norm.bias', 'decoder.layers.5.dec_layer_norm.weight', 'decoder.layers.5.feed_forward.layer_norm.bias', 'decoder.layers.5.feed_forward.layer_norm.weight', 'decoder.layers.5.feed_forward.pwff_layer.0.bias', 'decoder.layers.5.feed_forward.pwff_layer.0.weight', 'decoder.layers.5.feed_forward.pwff_layer.3.bias', 'decoder.layers.5.feed_forward.pwff_layer.3.weight', 'decoder.layers.5.src_trg_att.k_layer.bias', 'decoder.layers.5.src_trg_att.k_layer.weight', 'decoder.layers.5.src_trg_att.output_layer.bias', 'decoder.layers.5.src_trg_att.output_layer.weight', 'decoder.layers.5.src_trg_att.q_layer.bias', 'decoder.layers.5.src_trg_att.q_layer.weight', 'decoder.layers.5.src_trg_att.v_layer.bias', 'decoder.layers.5.src_trg_att.v_layer.weight', 'decoder.layers.5.trg_trg_att.k_layer.bias', 'decoder.layers.5.trg_trg_att.k_layer.weight', 'decoder.layers.5.trg_trg_att.output_layer.bias', 'decoder.layers.5.trg_trg_att.output_layer.weight', 'decoder.layers.5.trg_trg_att.q_layer.bias', 'decoder.layers.5.trg_trg_att.q_layer.weight', 'decoder.layers.5.trg_trg_att.v_layer.bias', 'decoder.layers.5.trg_trg_att.v_layer.weight', 'decoder.layers.5.x_layer_norm.bias', 'decoder.layers.5.x_layer_norm.weight', 'encoder.layer_norm.bias', 'encoder.layer_norm.weight', 'encoder.layers.0.feed_forward.layer_norm.bias', 'encoder.layers.0.feed_forward.layer_norm.weight', 'encoder.layers.0.feed_forward.pwff_layer.0.bias', 'encoder.layers.0.feed_forward.pwff_layer.0.weight', 'encoder.layers.0.feed_forward.pwff_layer.3.bias', 'encoder.layers.0.feed_forward.pwff_layer.3.weight', 'encoder.layers.0.layer_norm.bias', 'encoder.layers.0.layer_norm.weight', 'encoder.layers.0.src_src_att.k_layer.bias', 'encoder.layers.0.src_src_att.k_layer.weight', 'encoder.layers.0.src_src_att.output_layer.bias', 'encoder.layers.0.src_src_att.output_layer.weight', 'encoder.layers.0.src_src_att.q_layer.bias', 'encoder.layers.0.src_src_att.q_layer.weight', 'encoder.layers.0.src_src_att.v_layer.bias', 'encoder.layers.0.src_src_att.v_layer.weight', 'encoder.layers.1.feed_forward.layer_norm.bias', 'encoder.layers.1.feed_forward.layer_norm.weight', 'encoder.layers.1.feed_forward.pwff_layer.0.bias', 'encoder.layers.1.feed_forward.pwff_layer.0.weight', 'encoder.layers.1.feed_forward.pwff_layer.3.bias', 'encoder.layers.1.feed_forward.pwff_layer.3.weight', 'encoder.layers.1.layer_norm.bias', 'encoder.layers.1.layer_norm.weight', 'encoder.layers.1.src_src_att.k_layer.bias', 'encoder.layers.1.src_src_att.k_layer.weight', 'encoder.layers.1.src_src_att.output_layer.bias', 'encoder.layers.1.src_src_att.output_layer.weight', 'encoder.layers.1.src_src_att.q_layer.bias', 'encoder.layers.1.src_src_att.q_layer.weight', 'encoder.layers.1.src_src_att.v_layer.bias', 'encoder.layers.1.src_src_att.v_layer.weight', 'encoder.layers.2.feed_forward.layer_norm.bias', 'encoder.layers.2.feed_forward.layer_norm.weight', 'encoder.layers.2.feed_forward.pwff_layer.0.bias', 'encoder.layers.2.feed_forward.pwff_layer.0.weight', 'encoder.layers.2.feed_forward.pwff_layer.3.bias', 'encoder.layers.2.feed_forward.pwff_layer.3.weight', 'encoder.layers.2.layer_norm.bias', 'encoder.layers.2.layer_norm.weight', 'encoder.layers.2.src_src_att.k_layer.bias', 'encoder.layers.2.src_src_att.k_layer.weight', 'encoder.layers.2.src_src_att.output_layer.bias', 'encoder.layers.2.src_src_att.output_layer.weight', 'encoder.layers.2.src_src_att.q_layer.bias', 'encoder.layers.2.src_src_att.q_layer.weight', 'encoder.layers.2.src_src_att.v_layer.bias', 'encoder.layers.2.src_src_att.v_layer.weight', 'encoder.layers.3.feed_forward.layer_norm.bias', 'encoder.layers.3.feed_forward.layer_norm.weight', 'encoder.layers.3.feed_forward.pwff_layer.0.bias', 'encoder.layers.3.feed_forward.pwff_layer.0.weight', 'encoder.layers.3.feed_forward.pwff_layer.3.bias', 'encoder.layers.3.feed_forward.pwff_layer.3.weight', 'encoder.layers.3.layer_norm.bias', 'encoder.layers.3.layer_norm.weight', 'encoder.layers.3.src_src_att.k_layer.bias', 'encoder.layers.3.src_src_att.k_layer.weight', 'encoder.layers.3.src_src_att.output_layer.bias', 'encoder.layers.3.src_src_att.output_layer.weight', 'encoder.layers.3.src_src_att.q_layer.bias', 'encoder.layers.3.src_src_att.q_layer.weight', 'encoder.layers.3.src_src_att.v_layer.bias', 'encoder.layers.3.src_src_att.v_layer.weight', 'encoder.layers.4.feed_forward.layer_norm.bias', 'encoder.layers.4.feed_forward.layer_norm.weight', 'encoder.layers.4.feed_forward.pwff_layer.0.bias', 'encoder.layers.4.feed_forward.pwff_layer.0.weight', 'encoder.layers.4.feed_forward.pwff_layer.3.bias', 'encoder.layers.4.feed_forward.pwff_layer.3.weight', 'encoder.layers.4.layer_norm.bias', 'encoder.layers.4.layer_norm.weight', 'encoder.layers.4.src_src_att.k_layer.bias', 'encoder.layers.4.src_src_att.k_layer.weight', 'encoder.layers.4.src_src_att.output_layer.bias', 'encoder.layers.4.src_src_att.output_layer.weight', 'encoder.layers.4.src_src_att.q_layer.bias', 'encoder.layers.4.src_src_att.q_layer.weight', 'encoder.layers.4.src_src_att.v_layer.bias', 'encoder.layers.4.src_src_att.v_layer.weight', 'encoder.layers.5.feed_forward.layer_norm.bias', 'encoder.layers.5.feed_forward.layer_norm.weight', 'encoder.layers.5.feed_forward.pwff_layer.0.bias', 'encoder.layers.5.feed_forward.pwff_layer.0.weight', 'encoder.layers.5.feed_forward.pwff_layer.3.bias', 'encoder.layers.5.feed_forward.pwff_layer.3.weight', 'encoder.layers.5.layer_norm.bias', 'encoder.layers.5.layer_norm.weight', 'encoder.layers.5.src_src_att.k_layer.bias', 'encoder.layers.5.src_src_att.k_layer.weight', 'encoder.layers.5.src_src_att.output_layer.bias', 'encoder.layers.5.src_src_att.output_layer.weight', 'encoder.layers.5.src_src_att.q_layer.bias', 'encoder.layers.5.src_src_att.q_layer.weight', 'encoder.layers.5.src_src_att.v_layer.bias', 'encoder.layers.5.src_src_att.v_layer.weight', 'src_embed.lut.weight']\n", "2019-10-14 08:23:49,356 cfg.name : enti_transformer\n", "2019-10-14 08:23:49,357 cfg.data.src : en\n", "2019-10-14 08:23:49,357 cfg.data.trg : ti\n", "2019-10-14 08:23:49,357 cfg.data.train : data/enti/train.bpe\n", "2019-10-14 08:23:49,357 cfg.data.dev : data/enti/dev.bpe\n", "2019-10-14 08:23:49,357 cfg.data.test : data/enti/test.bpe\n", "2019-10-14 08:23:49,357 cfg.data.level : bpe\n", "2019-10-14 08:23:49,357 cfg.data.lowercase : False\n", "2019-10-14 08:23:49,357 cfg.data.max_sent_length : 100\n", "2019-10-14 08:23:49,357 cfg.data.src_vocab : data/enti/vocab.txt\n", "2019-10-14 08:23:49,358 cfg.data.trg_vocab : data/enti/vocab.txt\n", "2019-10-14 08:23:49,358 cfg.testing.beam_size : 5\n", "2019-10-14 08:23:49,358 cfg.testing.alpha : 1.0\n", "2019-10-14 08:23:49,358 cfg.training.random_seed : 42\n", "2019-10-14 08:23:49,358 cfg.training.optimizer : adam\n", "2019-10-14 08:23:49,358 cfg.training.normalization : tokens\n", "2019-10-14 08:23:49,358 cfg.training.adam_betas : [0.9, 0.999]\n", "2019-10-14 08:23:49,358 cfg.training.scheduling : noam\n", "2019-10-14 08:23:49,358 cfg.training.learning_rate_factor : 0.5\n", "2019-10-14 08:23:49,358 cfg.training.learning_rate_warmup : 1000\n", "2019-10-14 08:23:49,359 cfg.training.patience : 8\n", "2019-10-14 08:23:49,359 cfg.training.decrease_factor : 0.7\n", "2019-10-14 08:23:49,359 cfg.training.loss : crossentropy\n", "2019-10-14 08:23:49,359 cfg.training.learning_rate : 0.0002\n", "2019-10-14 08:23:49,359 cfg.training.learning_rate_min : 1e-08\n", "2019-10-14 08:23:49,359 cfg.training.weight_decay : 0.0\n", "2019-10-14 08:23:49,359 cfg.training.label_smoothing : 0.1\n", "2019-10-14 08:23:49,359 cfg.training.batch_size : 4096\n", "2019-10-14 08:23:49,359 cfg.training.batch_type : token\n", "2019-10-14 08:23:49,359 cfg.training.eval_batch_size : 3600\n", "2019-10-14 08:23:49,360 cfg.training.eval_batch_type : token\n", "2019-10-14 08:23:49,360 cfg.training.batch_multiplier : 1\n", "2019-10-14 08:23:49,360 cfg.training.early_stopping_metric : ppl\n", "2019-10-14 08:23:49,360 cfg.training.epochs : 14\n", "2019-10-14 08:23:49,360 cfg.training.validation_freq : 400\n", "2019-10-14 08:23:49,360 cfg.training.logging_freq : 100\n", "2019-10-14 08:23:49,360 cfg.training.eval_metric : bleu\n", "2019-10-14 08:23:49,360 cfg.training.model_dir : models/enti_transformer\n", "2019-10-14 08:23:49,360 cfg.training.overwrite : True\n", "2019-10-14 08:23:49,361 cfg.training.shuffle : True\n", "2019-10-14 08:23:49,361 cfg.training.use_cuda : True\n", "2019-10-14 08:23:49,361 cfg.training.max_output_length : 100\n", "2019-10-14 08:23:49,361 cfg.training.print_valid_sents : [0, 1, 2, 3]\n", "2019-10-14 08:23:49,361 cfg.training.keep_last_ckpts : 3\n", "2019-10-14 08:23:49,361 cfg.model.initializer : xavier\n", "2019-10-14 08:23:49,361 cfg.model.bias_initializer : zeros\n", "2019-10-14 08:23:49,361 cfg.model.init_gain : 1.0\n", "2019-10-14 08:23:49,361 cfg.model.embed_initializer : xavier\n", "2019-10-14 08:23:49,361 cfg.model.embed_init_gain : 1.0\n", "2019-10-14 08:23:49,362 cfg.model.tied_embeddings : True\n", "2019-10-14 08:23:49,362 cfg.model.tied_softmax : True\n", "2019-10-14 08:23:49,362 cfg.model.encoder.type : transformer\n", "2019-10-14 08:23:49,362 cfg.model.encoder.num_layers : 6\n", "2019-10-14 08:23:49,362 cfg.model.encoder.num_heads : 8\n", "2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.embedding_dim : 512\n", "2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.scale : True\n", "2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.dropout : 0.0\n", "2019-10-14 08:23:49,362 cfg.model.encoder.hidden_size : 512\n", "2019-10-14 08:23:49,362 cfg.model.encoder.ff_size : 2048\n", "2019-10-14 08:23:49,362 cfg.model.encoder.dropout : 0.3\n", "2019-10-14 08:23:49,363 cfg.model.decoder.type : transformer\n", "2019-10-14 08:23:49,363 cfg.model.decoder.num_layers : 6\n", "2019-10-14 08:23:49,363 cfg.model.decoder.num_heads : 8\n", "2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.embedding_dim : 512\n", "2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.scale : True\n", "2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.dropout : 0.0\n", "2019-10-14 08:23:49,363 cfg.model.decoder.hidden_size : 512\n", "2019-10-14 08:23:49,363 cfg.model.decoder.ff_size : 2048\n", "2019-10-14 08:23:49,363 cfg.model.decoder.dropout : 0.3\n", "2019-10-14 08:23:49,363 Data set sizes: \n", "\ttrain 29019,\n", "\tvalid 1001,\n", "\ttest 1001\n", "2019-10-14 08:23:49,364 First training example:\n", "\t[SRC] s@@ our@@ ce@@ _@@ sen@@ ten@@ ce\n", "\t[TRG] tar@@ ge@@ t@@ _@@ sen@@ ten@@ ce\n", "2019-10-14 08:23:49,364 First 10 words (src): (0) (1) (2) (3) (4) the (5) and (6) of (7) to (8) ኣብ (9) ን@@\n", "2019-10-14 08:23:49,364 First 10 words (trg): (0) (1) (2) (3) (4) the (5) and (6) of (7) to (8) ኣብ (9) ን@@\n", "2019-10-14 08:23:49,364 Number of Src words (types): 4485\n", "2019-10-14 08:23:49,365 Number of Trg words (types): 4485\n", "2019-10-14 08:23:49,365 Model(\n", "\tencoder=TransformerEncoder(num_layers=6, num_heads=8),\n", "\tdecoder=TransformerDecoder(num_layers=6, num_heads=8),\n", "\tsrc_embed=Embeddings(embedding_dim=512, vocab_size=4485),\n", "\ttrg_embed=Embeddings(embedding_dim=512, vocab_size=4485))\n", "2019-10-14 08:23:49,370 EPOCH 1\n", "2019-10-14 08:25:06,118 Epoch 1 Step: 100 Batch Loss: 6.159533 Tokens per Sec: 3732, Lr: 0.000070\n", "2019-10-14 08:26:23,458 Epoch 1 Step: 200 Batch Loss: 5.913614 Tokens per Sec: 7419, Lr: 0.000140\n", "2019-10-14 08:27:40,396 Epoch 1 Step: 300 Batch Loss: 5.648499 Tokens per Sec: 11180, Lr: 0.000210\n", "2019-10-14 08:28:21,864 Epoch 1: total training loss 2157.89\n", "2019-10-14 08:28:21,865 EPOCH 2\n", "2019-10-14 08:28:56,219 Epoch 2 Step: 400 Batch Loss: 5.438910 Tokens per Sec: 3732, Lr: 0.000280\n", "2019-10-14 08:33:01,784 Hooray! New best validation result [ppl]!\n", "2019-10-14 08:33:01,784 Saving new checkpoint.\n", "2019-10-14 08:33:03,257 Example #0\n", "2019-10-14 08:33:03,258 \tSource: source_sentence\n", "2019-10-14 08:33:03,258 \tReference: target_sentence\n", "2019-10-14 08:33:03,258 \tHypothesis: 9\n", "2019-10-14 08:33:03,258 Example #1\n", "2019-10-14 08:33:03,258 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 08:33:03,258 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 08:33:03,259 \tHypothesis: 9 እቲ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ\n", "2019-10-14 08:33:03,259 Example #2\n", "2019-10-14 08:33:03,259 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 08:33:03,259 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 08:33:03,259 \tHypothesis: 9 እቲ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ\n", "2019-10-14 08:33:03,259 Example #3\n", "2019-10-14 08:33:03,259 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 08:33:03,259 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 08:33:03,259 \tHypothesis: 9 “““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““@@\n", "2019-10-14 08:33:03,260 Validation result at epoch 2, step 400: bleu: 0.00, loss: 183016.1094, ppl: 227.8050, duration: 247.0400s\n", "2019-10-14 08:34:20,472 Epoch 2 Step: 500 Batch Loss: 4.910177 Tokens per Sec: 5355, Lr: 0.000349\n", "2019-10-14 08:35:38,191 Epoch 2 Step: 600 Batch Loss: 5.056447 Tokens per Sec: 9060, Lr: 0.000419\n", "2019-10-14 08:36:55,416 Epoch 2 Step: 700 Batch Loss: 4.794687 Tokens per Sec: 12860, Lr: 0.000489\n", "2019-10-14 08:37:00,926 Epoch 2: total training loss 1809.58\n", "2019-10-14 08:37:00,926 EPOCH 3\n", "2019-10-14 08:38:12,279 Epoch 3 Step: 800 Batch Loss: 4.730673 Tokens per Sec: 3730, Lr: 0.000559\n", "2019-10-14 08:42:16,893 Hooray! New best validation result [ppl]!\n", "2019-10-14 08:42:16,893 Saving new checkpoint.\n", "2019-10-14 08:42:18,489 Example #0\n", "2019-10-14 08:42:18,490 \tSource: source_sentence\n", "2019-10-14 08:42:18,490 \tReference: target_sentence\n", "2019-10-14 08:42:18,490 \tHypothesis: 10 ንንቝራታ ድማ ንቝራይ፡+@@\n", "2019-10-14 08:42:18,490 Example #1\n", "2019-10-14 08:42:18,490 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 08:42:18,491 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 08:42:18,491 \tHypothesis: 10 ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ንየሆዋ፡ ንየሆዋ፡ ንንንንንጊልያይ ንንንንዴታታታታታታታታታታም ከፈ።\n", "2019-10-14 08:42:18,491 Example #2\n", "2019-10-14 08:42:18,491 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 08:42:18,491 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 08:42:18,491 \tHypothesis: 10 ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ\n", "2019-10-14 08:42:18,492 Example #3\n", "2019-10-14 08:42:18,492 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 08:42:18,492 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 08:42:18,492 \tHypothesis: 10 ግናኸ፡ ንሓቂ ኣምላኽ ኣምላኽ ኣምላኽ ኣምላኽ ኣምላኽ ንኣምላኽ ንኣምላኽ ንኣምላኽ ንኣምላኽ ንንሓቂ ኣምላኽ ኣምላኽ ይፈ።+\n", "2019-10-14 08:42:18,492 Validation result at epoch 3, step 800: bleu: 0.00, loss: 161773.6719, ppl: 121.3176, duration: 246.2125s\n", "2019-10-14 08:43:35,099 Epoch 3 Step: 900 Batch Loss: 3.668467 Tokens per Sec: 7191, Lr: 0.000629\n", "2019-10-14 08:44:52,535 Epoch 3 Step: 1000 Batch Loss: 4.109991 Tokens per Sec: 10852, Lr: 0.000699\n", "2019-10-14 08:45:38,962 Epoch 3: total training loss 1559.18\n", "2019-10-14 08:45:38,962 EPOCH 4\n", "2019-10-14 08:46:10,055 Epoch 4 Step: 1100 Batch Loss: 3.997961 Tokens per Sec: 3734, Lr: 0.000666\n", "2019-10-14 08:47:25,884 Epoch 4 Step: 1200 Batch Loss: 3.732101 Tokens per Sec: 5265, Lr: 0.000638\n", "2019-10-14 08:51:30,309 Hooray! New best validation result [ppl]!\n", "2019-10-14 08:51:30,309 Saving new checkpoint.\n", "2019-10-14 08:51:32,031 Example #0\n", "2019-10-14 08:51:32,032 \tSource: source_sentence\n", "2019-10-14 08:51:32,032 \tReference: target_sentence\n", "2019-10-14 08:51:32,032 \tHypothesis: 2 ንእስማዊ ንእስማዊ ንቋታት ይፈትልን\n", "2019-10-14 08:51:32,032 Example #1\n", "2019-10-14 08:51:32,032 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 08:51:32,032 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 08:51:32,032 \tHypothesis: 3 ንእስማማታታን-ማርያ፡ ንእስማማታን*+ እቲ ናይ ሓቂ ኣምላኽ ዝለኣኸኒ ዝሰምዓሉ ዝለኣኸኒ ዝሰምዐ ዘለኹ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ\n", "2019-10-14 08:51:32,032 Example #2\n", "2019-10-14 08:51:32,033 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 08:51:32,033 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 08:51:32,033 \tHypothesis: 3 ኣብ መንጎ እቶም ኣብ መንጎ እቶም ኣብ መንጎ ነገስታት ይሁዳ ዝነበሩ ዘክዐት ዘክሪ ዘርእሰይ ዘርእሰይ ኣብ መንጎ ኣህዛብ ኣብ መንጎ ኣህዛብ ኣብ መንጎ ጸላእተይ እተፈጸጸይ እተፈጸጸም እየ።+\n", "2019-10-14 08:51:32,033 Example #3\n", "2019-10-14 08:51:32,033 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 08:51:32,033 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 08:51:32,033 \tHypothesis: 8 ግናኸ፡ ኣምላኽ ካብ ኣሕዋቱ ምስ ረኣየ፡ ካብ ወዲ ሰብ ኣቦታቱ ንወዱ ኣእምሮ ኣሎ እሞ ንእስነቱ ኸም ዝረኣየ፡\n", "2019-10-14 08:51:32,033 Validation result at epoch 4, step 1200: bleu: 0.00, loss: 139968.5938, ppl: 63.5385, duration: 246.1486s\n", "2019-10-14 08:52:49,023 Epoch 4 Step: 1300 Batch Loss: 3.654617 Tokens per Sec: 8909, Lr: 0.000613\n", "2019-10-14 08:54:05,614 Epoch 4 Step: 1400 Batch Loss: 3.651653 Tokens per Sec: 12698, Lr: 0.000591\n", "2019-10-14 08:54:16,692 Epoch 4: total training loss 1331.35\n", "2019-10-14 08:54:16,692 EPOCH 5\n", "2019-10-14 08:55:22,134 Epoch 5 Step: 1500 Batch Loss: 3.398286 Tokens per Sec: 3735, Lr: 0.000571\n", "2019-10-14 08:56:38,664 Epoch 5 Step: 1600 Batch Loss: 3.338879 Tokens per Sec: 6927, Lr: 0.000552\n", "2019-10-14 09:00:42,734 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:00:42,734 Saving new checkpoint.\n", "2019-10-14 09:00:44,312 Example #0\n", "2019-10-14 09:00:44,313 \tSource: source_sentence\n", "2019-10-14 09:00:44,313 \tReference: target_sentence\n", "2019-10-14 09:00:44,313 \tHypothesis: 11 ንእስነቱ፡\n", "2019-10-14 09:00:44,313 Example #1\n", "2019-10-14 09:00:44,313 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:00:44,313 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:00:44,313 \tHypothesis: 17 እቲ ኻብ መጀመርታ ዝሰምዓኒ ዅሉ እቲ ናይ ሓቂ ኣምላኽ ዝዛረብኩ፡+ ኣብ እስራኤል እውን ተመላለሱ፣\n", "2019-10-14 09:00:44,314 Example #2\n", "2019-10-14 09:00:44,314 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:00:44,314 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:00:44,314 \tHypothesis: 17 ኣነ ኸኣ ብብዙሓት ኣህዛብ ኣብ ቅድሚ ኣዒንተይ ኣብ ቅድሚ ኣዒንተይ ኣብ ምድሪ ኸም ዝዀንኩ እፈልጥ እየ።+\n", "2019-10-14 09:00:44,314 Example #3\n", "2019-10-14 09:00:44,314 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:00:44,314 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:00:44,315 \tHypothesis: 17 ኣምላኽ ግና ካብ ወዲ ሰብ ካብ መጀመርታ ምስ ተሰሪበ ግና፡ ብጸጋይ ተመሲሩ ኣሎ።+\n", "2019-10-14 09:00:44,315 Validation result at epoch 5, step 1600: bleu: 0.39, loss: 126149.8125, ppl: 42.1723, duration: 245.6507s\n", "2019-10-14 09:02:01,384 Epoch 5 Step: 1700 Batch Loss: 2.980851 Tokens per Sec: 10601, Lr: 0.000536\n", "2019-10-14 09:02:53,599 Epoch 5: total training loss 1155.96\n", "2019-10-14 09:02:53,599 EPOCH 6\n", "2019-10-14 09:03:17,958 Epoch 6 Step: 1800 Batch Loss: 3.127846 Tokens per Sec: 3778, Lr: 0.000521\n", "2019-10-14 09:04:34,270 Epoch 6 Step: 1900 Batch Loss: 3.005094 Tokens per Sec: 4936, Lr: 0.000507\n", "2019-10-14 09:05:51,483 Epoch 6 Step: 2000 Batch Loss: 2.842878 Tokens per Sec: 8635, Lr: 0.000494\n", "2019-10-14 09:09:55,625 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:09:55,625 Saving new checkpoint.\n", "2019-10-14 09:09:57,259 Example #0\n", "2019-10-14 09:09:57,260 \tSource: source_sentence\n", "2019-10-14 09:09:57,260 \tReference: target_sentence\n", "2019-10-14 09:09:57,260 \tHypothesis: 14 ኣብ ልዕሊ እቲ መኣዲ ዘሎ መዕቈብቲ ይመርሕ፣\n", "2019-10-14 09:09:57,260 Example #1\n", "2019-10-14 09:09:57,260 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:09:57,260 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:09:57,260 \tHypothesis: 13 እምበኣር፡ እቲ ኣብ ቅድሚ ኣምላኽ ዚሰምዕ ዝነበረ ዅሉ እቲ ኣብ ጉባኤ ኣምላኽ ዚፈርህን ዚገብሮ ዝነበረ ዅሉ እቲ ልዑል ኣምላኽ ዝረኣኽዎ ቓል ሰሚዕኩም ኣለኹ፣+\n", "2019-10-14 09:09:57,261 Example #2\n", "2019-10-14 09:09:57,261 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:09:57,261 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:09:57,261 \tHypothesis: 14 ኣነ ኸኣ ብሞት እተመላለሰ፡ ብብዙሓት ኣህዛብ እውን ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ተመላለሰ።+\n", "2019-10-14 09:09:57,261 Example #3\n", "2019-10-14 09:09:57,261 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:09:57,261 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:09:57,262 \tHypothesis: 15 ግናኸ፡ ኣምላኽ ካብ ኣቦ፡ ካብ ኣቦ፡ ካብ ጸጋ ጸሊአ፣+\n", "2019-10-14 09:09:57,262 Validation result at epoch 6, step 2000: bleu: 0.77, loss: 117405.4062, ppl: 32.5375, duration: 245.7781s\n", "2019-10-14 09:11:13,651 Epoch 6 Step: 2100 Batch Loss: 3.094540 Tokens per Sec: 12467, Lr: 0.000482\n", "2019-10-14 09:11:30,059 Epoch 6: total training loss 1047.26\n", "2019-10-14 09:11:30,059 EPOCH 7\n", "2019-10-14 09:12:30,083 Epoch 7 Step: 2200 Batch Loss: 2.779240 Tokens per Sec: 3753, Lr: 0.000471\n", "2019-10-14 09:13:46,654 Epoch 7 Step: 2300 Batch Loss: 2.685841 Tokens per Sec: 6669, Lr: 0.000461\n", "2019-10-14 09:15:03,444 Epoch 7 Step: 2400 Batch Loss: 2.575554 Tokens per Sec: 10374, Lr: 0.000451\n", "2019-10-14 09:19:07,614 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:19:07,615 Saving new checkpoint.\n", "2019-10-14 09:19:09,250 Example #0\n", "2019-10-14 09:19:09,251 \tSource: source_sentence\n", "2019-10-14 09:19:09,251 \tReference: target_sentence\n", "2019-10-14 09:19:09,251 \tHypothesis: 21 ስለዚ፡ ንሰንከርቲ፡\n", "2019-10-14 09:19:09,251 Example #1\n", "2019-10-14 09:19:09,252 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:19:09,252 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:19:09,252 \tHypothesis: 13 ብዛዕባ እቲ ጉባኤ ኣብ የሩሳሌም ዚቕመጥ ዝነበረ ቓል ኣምላኽ ከም ዝሰምዕዎ ምስ ሰማዕኩ፡ ነቲ ጉባኤ ኣምላኽ ዚፈርህዎ ስርዓት ኪነግረኩም ኢሉ ኸም ዝሰምዕዎ ትፈልጡ ኢኹም።+\n", "2019-10-14 09:19:09,252 Example #2\n", "2019-10-14 09:19:09,252 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:19:09,252 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:19:09,253 \tHypothesis: 14 ኣብ ሰማርያ ኸኣ ብብዙሕ ኣህዛብ ብብዙሕ ኣህዛብ ብብዙሕ ኣህዛብ ተመላለሰ፣ ኣነ ኸኣ ካብ ምድሪ ኣቦታተይ ዘውጽኣኒ እዩ።+\n", "2019-10-14 09:19:09,253 Example #3\n", "2019-10-14 09:19:09,253 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:19:09,253 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:19:09,253 \tHypothesis: 15 እቲ ኣምላኽ ካብ ኣቦታተይ ዘውጽኣኒ ኣምላኽ ምስ ረኣየ፡ ብጸጋ ጸኒዑ ተመላለሰኒ።+\n", "2019-10-14 09:19:09,253 Validation result at epoch 7, step 2400: bleu: 1.04, loss: 111665.2969, ppl: 27.4436, duration: 245.8089s\n", "2019-10-14 09:20:07,061 Epoch 7: total training loss 954.59\n", "2019-10-14 09:20:07,061 EPOCH 8\n", "2019-10-14 09:20:25,077 Epoch 8 Step: 2500 Batch Loss: 2.945509 Tokens per Sec: 3740, Lr: 0.000442\n", "2019-10-14 09:21:41,497 Epoch 8 Step: 2600 Batch Loss: 1.804559 Tokens per Sec: 4612, Lr: 0.000433\n", "2019-10-14 09:22:58,325 Epoch 8 Step: 2700 Batch Loss: 2.855116 Tokens per Sec: 8337, Lr: 0.000425\n", "2019-10-14 09:24:15,242 Epoch 8 Step: 2800 Batch Loss: 2.348850 Tokens per Sec: 12048, Lr: 0.000418\n", "2019-10-14 09:28:19,491 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:28:19,491 Saving new checkpoint.\n", "2019-10-14 09:28:21,023 Example #0\n", "2019-10-14 09:28:21,024 \tSource: source_sentence\n", "2019-10-14 09:28:21,024 \tReference: target_sentence\n", "2019-10-14 09:28:21,024 \tHypothesis: 21 ኣብ ራብዐይቲ መዓልቲ፡ ቅርጽ፡\n", "2019-10-14 09:28:21,024 Example #1\n", "2019-10-14 09:28:21,024 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:28:21,024 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:28:21,024 \tHypothesis: 13 ብዛዕባ እቲ ኣብ ቅድሚ ኣምላኽ ዚቕመጥ ዝነበረ ቓል ከም ዝሰምዖ ምስ ሰማዕካ፡ እቲ ናይ ሓቂ ኣምላኽ ከም ዝቘረጸ ሰሚዕካ ኣለኹ፣\n", "2019-10-14 09:28:21,025 Example #2\n", "2019-10-14 09:28:21,025 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:28:21,025 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:28:21,025 \tHypothesis: 14 ካብ ኣህዛብ ከኣ ብዙሕ መሬት ከም ዝረኸሰ ኽፍኣት ከለኹ፡ ካብ ኣህዛብ ከም ዝምብዛሕትኦም ኣብ ቅድሚ ኣዒንተይ ተራእየ።+\n", "2019-10-14 09:28:21,025 Example #3\n", "2019-10-14 09:28:21,025 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:28:21,025 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:28:21,026 \tHypothesis: 15 እቲ ኣምላኽ ካብ ኣዲኡ ምስ ኣደ ግና፡ ብጸጋ ጸኒዑኒ ጸሊሙኒ እዩ፣+\n", "2019-10-14 09:28:21,026 Validation result at epoch 8, step 2800: bleu: 1.35, loss: 108688.3906, ppl: 25.1243, duration: 245.7829s\n", "2019-10-14 09:28:44,067 Epoch 8: total training loss 881.33\n", "2019-10-14 09:28:44,067 EPOCH 9\n", "2019-10-14 09:29:38,009 Epoch 9 Step: 2900 Batch Loss: 1.543829 Tokens per Sec: 3725, Lr: 0.000410\n", "2019-10-14 09:30:54,689 Epoch 9 Step: 3000 Batch Loss: 2.273299 Tokens per Sec: 6357, Lr: 0.000403\n", "2019-10-14 09:32:11,763 Epoch 9 Step: 3100 Batch Loss: 2.011267 Tokens per Sec: 10073, Lr: 0.000397\n", "2019-10-14 09:33:15,323 Epoch 9: total training loss 815.74\n", "2019-10-14 09:33:15,323 EPOCH 10\n", "2019-10-14 09:33:27,753 Epoch 10 Step: 3200 Batch Loss: 2.297024 Tokens per Sec: 3777, Lr: 0.000391\n", "2019-10-14 09:37:31,865 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:37:31,865 Saving new checkpoint.\n", "2019-10-14 09:37:33,355 Example #0\n", "2019-10-14 09:37:33,356 \tSource: source_sentence\n", "2019-10-14 09:37:33,356 \tReference: target_sentence\n", "2019-10-14 09:37:33,356 \tHypothesis: 21 ኣብ መወዳእታ እቲ ቦታ ኸኣ መጠንቀቕታ ይኹነልኩ፣\n", "2019-10-14 09:37:33,356 Example #1\n", "2019-10-14 09:37:33,356 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:37:33,356 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:37:33,356 \tHypothesis: 13 ብዛዕባ እቲ ኣምላኽ ንሲዶናውያን ዘሕጥኣሉ ግዜ ኣብ ቅድመይ ከም ዘሕጥኣኩም ሰሚዕኩም ኣለኹ፣+\n", "2019-10-14 09:37:33,356 Example #2\n", "2019-10-14 09:37:33,357 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:37:33,357 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:37:33,357 \tHypothesis: 14 ኣብ ይሁዳ ድማ ከም ዘስተንክዎም ኣህዛብ ስለ ዝፈለጥክዋ፡ ኣብ ይሁዳ እውን ብዙሕ ስለ ዝጸንሐ፡ ኣብ ይሁዳ ተኣምራትን ኣዝዩ ዓብዪ እዩ።+\n", "2019-10-14 09:37:33,357 Example #3\n", "2019-10-14 09:37:33,357 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:37:33,357 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:37:33,357 \tHypothesis: 15 ግናኸ፡ ኣምላኽ ካብ ኣደይ ምስ ጠመተ፡ ብጸጋ ጸኒሑ፡ ብጸጋ እውን ጸኒሑ፡+ ብጸጋ ጸኒሑኒ እውን ተጸሊሙኒ ነይሩኒ።+\n", "2019-10-14 09:37:33,357 Validation result at epoch 10, step 3200: bleu: 1.47, loss: 105395.8672, ppl: 22.7867, duration: 245.6044s\n", "2019-10-14 09:38:49,512 Epoch 10 Step: 3300 Batch Loss: 2.357734 Tokens per Sec: 4368, Lr: 0.000385\n", "2019-10-14 09:40:06,645 Epoch 10 Step: 3400 Batch Loss: 2.163139 Tokens per Sec: 8054, Lr: 0.000379\n", "2019-10-14 09:41:23,740 Epoch 10 Step: 3500 Batch Loss: 2.291968 Tokens per Sec: 11795, Lr: 0.000374\n", "2019-10-14 09:41:51,872 Epoch 10: total training loss 763.60\n", "2019-10-14 09:41:51,872 EPOCH 11\n", "2019-10-14 09:42:39,245 Epoch 11 Step: 3600 Batch Loss: 2.102899 Tokens per Sec: 3727, Lr: 0.000368\n", "2019-10-14 09:46:43,305 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:46:43,306 Saving new checkpoint.\n", "2019-10-14 09:46:44,887 Example #0\n", "2019-10-14 09:46:44,888 \tSource: source_sentence\n", "2019-10-14 09:46:44,888 \tReference: target_sentence\n", "2019-10-14 09:46:44,888 \tHypothesis: 21 ኣብ መወዳእታ እቲ መሬት ከኣ፡\n", "2019-10-14 09:46:44,888 Example #1\n", "2019-10-14 09:46:44,888 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:46:44,888 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:46:44,888 \tHypothesis: 13 ብዛዕባ እቲ ኣምላኽ ዘዳለወሉ ግዜ፡ ኣብ ቅድሚ እቲ ጉባኤ ኣምላኽ ዘዳለወሉ ጽሑፍ ምእንቲ ኺፍጸም ሰሚዕኩም ኣለኹ፣+\n", "2019-10-14 09:46:44,888 Example #2\n", "2019-10-14 09:46:44,889 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:46:44,889 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:46:44,889 \tHypothesis: 14 ኣነ ድማ ካብ ኣህዛብ ከም ዘማተ፡ ኣብ ቅድሚ ኣዒንተይ ብዙሕ መድሓኒ ነይሩ፣ ከመይሲ፡ ኣነ ኣቦታተይ ኣቦይ ኣቦይ እየ።+\n", "2019-10-14 09:46:44,889 Example #3\n", "2019-10-14 09:46:44,889 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:46:44,889 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:46:44,889 \tHypothesis: 15 ግናኸ፡ እቲ ኻብ ኣዋልድ ዘፍቅረኒ ኣምላኽ ምስ ተጸዓኒ፡ ብጸጋ ጸኒሑ፡+\n", "2019-10-14 09:46:44,889 Validation result at epoch 11, step 3600: bleu: 1.91, loss: 103506.2734, ppl: 21.5446, duration: 245.6436s\n", "2019-10-14 09:48:01,302 Epoch 11 Step: 3700 Batch Loss: 1.711409 Tokens per Sec: 6044, Lr: 0.000363\n", "2019-10-14 09:49:17,660 Epoch 11 Step: 3800 Batch Loss: 2.023492 Tokens per Sec: 9801, Lr: 0.000358\n", "2019-10-14 09:50:28,407 Epoch 11: total training loss 717.82\n", "2019-10-14 09:50:28,407 EPOCH 12\n", "2019-10-14 09:50:34,734 Epoch 12 Step: 3900 Batch Loss: 1.765519 Tokens per Sec: 3738, Lr: 0.000354\n", "2019-10-14 09:51:51,742 Epoch 12 Step: 4000 Batch Loss: 2.033462 Tokens per Sec: 4051, Lr: 0.000349\n", "2019-10-14 09:55:55,897 Hooray! New best validation result [ppl]!\n", "2019-10-14 09:55:55,898 Saving new checkpoint.\n", "2019-10-14 09:55:57,410 Example #0\n", "2019-10-14 09:55:57,411 \tSource: source_sentence\n", "2019-10-14 09:55:57,411 \tReference: target_sentence\n", "2019-10-14 09:55:57,411 \tHypothesis: 21 ኣብ ራብዓይ ከኣ፡\n", "2019-10-14 09:55:57,411 Example #1\n", "2019-10-14 09:55:57,412 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 09:55:57,412 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 09:55:57,412 \tHypothesis: 13 ብዛዕባ እዚ ምስ ሰማዕካ፡ ኣብ ቂሳይም+ ናይ ኣምላኽ ራእይ ከም ዘጕረምረምክዎ ትሓስቡ ኣለኹ፣+\n", "2019-10-14 09:55:57,412 Example #2\n", "2019-10-14 09:55:57,412 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 09:55:57,412 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 09:55:57,412 \tHypothesis: 14 ኣብ ይሁዳ ኸኣ ብዙሓት ኣህዛብ ከም ዘጥረኹሉ እዋን፡ ኣብ ይሁዳ እውን ከም ዘጥረኹሉ እዋን፡ ኣብ ይሁዳ እውን ብዙሕ መዓልትታት ኰይነ።+\n", "2019-10-14 09:55:57,413 Example #3\n", "2019-10-14 09:55:57,413 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 09:55:57,413 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 09:55:57,413 \tHypothesis: 15 እቲ ኻብ ኣዋልድ ዘፍቀርኒ ኣምላኽ ምስ ኣተወ ግና፡ ብጸጋ ጸኒሑ፡+ ብጸጋ እውን ብጽቡቕ እተተሓጸበ ፍቕሪ ተጸብየ፣+\n", "2019-10-14 09:55:57,413 Validation result at epoch 12, step 4000: bleu: 2.39, loss: 101183.3203, ppl: 20.1102, duration: 245.6711s\n", "2019-10-14 09:57:13,844 Epoch 12 Step: 4100 Batch Loss: 1.669955 Tokens per Sec: 7811, Lr: 0.000345\n", "2019-10-14 09:58:30,400 Epoch 12 Step: 4200 Batch Loss: 1.671719 Tokens per Sec: 11544, Lr: 0.000341\n", "2019-10-14 09:59:05,190 Epoch 12: total training loss 675.16\n", "2019-10-14 09:59:05,190 EPOCH 13\n", "2019-10-14 09:59:46,496 Epoch 13 Step: 4300 Batch Loss: 2.024124 Tokens per Sec: 3698, Lr: 0.000337\n", "2019-10-14 10:01:03,035 Epoch 13 Step: 4400 Batch Loss: 1.760886 Tokens per Sec: 5728, Lr: 0.000333\n", "2019-10-14 10:05:07,181 Hooray! New best validation result [ppl]!\n", "2019-10-14 10:05:07,182 Saving new checkpoint.\n", "2019-10-14 10:05:08,793 Example #0\n", "2019-10-14 10:05:08,793 \tSource: source_sentence\n", "2019-10-14 10:05:08,793 \tReference: target_sentence\n", "2019-10-14 10:05:08,793 \tHypothesis: 21 ኣብ ልዕሊኡ ኸኣ መጋረጃ ምስክር፡\n", "2019-10-14 10:05:08,793 Example #1\n", "2019-10-14 10:05:08,794 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 10:05:08,794 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 10:05:08,794 \tHypothesis: 13 ብዛዕባ እቲ ኣብ ይሁዳ ዘንብረሉ ጽዩፋት ጽሑፍ* ዝሰማዕክዎ ምስ ሰማዕኩ፡ ነቲ ጉባኤ ኣምላኽ ዘዳለኹ ኣብ ቅድመይ ተነስዐ፣+\n", "2019-10-14 10:05:08,794 Example #2\n", "2019-10-14 10:05:08,795 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 10:05:08,795 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 10:05:08,795 \tHypothesis: 14 ኣብ ይሁዳ ድማ ካብ ኣህዛብ ከም ዘስተንክየኒ መሲልጶስታ፡ ኣብ እስራኤል እውን ከም ዘስተንክር ኰይነ ተኣምራትን ኰይነ ነይረ።+\n", "2019-10-14 10:05:08,795 Example #3\n", "2019-10-14 10:05:08,795 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 10:05:08,795 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 10:05:08,796 \tHypothesis: 15 እቲ ኻብ ኣዋልድ ዘፍቅረኒ ኣምላኽ ግና ካብ ማሕጸን ካብ ማሕጸን ምስ ተጸመ፡ ብጸጋ ጸኒዑ እውን እተዋህበኒ ኣምላኽ፡+\n", "2019-10-14 10:05:08,796 Validation result at epoch 13, step 4400: bleu: 2.61, loss: 100581.0547, ppl: 19.7541, duration: 245.7603s\n", "2019-10-14 10:06:25,677 Epoch 13 Step: 4500 Batch Loss: 1.769073 Tokens per Sec: 9437, Lr: 0.000329\n", "2019-10-14 10:07:42,333 Epoch 13 Step: 4600 Batch Loss: 1.806818 Tokens per Sec: 13207, Lr: 0.000326\n", "2019-10-14 10:07:42,335 Epoch 13: total training loss 637.38\n", "2019-10-14 10:07:42,336 EPOCH 14\n", "2019-10-14 10:08:59,576 Epoch 14 Step: 4700 Batch Loss: 1.820173 Tokens per Sec: 3750, Lr: 0.000322\n", "2019-10-14 10:10:16,355 Epoch 14 Step: 4800 Batch Loss: 1.656994 Tokens per Sec: 7522, Lr: 0.000319\n", "2019-10-14 10:14:20,685 Hooray! New best validation result [ppl]!\n", "2019-10-14 10:14:20,685 Saving new checkpoint.\n", "2019-10-14 10:14:22,363 Example #0\n", "2019-10-14 10:14:22,363 \tSource: source_sentence\n", "2019-10-14 10:14:22,363 \tReference: target_sentence\n", "2019-10-14 10:14:22,363 \tHypothesis: 21 ኣብ ልዕሊ እቲ ሽመት፡\n", "2019-10-14 10:14:22,364 Example #1\n", "2019-10-14 10:14:22,364 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n", "2019-10-14 10:14:22,364 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n", "2019-10-14 10:14:22,364 \tHypothesis: 13 ብዛዕባ እቲ ኣነ ዝገብሮ ዘለኹ መከራ እቲ ኣምላኽ ንምስዓብ ዝቘረጸሉ ጽኑዕ ዝሰማዕክዎ ቓላተይ ሰሚዕካ ኣለኹ፣+\n", "2019-10-14 10:14:22,364 Example #2\n", "2019-10-14 10:14:22,365 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n", "2019-10-14 10:14:22,365 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n", "2019-10-14 10:14:22,365 \tHypothesis: 14 ኣብ ይሁዳ ኸኣ ካብ መንጎ ብዙሓት ኣቦታተይ ተሪፈን ብትምኒት ተሃንጥየ።+\n", "2019-10-14 10:14:22,365 Example #3\n", "2019-10-14 10:14:22,366 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n", "2019-10-14 10:14:22,366 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n", "2019-10-14 10:14:22,366 \tHypothesis: 15 ግናኸ፡ እቲ ኻብ ኣዋልድ ኣደይ ዚኸይድ ኣምላኽ ምስ ረኣኽዎ፡ ብጸጋ ጸኒሑ፡+ ብጸጋ እውን ተሓጒሱ እዩ፣+\n", "2019-10-14 10:14:22,366 Validation result at epoch 14, step 4800: bleu: 2.64, loss: 99502.6484, ppl: 19.1322, duration: 246.0104s\n", "2019-10-14 10:15:39,615 Epoch 14 Step: 4900 Batch Loss: 1.698706 Tokens per Sec: 11211, Lr: 0.000316\n", "2019-10-14 10:16:18,665 Epoch 14: total training loss 599.97\n", "2019-10-14 10:16:18,665 Training ended after 14 epochs.\n", "2019-10-14 10:16:18,665 Best validation result at step 4800: 19.13 ppl.\n", "2019-10-14 10:19:07,052 dev bleu: 2.95 [Beam search decoding with beam size = 5 and alpha = 1.0]\n", "2019-10-14 10:19:07,053 Translations saved to: models/enti_transformer/00004800.hyps.dev\n", "2019-10-14 10:22:44,676 test bleu: 4.02 [Beam search decoding with beam size = 5 and alpha = 1.0]\n", "2019-10-14 10:22:44,677 Translations saved to: models/enti_transformer/00004800.hyps.test\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "En4yLGA0uObA", "colab_type": "code", "outputId": "eb92ee2b-629c-4693-cceb-7630ba4b5cf4", "colab": { "base_uri": "https://localhost:8080/", "height": 221 } }, "source": [ "! cat joeynmt/models/enti_transformer/validations.txt" ], "execution_count": 33, "outputs": [ { "output_type": "stream", "text": [ "Steps: 400\tLoss: 183016.10938\tPPL: 227.80504\tbleu: 0.00000\tLR: 0.00027951\t*\n", "Steps: 800\tLoss: 161773.67188\tPPL: 121.31764\tbleu: 0.00000\tLR: 0.00055902\t*\n", "Steps: 1200\tLoss: 139968.59375\tPPL: 63.53851\tbleu: 0.00000\tLR: 0.00063789\t*\n", "Steps: 1600\tLoss: 126149.81250\tPPL: 42.17230\tbleu: 0.39455\tLR: 0.00055243\t*\n", "Steps: 2000\tLoss: 117405.40625\tPPL: 32.53750\tbleu: 0.77353\tLR: 0.00049411\t*\n", "Steps: 2400\tLoss: 111665.29688\tPPL: 27.44364\tbleu: 1.04448\tLR: 0.00045105\t*\n", "Steps: 2800\tLoss: 108688.39062\tPPL: 25.12430\tbleu: 1.35411\tLR: 0.00041760\t*\n", "Steps: 3200\tLoss: 105395.86719\tPPL: 22.78666\tbleu: 1.46641\tLR: 0.00039063\t*\n", "Steps: 3600\tLoss: 103506.27344\tPPL: 21.54465\tbleu: 1.90781\tLR: 0.00036828\t*\n", "Steps: 4000\tLoss: 101183.32031\tPPL: 20.11017\tbleu: 2.39346\tLR: 0.00034939\t*\n", "Steps: 4400\tLoss: 100581.05469\tPPL: 19.75411\tbleu: 2.60668\tLR: 0.00033313\t*\n", "Steps: 4800\tLoss: 99502.64844\tPPL: 19.13224\tbleu: 2.64119\tLR: 0.00031894\t*\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "NBr1wm9Dl2K9", "colab_type": "code", "outputId": "8f0ed972-590a-4000-818a-e2dbb4d8f05b", "colab": { "base_uri": "https://localhost:8080/", "height": 51 } }, "source": [ "# Copy the created models from the notebook storage to google drive for persistant storage \n", "!mkdir \"$gdrive_path/models/\"\n", "!cp -r joeynmt/models/* \"$gdrive_path/models/${src}${tgt}_transformer/\"" ], "execution_count": 34, "outputs": [ { "output_type": "stream", "text": [ "mkdir: cannot create directory ‘/content/drive/My Drive/masakhane/en-ti/models/’: No such file or directory\n", "cp: cannot create directory '/content/drive/My Drive/masakhane/en-ti/models/enti_transformer/': No such file or directory\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "2JJpKgsrJC1o", "colab_type": "code", "outputId": "34b33bdf-9984-46f5-b439-78ca5a160a58", "colab": { "base_uri": "https://localhost:8080/", "height": 34 } }, "source": [ "! cat \"$gdrive_path/models/${src}${tgt}_transformer/validations.txt\"" ], "execution_count": 35, "outputs": [ { "output_type": "stream", "text": [ "cat: '/content/drive/My Drive/masakhane/en-ti/models/enti_transformer/validations.txt': No such file or directory\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "YhisG8H_vGyI", "colab_type": "code", "outputId": "e1c00545-1089-458e-b833-330368daedd8", "colab": { "base_uri": "https://localhost:8080/", "height": 51 } }, "source": [ "! cd joeynmt; python3 -m joeynmt test models/enti_transformer/config.yaml\n" ], "execution_count": 36, "outputs": [ { "output_type": "stream", "text": [ "2019-10-14 10:25:52,015 - dev bleu: 2.95 [Beam search decoding with beam size = 5 and alpha = 1.0]\n", "2019-10-14 10:29:29,611 - test bleu: 4.02 [Beam search decoding with beam size = 5 and alpha = 1.0]\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "WrCceV22I5PR", "colab_type": "code", "colab": {} }, "source": [ "" ], "execution_count": 0, "outputs": [] } ] }