3 ms·
How do they get GPT-4 to produce valid SVGs so well? I experimented with SVG generation and it would often produce junk that wasn't even valid as an SVG, and e
by xnorswap 3y ago
How do they get GPT-4 to produce valid SVGs so well?
I experimented with SVG generation and it would often produce junk that wasn't even valid as an SVG, and even when it did produce a valid SVG, was often a couple of blobs which it would describe as if it were the mona lisa while just being a couple of elements.
- dannyw 3y agoThis part: https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib/generator.js#L45 https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib...
- xnorswap 3y agoThat'll do it! I wonder how many retries it averages, the images list "tokens", but it's a bit cryptic to work out how to translate that to attempts?
- quickthrower2 3y agoYou can also get the token probs and only sample from the ones that would be valid for each token.
- jwestbury 3y agoLooks like it just reprompts for a valid SVG if the result isn't valid: https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib/generator.js#L45-L50 https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib...
- imdsm 3y agoPretty much. Just checked the logs, that's only happened 3 times since last restart which was 4 weeks ago.