attention output in marian-server

38 views
Skip to first unread message

Jörg Tiedemann

unread,
Oct 10, 2019, 6:30:36 AM10/10/19
to marian-nmt
Hi,

Is it possible to obtain hard and soft alignments also via the marian-server output?
I'd like to highlight some connections in an on-line demo and this would be very useful for that purpose.

Jörg

Roman Grundkiewicz

unread,
Oct 16, 2019, 8:23:57 AM10/16/19
to marian-nmt
Hi,

Yes, it's possible. Here is an example from our regression tests: https://github.com/marian-nmt/marian-regression-tests/blob/master/tests/server/test_ende_align.sh

Roman

Jörg Tiedemann

unread,
Oct 18, 2019, 8:48:54 AM10/18/19
to marian-nmt

OK - great. Related question to alignment with transformers: Do I need to specify the layer when generating the attention output? I saw that this is a parameter in training for the guided alignment training but I didn't see the same parameter for the decoder. Is that stored in the model somehow?

Roman Grundkiewicz

unread,
Oct 19, 2019, 5:31:48 AM10/19/19
to marian-nmt
Yes, the value of --transformer-guided-alignment-layer is stored in the model.npz file.

Roman
Reply all
Reply to author
Forward
0 new messages