The physical mechanism of deep earthquakes (depth >300 km) remains enigmatic, partly because their rupture dimensions are difficult to estimate due to their low aftershock productivity and absence of geodetic or surface rupture observations. The two largest deep earthquakes, the recent Great 2013 Sea of Okhotsk earthquake (M 8.3, depth 607 km) and the Great 1994 Bolivia earthquake (M 8.3, depth 637 km), together provide a unique opportunity to compare their rupture patterns in detail. Here we extend a travel-time sub-event location method to perform full teleseismic P-waveform inversion. This new method allows us to explain the observed broadband records with a set of sub-events whose model parameters are robustly constrained without smoothing. We find that while the Okhotsk event is mostly unilateral, rupturing 90 km along strike with a velocity over 4 km/s, the Bolivia earthquake ruptured about half this distance at a slow velocity (about 1.5 km/s) and displayed a major change in rupture direction. We explain the observed differences between the two earthquakes as resulting from two fundamentally different faulting mechanisms in slabs with different thermal states. Phase transformational faulting is inferred to occur inside the metastable olivine wedge within cold slab cores whereas shear melting occurs inside warm slabs once triggered.