BAMM icon indicating copy to clipboard operation
BAMM copied to clipboard

train error

Open SFGHRT opened this issue 5 months ago • 4 comments

Hello author, if you set --num_quantizers=1 when training vq, then at the beginning of the final res transformer training, you will get RuntimeError: Trying to create tensor with negative dimension -1: [-1, 8193, 32]? Is it a code error or you have written the wrong setting here? @exitudio

SFGHRT avatar Jul 29 '25 11:07 SFGHRT

Can the training script be the same as momask, and then train it, or should I follow the script in your experiment?

SFGHRT avatar Jul 29 '25 13:07 SFGHRT

I didn't clean the VQVQAE training code. Not sure if it has any errors. But the training for VQVAE is the same as MoMask. You can use their script.

exitudio avatar Jul 30 '25 04:07 exitudio

Thank you for your reply, but when I looked at your res_transformer, I noticed that your loss = '' #cal_loss(pred, labels, ignore_index, smoothing=smoothing) does not calculate the loss. Is that the part that is commented afterward?

SFGHRT avatar Jul 31 '25 11:07 SFGHRT

I calculated the cross-entropy loss averaged per sample, instead of per token as in MoMask. I implemented the loss function here Then, I commented out the loss in that function.

exitudio avatar Aug 02 '25 04:08 exitudio