Text this: AI-driven model for optimized pulse programming of memristive devices