For most non-differential function including L1, I think it uses sub-gradients of the function. Also, You can always use proximal gradient  to calculate non-differential function, if you want to use some custom optimization method on the non-differential function