pos_weight first appeared only in 0.4.1. Try to update your PyTorch installation.
Note that weights is a way to say “negative samples is more important”, whereas pos_weight is a way to say “negative errors must be larger”. These approaches are different and are not equivalent in the general case.