BlinkDL/RWKV-LM

How to understand `no` variable in cuda code?

yxchng opened this issue · 1 comments

e.g.

F no = max(o, u + k[ii]);
F A = exp(o - no);
F B = exp(u + k[ii] - no);

There are many parts of the code that uses the no variable like this. I couldn't understand it as it is not in the equations mentioned in the paper. Why minus no? Can you kindly explain?

see "RWKV-4 improvements" in https://github.com/BlinkDL/RWKV-LM readme