4 ms·
I'm telling you this is literally a trie dude.
by ZephyrBlu 3y ago
I'm telling you this is literally a trie dude.
- _akhe 3y agoYep, it's also "just a Markov chain", and "just a data structure", and "just lookups" but what I'm telling you is that it's really (fr fr) a next-token prediction library that you can use like this: // Predict the next word agent.getTokenPrediction('what'); // Predict the next 5 words agent.getTokenSequencePrediction('what is', 5); // Complete the phrase agent.complete('hopefully'); // Get a top k sample of completion predictions agent.getCompletions('The sun'); Hope this helps!
- ZephyrBlu 3y agoYes, I know what it is and what you can use it for. I have built my own trie before and like I said this data structure is used for autocompletion. A Markov chain is different. It's just not going to be able to scale up like an LLM because storing all the possibilities in a tree structure like this will take way too much memory. You've stumbled upon something you think is new, when it's in fact really, really old and has nothing to do with LLMs.
- _akhe 3y agoTake it up with the Markov chain people on this page. It would be too much memory if I kept the data in strings, or even if I used a Python list, but it's not when I use a JavaScript object. It's one of the main points I explained in the original post. You and 2 or 3 others have said "has nothing to do with LLMs" when if you watched the 3Blue1Brown video you would know that GPT uses next-token prediction and it's fundamental to prediction. I never said it was new, and of course have used and built auto-complete in the past, the NPC dialog in one of my games is structured this way. What's novel is crawling huge amounts of data and creating a much larger structure I knew was possible, and realizing at a certain size it can predict further out. Some of you people here are impossible. One guy went as far to say "Auto-complete is not possible using the concepts used in your project." when he can literally `npm i next-token-prediction` and try it himself, I even put an example project in the directory. It's really sad, I expect this level of in-total-denial pretentiousness on Reddit, but not HN, should be more tinkery and evidence-driven here :) Take care.