RWKV-TTS / notes /sft.txt
fasdfsa's picture
init
14ff14a
假如原始数据如下:
文本部分:38为eot,数据类型为list of list
[
[1, 2, 3, 38],
[4, 5, 38],
[6, 7, 8, 9, 38]
]
音频部分:
[
[100,101,102],
[103,104,105],
[106,107,108,109,110],
]
处理出以下内容
text_input_ids,用38作为padding:
[
[1, 2, 3, 38, 38],
[4, 5, 38, 38, 38],
[6, 7, 8, 9, 38]
]
text_attention_mask:
[
[1,1,1,1,0],
[1,1,1,0,0],
[1,1,1,1,1]
]
audio_input_ids,每个数据后面添加一个8192,然后用8192作为padding:
[
[100,101,102,8192,8192,8192],
[103,104,105,8192,8192,8192],
[106,107,108,109,110,8192],
]
target:
[
[0, 0, 0, 100, 101, 102, 8193, 8193, 8193, 8193],
[0, 0, 103, 104, 105, 8193, 8193, 8193, 8193, 8193],
[0, 0, 0, 0, 106, 107, 108, 109, 110, 8193]
]
loss-mask:
[
[0,0,0,1,1,1,1,0,0,0],
[0,0,1,1,1,0,0,0,0,0],
[0,0,0,0,1,1,1,1,1,0]
]
模型的输入(模型内部处理):
[
[1, 2, 3, 0, 100, 101, 102, 8193, 8193, 8193],
[4, 5, 0, 103, 104, 105, 8193, 8193, 8193, 8193],
[6, 7, 8, 9, 0, 106, 107, 108, 109, 110]
]