NVIDIA Tesla K40s 's Advantages
More VRAM (12GB vs 4GB)
Larger VRAM bandwidth (288.4GB/s vs 88.00GB/s)
1856 additional rendering cores
NVIDIA Tesla M4 's Advantages
Released 2 years late
Boost Clock has increased by 22% (1072MHz vs 876MHz)
Lower TDP (50W vs 245W)