As a non-resident, you need to file a form 1040NR in any year that you have a distribution (withdrawal) from your HSA.
From the Instructions for Form 1040NR, Who Must File:
You also must file a return if you received HSA, Archer MSA, or Medicare Advantage MSA distributions.
You file a form 8889 with your 1040NR, and on that form you report how much money you took out of the HSA and how much of that was used for qualified medical expenses. If these distributions are used for qualified medical expenses, even in your home country, they are tax free. Any part of the distribution that is not used for medical expenses is taxable, and you would need to send in a tax payment with your 1040NR.
If you just cash out your HSA with no medical expenses, you will pay tax on the amount plus a 20% penalty. If you have no other U.S. connected income, your tax rate will be based solely on the amount of your distribution (probably 10-15%), so you are looking at a total tax of 30-35%.
It may be worth your while to leave the HSA in place and just withdraw it as you have medical expenses. You'll need to file a tax return each year you take money out until the HSA is gone, but you won't pay any tax.