lmql
lmql copied to clipboard
Any implementation of Tree of Thoughts in LMQL ?
Tree of Thoughts (https://arxiv.org/abs/2305.10601) is a kind of powerful generalization of chain-of-thought. Were you able to implement it in LMQL (e.g. https://github.com/princeton-nlp/tree-of-thought-llm ) ? If yes, this kind of approach is very expensive in computation and LMQL could highly reduce it, is this the case ?
It would be interesting to see an implementation of ToT in LMQL. I am not sure about immediate token savings, as ToT is mostly compositional. Either way having it as a benchmark could be useful in optimising more for this kind of workload.
LMQL is really well suited for this kind of thing! I made a reference implementation this morning, I haven't tested it though:
https://github.com/LachlanGray/lmql-tree-of-thoughts
That's a really valuable demo @LachlanGray!
So far I'm finding the project works great for simple AI functions like the methods in your code.
Thanks! Full disclosure it does not work in this state 😅 but I'll have the working version soon. It's surprising how much you can do with simple functions
@LachlanGray I just edited my initial post to link to the correct implementation: https://github.com/princeton-nlp/tree-of-thought-llm (they explain that initial github implementation was malicious and does not work properly, it might explain why it did not work straight).