Change model to use optimized matrix multiply