Actually, it doesn't have to be so complicated. I tell you two principles:
First, the penalty should not be higher than the training fee given to you by the employer. You can work out how much money you have been trained.
Second, training fees need to be shared. For example, the training fee is 10000 yuan, and working as a server for ten years is 1000 yuan. If you still have three years' working experience, you can give 3000 yuan, and so on. Except in this case, there is no penalty. Of course, there is also a question of compensation. I believe that you have not caused so-called losses to your company, so you must inform it in writing 30 days in advance.
In addition, if your company violates the law or the labor contract, you don't have to pay liquidated damages.
This is the overall situation.