the difference here might caused by implement of CBOW in gensim.
when use sum of context word as input, it is divided by num of context when BP which is contrary to pytorch inner BP algorithm.
check discuss here Is this a bug in the CBOW code or my misunderstanding? · Issue #1873 · RaRe-Technologies/gensim · GitHub 8