Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dwattttt
· 3y ago · 0 comments
If you're choosing the next token based on a list of valid next tokens, a uniform random distribution can always generate valid JSON too!
Comments
[–]
quickthrower2
3y ago
Yep. So can this:
fun generate_valid_json(seed): return "{}"
[–]
neoncontrails
3y ago
But that's not what an LLM does.
[–]
antonvs
3y ago
The point is that if you're "choosing the next token based on a list of valid next tokens," it's not surprising that you'll only generate valid output, since absolutely any choice mechanism will suffice.