I guess figured it out … I had to add a negative sign to the output…
Now I change the backward portion to this and it matches the tutorial output when using same random seed:
    def backward(ctx, grad_output):
        yy, yy_pred = ctx.saved_tensors
        grad_input = torch.neg(2.0 * (yy_pred - ctx.y))
        return grad_input, grad_output

Still curious about the second question if anyone knows…