R3: Sub-5ms Intelligent Memory Layer for AI Applications