by radarsat1 · 2mo ago · 0 comments
As in, instead of all the complexities induced by discrete token generation, just generate the image of the text using standard image diffusion methods, then convert it to text.
If you used a single, monospace font, I bet this would be even pretty efficient, because the OCR problem becomes basically just direct template matching.
But I guess probably there is already a paper out there, I haven't searched. I'd be curious to know if it compares on par with token-based methods.
You can actually rig up an embedding variant of a Markov chain with just a few tokens of context, and no position coding, transformers, attention, none of it, and only minutes of training time. As long as you have the embedding lookup table trainable it will do some neat stuff.
Also, you still need token embeddings (I think you might be confused how that works).
The embeddings are produced in concert with the network, to serve the network, and not created as a separate step.
It’s actually very cool
The look-up table is a matrix. Each row is an embedding and each row number is a token ID.
You get a differentiable transformation from token ID to token embedding using a “one hot vector” and a matrix multiplication
If you take the transpose of this matrix, you can convert an internal representation back to the same token form, but treat it as logits and give it to the sampler.
So token embeddings are produced on demand in service of the model, according to the model’s needs.
I found an example of this strategy in a paper as far back as 1980!
In the other reply I recommend the Bengio paper. But do bite the bullet and try it.