I am currently an international student and do not intend to stay in this country for more than a couple of years. Assuming a company offers a 50% match, capped at $8000 - Should I make the investment and enjoy the company match?
Absolutely! Under the worst case scenario where you want to take the money with you rather than leave it in a qualified US account, you will still come out ahead because of the 50% match. Let's say you contribute $16,000 and the company contributes $8,000. That's a total of $24,000. If you withdraw the funds early, the penalty will be 10% of $2,400. You will still have $21,600 (before taxes), much more than your $16,000 contribution. So by all means go ahead and contribute up to the company match.
The only qualifier I would add is that your country of residence could have special rules regarding this money. I personally don't know of any that would be so significant as to change the fundamental math, but you might want to research the rules in your home country if you can. But as I said, any special levies are highly unlikely to tilt the math against contributing.