axinc-ai / ailia-models-cpp

C++ version of ailia models repository
17 stars 2 forks source link

ADD fugumt #17

Closed kyakuno closed 1 year ago

kyakuno commented 1 year ago

Implement fugumt with ailia.tokenizer.

kyakuno commented 1 year ago

https://github.com/axinc-ai/ailia-models/tree/master/natural_language_processing/fugumt-en-ja

kyakuno commented 1 year ago

Inference loopのshape。

input_ids.shape (12, 6)
attention_mask.shape (12, 6)
decoder_input_ids.shape (12, 1)
past_key_values[0].shape (12, 8, 0, 64)

input_ids.shape (12, 6)
attention_mask.shape (12, 6)
decoder_input_ids.shape (12, 1)
past_key_values[0].shape (12, 8, 1, 64)
kyakuno commented 1 year ago

decoder_input_idsには最初はpad=32000が入って、以降は前回のデコード結果が入る。

decoder_input_ids.shape (12, 1) [[32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]
 [32000]]
decoder_input_ids.shape (12, 1) [[  517]
 [    2]
 [13785]
 [23563]
 [ 4793]
 [  130]
 [ 2175]
 [ 8270]
 [  158]
 [ 1036]
 [  996]
 [10080]]