Heterogeneous inference architecture