Autistic savant Daniel Tammet holds a European memory record for reciting Pi. Tammet's book Born On A Blue Day is a memoir while his brand new book, Embracing the Wide Sky, is a deeper look into how his mind seems to work. From an interview in Scientific American:
I have always thought of abstract information–numbers for example–in visual, dynamic form. Numbers assume complex, multi-dimensional shapes in my head that I manipulate to form the solution to sums, or compare when determining whether they are prime or not.Inside the Savant Mind: Tips for Thinking from an Extraordinary Thinker
For languages, I do something similar in terms of thinking of words as belonging to clusters of meaning so that each piece of vocabulary makes sense according to its place in my mental architecture for that language. In this way I can easily discern relationships between words, which helps me to remember them.
In my mind, numbers and words are far more than squiggles of ink on a page. They have form, color, texture and so on. They come alive to me, which is why as a young child I thought of them as my “friends.” I think this is why my memory is very deep, because the information is not static. I say in my book that I do not crunch numbers (like a computer). Rather, I dance with them.