Text this: Getting the Best Out of Both Worlds: Algorithms for Hierarchical Inference at the Edge