Moses-support Digest, Vol 95, Issue 39

Send Moses-support mailing list submissions to
moses-support@mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu

You can reach the person managing the list at
moses-support-owner@mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."


Today's Topics:

1. Re: Moses v2.1.1 - low speed on binary mode
(Mohammad Mahdi Mahsuli)


----------------------------------------------------------------------

Message: 1
Date: Fri, 26 Sep 2014 14:15:12 +0330
From: Mohammad Mahdi Mahsuli <mmahsuli@gmail.com>
Subject: Re: [Moses-support] Moses v2.1.1 - low speed on binary mode
To: Hieu Hoang <Hieu.Hoang@ed.ac.uk>
Cc: moses-support <moses-support@mit.edu>
Message-ID:
<CANh1fDNLnECmF2POPEmaFUGq+PV27YJed+A7CiL5COsyXZJB9A@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

?I
patched my server application with the new mosserver which has better
thread management but the problem has not been solved. Still, the cache is
not used when running moses with binary models. Unfortunately, the models
are too big for me to upload them.

Here is some extra information:

Server: SuperMicro CPU 2x Xeon 2260 RAM 96GB SSD 250GB
All models were OS-cached using cat models/* > /dev/null
Binary Phrases + Binary reordering ~= 3.5GB
Plain Phrases + Plain reordering ~= 30GB

Results:
+--------------+----------+---------------+
|Moses Version | Model | Loading Time |
+--------------+----------+---------------+
| 0.9 | binary | ~45 sec |
| 2.1.1 | binary | ~20 sec |
| 2.1.1 | plain.gz | ~72 min |
| 2.1.1 | plain | ~60 min |
+--------------+----------+---------------+

+-------------+----------------+-----------------------+
| | | TranslationTime (sec) |
| Token Count | Moses/Models +-----------------------+
| | | 1st round | 2nd round |
+-------------+----------------+-----------------------+
| 5 | 0.9 binary | 2.7 | 0.19 |
| 5 | 2.1.1 binary | 6.9 | 6.9 |
| 5 | 2.1.1 plain | 4.3 | 0.02 |
+-------------+----------------+-----------------------+
| 80 | 0.9 binary | 8.0 | 2.2 |
| 80 | 2.1.1 binary | 19.051 | 18.9 |
| 80 | 2.1.1 plain | 7.2 | 0.2 |
+-------------+----------------+-----------------------+
| 191 | 0.9 binary | 18.26 | 5.6 |
| 191 | 2.1.1 binary | 33.51 | 32.3 |
| 191 | 2.1.1 plain | 16.6 | 0.5 |
+-------------+----------------+-----------------------+

Even tried moses trunk ver 84ad576750 with no progress. For a sample of 191
tokens using mosesserver we have :

First round:
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
binary file loaded, default OFF_T: -1
Line 0: Collecting options took 12.1748 seconds at moses/Manager.cpp:110
Line 0: Search took 2.48092 seconds

Second round:
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
binary file loaded, default OFF_T: -1
Line 0: Collecting options took 11.9163 seconds at moses/Manager.cpp:110
Line 0: Search took 2.48623 seconds

Third round:
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
binary file loaded, default OFF_T: -1
Line 0: Collecting options took 11.7477 seconds at moses/Manager.cpp:110
Line 0: Search took 2.46596 seconds


=====================================

The problem persists even using moses-cmd. Log Follows
? ?
(please note the translation times):

SMT-SM-1:/SMT/Service/Bin # ./moses -config
/SMT/Service/Models/en2fa/moses-tuned-bin.ini text
Defined parameters (via moses.ini or switch):
config: /SMT/Service/Models/en2fa/moses-tuned-bin.ini text
distortion-limit: 6
feature: UnknownWordPenalty WordPenalty PhrasePenalty
PhraseDictionaryBinary name=TranslationModel0 num-features=4
path=/SMT/Service/Models/en2fa/phrase-table input-factor=0 output-factor=0
table-limit=14 LexicalReordering name=LexicalReordering0 num-features=6
type=wbe-msd-bidirectional-fe-allff input-factor=0 output-factor=0
path=/SMT/Service/Models/en2fa/reordering-table Distortion KENLM name=LM0
factor=0 path=/SMT/Service/Models/en2fa/Parallel.fa.arpa order=4
input-factors: 0
mapping: 0 T 0
weight: LexicalReordering0= 0.073298 0.0596145 0.115321 0.066936
0.0283095 0.0565263 Distortion0= 0.0325491 LM0= 0.0620824 WordPenalty0=
-0.248997 PhrasePenalty0= 0.0700501 TranslationModel0= 0.00878866 0.0570903
0.0778723 0.042565 UnknownWordPenalty0= 1
.
line=UnknownWordPenalty
FeatureFunction: UnknownWordPenalty0 start: 0 end: 0
line=WordPenalty
FeatureFunction: WordPenalty0 start: 1 end: 1
line=PhrasePenalty
FeatureFunction: PhrasePenalty0 start: 2 end: 2
line=PhraseDictionaryBinary name=TranslationModel0 num-features=4
path=/SMT/Service/Models/en2fa/phrase-table input-factor=0 output-factor=0
table-limit=14
FeatureFunction: TranslationModel0 start: 3 end: 6
line=LexicalReordering name=LexicalReordering0 num-features=6
type=wbe-msd-bidirectional-fe-allff input-factor=0 output-factor=0
path=/SMT/Service/Models/en2fa/reordering-table
FeatureFunction: LexicalReordering0 start: 7 end: 12
Initializing LexicalReordering..
line=Distortion
FeatureFunction: Distortion0 start: 13 end: 13
line=KENLM name=LM0 factor=0
path=/SMT/Service/Models/en2fa/Parallel.fa.arpa order=4
FeatureFunction: LM0 start: 14 end: 14
Loading the LM will be faster if you build a binary file.
Reading /SMT/Service/Models/en2fa/Parallel.fa.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
Loading UnknownWordPenalty0
Loading WordPenalty0
Loading PhrasePenalty0
Loading LexicalReordering0
binary file loaded, default OFF_T: -1
Loading Distortion0
Loading LM0
Loading TranslationModel0
IO from STDOUT/STDIN
Created input-output object : [12.000] seconds
His address came amid numerous international crises in which the United
States finds itself at the forefront, including the fight against ISIS in
Syria and Iraq, lingering tensions in Ukraine and the spread of Ebola in
Africa, which the U.S. Centers for Disease Control and Prevention this week
said could infect as many as 1.4 million people by early next year.
Translating line 0 in thread id 139648371779328
Translating: His address came amid numerous international crises in which
the United States finds itself at the forefront, including the fight
against ISIS in Syria and Iraq, lingering tensions in Ukraine and the
spread of Ebola in Africa, which the U.S. Centers for Disease Control and
Prevention this week said could infect as many as 1.4 million people by
early next year.
reading bin ttable
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
binary file loaded, default OFF_T: -1
Line 0: Collecting options took 5.000 seconds
Line 0: Search took 2.000 seconds
???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ?? ?????? ????? ??????
??? ?? ?? ??? forefront, ?? ???? ???? ?? ????? ? ?? ????? ????? Iraq,
?????? ????? ??? ?? ??????? ? ????? ????? Africa, ?? ?????? ????? ?? ?????
????? ? ??????? ?? ???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4
?????? ??? ???? year. ?????
BEST TRANSLATION: ???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ??
?????? ????? ?????? ??? ?? ?? ??? forefront,|UNK|UNK|UNK ?? ???? ???? ??
????? ? ?? ????? ????? Iraq,|UNK|UNK|UNK ?????? ????? ??? ?? ??????? ?
????? ????? Africa,|UNK|UNK|UNK ?? ?????? ????? ?? ????? ????? ? ??????? ??
???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4 ?????? ??? ????
year.|UNK|UNK|UNK ?????
[1111111111111111111111111111111111111111111111111111111111111]
[total=-421.245]
core=(-400.000,-64.000,33.000,-82.639,-155.509,-38.502,-90.596,-19.212,-0.111,-1.429,-16.220,0.000,-4.306,-25.000,-311.065)

==================> Line 0: Translation took 8.000 seconds total
His address came amid numerous international crises in which the United
States finds itself at the forefront, including the fight against ISIS in
Syria and Iraq, lingering tensions in Ukraine and the spread of Ebola in
Africa, which the U.S. Centers for Disease Control and Prevention this week
said could infect as many as 1.4 million people by early next year.
Translating line 1 in thread id 139648371779328
Translating: His address came amid numerous international crises in which
the United States finds itself at the forefront, including the fight
against ISIS in Syria and Iraq, lingering tensions in Ukraine and the
spread of Ebola in Africa, which the U.S. Centers for Disease Control and
Prevention this week said could infect as many as 1.4 million people by
early next year.
reading bin ttable
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
Line 1: Collecting options took 0.000 seconds
Line 1: Search took 1.000 seconds
???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ?? ?????? ????? ??????
??? ?? ?? ??? forefront, ?? ???? ???? ?? ????? ? ?? ????? ????? Iraq,
?????? ????? ??? ?? ??????? ? ????? ????? Africa, ?? ?????? ????? ?? ?????
????? ? ??????? ?? ???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4
?????? ??? ???? year. ?????
BEST TRANSLATION: ???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ??
?????? ????? ?????? ??? ?? ?? ??? forefront,|UNK|UNK|UNK ?? ???? ???? ??
????? ? ?? ????? ????? Iraq,|UNK|UNK|UNK ?????? ????? ??? ?? ??????? ?
????? ????? Africa,|UNK|UNK|UNK ?? ?????? ????? ?? ????? ????? ? ??????? ??
???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4 ?????? ??? ????
year.|UNK|UNK|UNK ?????
[1111111111111111111111111111111111111111111111111111111111111]
[total=-421.245]
core=(-400.000,-64.000,33.000,-82.639,-155.509,-38.502,-90.596,-19.212,-0.111,-1.429,-16.220,0.000,-4.306,-25.000,-311.065)

==================> Line 1: Translation took 3.000 seconds total
His address came amid numerous international crises in which the United
States finds itself at the forefront, including the fight against ISIS in
Syria and Iraq, lingering tensions in Ukraine and the spread of Ebola in
Africa, which the U.S. Centers for Disease Control and Prevention this week
said could infect as many as 1.4 million people by early next year.
Translating line 2 in thread id 139648371779328
Translating: His address came amid numerous international crises in which
the United States finds itself at the forefront, including the fight
against ISIS in Syria and Iraq, lingering tensions in Ukraine and the
spread of Ebola in Africa, which the U.S. Centers for Disease Control and
Prevention this week said could infect as many as 1.4 million people by
early next year.
reading bin ttable
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
Line 2: Collecting options took 0.000 seconds
Line 2: Search took 2.000 seconds
???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ?? ?????? ????? ??????
??? ?? ?? ??? forefront, ?? ???? ???? ?? ????? ? ?? ????? ????? Iraq,
?????? ????? ??? ?? ??????? ? ????? ????? Africa, ?? ?????? ????? ?? ?????
????? ? ??????? ?? ???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4
?????? ??? ???? year. ?????
BEST TRANSLATION: ???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ??
?????? ????? ?????? ??? ?? ?? ??? forefront,|UNK|UNK|UNK ?? ???? ???? ??
????? ? ?? ????? ????? Iraq,|UNK|UNK|UNK ?????? ????? ??? ?? ??????? ?
????? ????? Africa,|UNK|UNK|UNK ?? ?????? ????? ?? ????? ????? ? ??????? ??
???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4 ?????? ??? ????
year.|UNK|UNK|UNK ?????
[1111111111111111111111111111111111111111111111111111111111111]
[total=-421.245]
core=(-400.000,-64.000,33.000,-82.639,-155.509,-38.502,-90.596,-19.212,-0.111,-1.429,-16.220,0.000,-4.306,-25.000,-311.065)

==================> Line 2: Translation took 4.000 seconds total
His address came amid numerous international crises in which the United
States finds itself at the forefront, including the fight against ISIS in
Syria and Iraq, lingering tensions in Ukraine and the spread of Ebola in
Africa, which the U.S. Centers for Disease Control and Prevention this week
said could infect as many as 1.4 million people by early next year.
Translating line 3 in thread id 139648371779328
Translating: His address came amid numerous international crises in which
the United States finds itself at the forefront, including the fight
against ISIS in Syria and Iraq, lingering tensions in Ukraine and the
spread of Ebola in Africa, which the U.S. Centers for Disease Control and
Prevention this week said could infect as many as 1.4 million people by
early next year.
reading bin ttable
size of OFF_T 8
binary phrasefile loaded, default OFF_T: -1
Line 3: Collecting options took 0.000 seconds
Line 3: Search took 2.000 seconds
???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ?? ?????? ????? ??????
??? ?? ?? ??? forefront, ?? ???? ???? ?? ????? ? ?? ????? ????? Iraq,
?????? ????? ??? ?? ??????? ? ????? ????? Africa, ?? ?????? ????? ?? ?????
????? ? ??????? ?? ???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4
?????? ??? ???? year. ?????
BEST TRANSLATION: ???? ?? ?? ???? ?????? ?? ????? ??? ????????? ?? ?? ??
?????? ????? ?????? ??? ?? ?? ??? forefront,|UNK|UNK|UNK ?? ???? ???? ??
????? ? ?? ????? ????? Iraq,|UNK|UNK|UNK ?????? ????? ??? ?? ??????? ?
????? ????? Africa,|UNK|UNK|UNK ?? ?????? ????? ?? ????? ????? ? ??????? ??
???????? ??? ???? ??? ?? ??????? ???? ????? ??? ?? 1.4 ?????? ??? ????
year.|UNK|UNK|UNK ?????
[1111111111111111111111111111111111111111111111111111111111111]
[total=-421.245]
core=(-400.000,-64.000,33.000,-82.639,-155.509,-38.502,-90.596,-19.212,-0.111,-1.429,-16.220,0.000,-4.306,-25.000,-311.065)

==================> Line 3: Translation took 3.000 seconds total

Best regards,
M.M. Mahsuli
there was a problem with moses server, it was fixed a few weeks ago, git
pull from the github to get the fix.

Does the slowdown happen with the command line moses? In my tests, there
wasn't too much of a slowdown.
http://www.statmt.org/moses/RELEASE-2.1/Mosesv2.1.1releasenotes.pdf
If you do see a decrease in performance and can share your models, I might
be able to debug it

On 25 September 2014 16:00, Mohammad Mahdi Mahsuli <mmahsuli@gmail.com>
wrote:

> Thanks for your reply. Below you can find the required information:
>
>
> Moses was compiled with following command:
>
> ./bjam --with-xmlrpc-c=$HOME/local/ --with-cmph=$HOME/local/
> --with-tcmalloc --install-scripts=$HOME/local/moses --enable-boost-pool
> -j24
>
> moses.ini:
>
> #########################
> ### MOSES CONFIG FILE ###
> #########################
>
> # input factors
> [input-factors]
> 0
>
> # mapping steps
> [mapping]
> 0 T 0
>
> [distortion-limit]
> 6
>
>
> # feature functions
> [feature]
> UnknownWordPenalty
> WordPenalty
> PhrasePenalty
> PhraseDictionaryBinary name=TranslationModel0 num-features=4
> path=/SMT/Service/Models/en2fa/phrase-table input-factor=0 output-factor=0
> table-limit=14
> LexicalReordering name=LexicalReordering0 num-features=6
> type=wbe-msd-bidirectional-fe-allff input-factor=0 output-factor=0
> path=/SMT/Service/Models/en2fa/reordering-table
> Distortion
> KENLM name=LM0 factor=0 path=/SMT/Service/Models/en2fa/Parallel.fa.arpa
> order=4
>
> # core weights
> [weight]
> LexicalReordering0= 0.073298 0.0596145 0.115321 0.066936 0.0283095
> 0.0565263
> Distortion0= 0.0325491
> LM0= 0.0620824
> WordPenalty0= -0.248997
> PhrasePenalty0= 0.0700501
> TranslationModel0= 0.00878866 0.0570903 0.0778723 0.042565
> UnknownWordPenalty0= 1
>
> ====================================================================
>
> I ran mosesserver with the following command:
>
> mosesserver -config /SMT/Service/Models/en2fa/moses-tuned-bin.ini \
> --server-port 9393 \
> --server-log ./server.log \
> -s 100 -b .5
>
> Thanks in advance
>
> On Thu, Sep 25, 2014 at 5:15 PM, Hieu Hoang <hieuhoang@gmail.com> wrote:
>
>> what is the exact command you execute? How many threads are you running
>> with? what are the exact times for x,y, z? How many sentences were in the
>> input?
>>
>> Can I please have a look at your moses.ini files.
>>
>>
>> On 25/09/14 11:48, Mohammad Mahdi Mahsuli wrote:
>>
>> Hi,
>>
>> I was using Moses v0.9 for a long time, and I recently decided to opt
>> to use the latest version (v2.1.1). In the test time, when loading the
>> plain models into Moses, there is no difficulty. But when I want to use the
>> binarized models, the translation time is much more than when I used the
>> binary models on the old version of Moses. I have performed the following
>> experiments.
>>
>> model | decoder | time spent
>> ------------+----------------+----------------
>> old | old | x
>> new | new | y>x
>> old | new | z>x
>> new | old | N/A
>>
>>
>> "Model" means if I have trained the binary model using the old version
>> of Moses or the new one. "Decoder" is the Moses version which I have used
>> for translating the test sentences.
>>
>> I should also note that I have cached the binary models in OS memory
>> using the cat command. No other memory-intensive process was running on the
>> machine. However, I noticed that the translation time when translating a
>> sentence for the second time does not reduce. Therefore, I doubt that the
>> translations are being cached. Is there any argument I should consider for
>> this purpose?
>>
>> Best Regards,
>> M.M. Mahsuli
>>
>>
>> _______________________________________________
>> Moses-support mailing listMoses-support@mit.eduhttp://mailman.mit.edu/mailman/listinfo/moses-support
>>
>>
>>
>


--
Hieu Hoang
Research Associate
University of Edinburgh
http://www.hoang.co.uk/hieu

??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20140926/e107fb27/attachment.htm

------------------------------

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


End of Moses-support Digest, Vol 95, Issue 39
*********************************************

0 Response to "Moses-support Digest, Vol 95, Issue 39"

Post a Comment