3 ms·
Can anyone explain how context length is tested? Do they prompt something like: "Remember val="XXXX" .........10M tokens later....... Print val"
by prakhar897 3y ago
Can anyone explain how context length is tested? Do they prompt something like:
"Remember val="XXXX" .........10M tokens later....... Print val"
- NhanH 3y agoYep, that’s actually a common one
- blovescoffee 3y agoVery simplified There are arrays (matrices) that are length 10M inside the model. It’s difficult to make that array longer because training time explodes.
- halflings 3y agoYep that's pretty much it! That's what they call needle in a haystack. See: https://github.com/gkamradt/LLMTest_NeedleInAHaystack https://github.com/gkamradt/LLMTest_NeedleInAHaystack
- cchance 3y agoyep they hide things throughout the prompt and then ask it about that specific thing, imagine hiding passwords in a giant block of text and then being like, what was bobs password 10 million tokens later. According to this it's remembering with 99% accuracy, which if you think about it is NUTS, can you imagine reading a 22x 1000 page books, and remembering every single word that was said with 100% accuracy lol
- foota 3y agoInterestingly, there's a decent chance I'd remember if there was an out of context passage saying "the password is FooBar". I wonder if it would be better to test with minor edits? E.g., "what color shirt was X wearing when..."
- ambichook 3y agoi feel you would recognise that more as a quirk of how humans think, remember that LLMs think fundamentally differently to you and i. i would be curious about someone making a benchmark like that and using it to compare as an experiment however
- foota 3y agoI'm not trying to anthropomorphize the model, but it's not hard to imagine that a model would attribute significance to something completely out of context, and hence "focus" on it when computing attention. Another possible synthetic benchmark would be to present a list of key value pairs and then ask it for the value corresponding to different keys. Or present a long list of distinct facts and then ask it about them. This latter one could probably be sourced from something like a trivia question and answers data set. I bet there's something like that from Jeopardy.
- kenjackson 3y agoI think instead you could just do a full doc of relationships. "Tina and Chris have five children named ..." Then you can ask it who is Tina's (great)^57 grandmother's twice removed cousin on her father's side? It would have to be able to remember the context of the relationships up and down the document and there'd be nothing to key into as you could ask about any relationship.