None, or choppy, 3G/LTE data transfer with T-Mobile US on international HTC One M8
For anyone experiencing this, it's very likely that your phone is intended for a different geographical region.
I will provide an answer for my own device, however the rationale and the process should hold true for other cases of this sort.

Mine was an Asian version that supports, at most, LTE bands 1, 3, 7, 8, and 20.
LTE in North America uses bands 2, 4, and 12.

A potential solution to get full LTE speeds is to flash custom radio firmware (at your own risk). I couldn't find a zip for T-Mobile, but the word is out that GPE radio firmware is the same.

A solution that gives you 3G (in my case) and doesn't involve flashing: go into *#*#4636#*#* and pressing the menu button in the top right. It opens a very old-school dropdown, and you can't really see which option is selected. Chances are, yours is in "Auto" mode. Try switching to particular bands instead. In my case, there was just one band in common between GSM 3G implementations for Asia and the US: PCS 1900 MHz.

Additionally, you may want to switch to "GSM auto," and in "Settings -> Mobile networks" to choose 3G as preferred rather than LTE. However, I haven't tested whether it makes any difference.

Most of the credit goes to the posters in this reddit thread.