Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need my hands on this code ASAP. :-) #2

Closed
aifartist opened this issue May 20, 2023 · 17 comments
Closed

I need my hands on this code ASAP. :-) #2

aifartist opened this issue May 20, 2023 · 17 comments

Comments

@aifartist
Copy link

aifartist commented May 20, 2023

I'm a hard core performance architect that retired last year from MSFT now doing AI for fun.
Stable Diffusion, TensorRT, torch.compile(), and coding in Python. I have a 4090 with an i9-13900K. If I need more memory to run a 65B model I'll buy it. Today I got manticore-13b running on my system. To shoot for the moon I want to get the best LLM that can fit on a high end home PC and layer things like this onto it. I was just reading up on Reflexion when I saw this. I wonder if its dynamic memory and self-reflection focus duplicates what tree-of-thought does or could augment it. I can code/debug anything.

Since this github has no discussion forum I'll abuse the "Issues" thing to get my foot in the door so I'll get a notification when the code drops.

@lightningRalf
Copy link

@aifartist I think you would like this then: https://github.com/Josh-XT/AGiXT/tree/main

@sinanisler
Copy link

hehe

@niatro
Copy link

niatro commented May 20, 2023

I want to see the code too, actually I read all the paper and I was trying to figure out how you developed the experiments. Please help us with a little of code

@aifartist
Copy link
Author

I want to see the code too, actually I read all the paper and I was trying to figure out how you developed the experiments. Please help us with a little of code

If they help us with a little bit of code I'll return the favor! :-)

@fblgit
Copy link

fblgit commented May 21, 2023

give it a try to this one https://github.com/fblgit/tree-of-knowledge-llm

@aifartist
Copy link
Author

give it a try to this one https://github.com/fblgit/tree-of-knowledge-llm

It doesn't appear to be runable code I can experiment with. It is one thing to read a paper and another to try examples to make the concepts clear. However, in looking a bit at what you put there I am getting a better idea of what this is doing.

I believe that to much focus on LLM is being directed at "specifics" and not enough on the core foundation ontological concepts of different forms of communication, answering questions, cause/effect, iterating towards a solution. Do not start training about certain computer languages, deep knowledge of physics, deep knowledge of hair follicle diseases in felines, plumbing, knitting, etc. until you got the general "thinking" mechanisms rock solid.

@dbruns
Copy link

dbruns commented May 21, 2023

In my personal experience researching learning and knowledge from a human perspective, learning about more specific areas of knowledge can significantly improve the ability to solidify foundational core concepts. Often, first-hand experience reasoning about nuanced specific topics can inform on the importance of the foundation by flexing those muscles. For example, mastering mathematics alone is much more tedious and inefficient than learning some basic ideas in mathematics and then switching to studying various aspects of physics that require mathematics. This approach often leads down paths where more advanced mathematics are required thus providing the motivation, context, and 'real world examples' of some more advanced math concepts. With this approach, hopping from foundational subjects to advanced nuanced topics and then back provides for a more dynamic and well-rounded method for learning that allows neural pathways to be forged in such a way that integrating various subjects becomes almost trivial. Unexpected and novel insights and analogies are more likely to occur with this method of learning from my subjective opinion when I reflect back on my first-hand experience following a methodical approach to mastering various multiplayer video games using an analogous approach to the content of this repo to train humans. I've had similar success with this method training LLM with very limited resources.

@amanape
Copy link

amanape commented May 21, 2023

You mentioned you were reading on 'Reflexion', could you share that resource material?

@takeraparterer
Copy link

you code
hand it over

@aifartist
Copy link
Author

aifartist commented May 21, 2023

In my personal experience ... resources.

I don't disagree with what you are saying. I'm just saying training on everything including the kitchen sink, with back issues of Cat Fancier magazine, Knitting Quarterly, PVC Pipe Fitting catalogs, 10000 species of birds, and on and on an on isn't what I'd do.
Does that mean that I would not take the iterative approach you described? No, this is exactly what I want. I want to first spend MORE time and effort in training on the foundational aspects before the next pass where I bring in one or more domains "in depth". That doesn't mean I wouldn't feed it an Encyclopedia and other broad high level overviews of general knowledge in the first pass. It can understand what "sport records" are without knowing who had the low round of golf in a PGA tour was in 1962.

Ontology, philosophy, core math like axiomatic set theory, Peano's axioms, logic, etc. in FULL DEPTH. Shallow but broad understanding of general knowledge. Don't assume this is an exhaustive list. Perhaps as important is understanding the nature of communication. Answering a question, making follow up inquiries when there is some ambiguity in what the agent thinks was being asked, judging the knowledge of the other person to customize your responses(something I do when explaining high technical subjects to the common man). I might even consider these to be proper foundation ontological concepts in themselves.

At some point, when I'm satisfied, start considering what to do next. The entirety of human knowledge in as much depth as we can find text/images for or pick some high value domains like physics/math, programming/algorithms, etc. and provide a library of very solid models that can help in those domains even better than ChatGPT-4 and maybe even be runnable on a 4090 on a home PC. But this might not be the correct second step...

A flat next word predictor based system has its limitations. I want a model that has ?feedback?, LTSM, RNN, like things in it. There are a number of things coming out that seem to be layered onto an LLM instead of being baked into it. Like this tree thing. Or call it "problem solving" that relies less on flat word patterns learned from vast corpora of text.

A crazy idea?
With the right kind of foundational LLM augmented with the above I believe you can speed up the learning rate when dealing with new "mostly but not entirely" fact sets and rules that describe advanced physics/math, programming algorithms, the law, medicine, etc. If I understand things properly learning too fast weakens the ability to generalize. Is it possible for a given domain to identify facts, rules, algorithms that stand independently enough to be learned in the first or first few epochs. I have a feeling I may not be clear enough for this idea that is clear in my head. Axioms should just be trusted. Facts from a trusted source should be trusted. The ability to combine and reason about facts needs to be trained. Understanding that distinction could lead to faster ways to train.

As a 40+ year software architect I was too busy solving problems in SQL databases and high performance systems to be able to study AI. Just after I retired everything exploded and I'm trying to catch up. Do I have anything to offer in terms of unique insights?
Over these 40 years I've become known as the person to solve problems when everyone else failed: 3 way race conditions, memory corruptions, OS bugs figured out in the days before I had access to the source code, ... At Saleforce I had been overhearing about a data corruption problem in production for over a month. I was in another group. They were having daily or more conference calls with experts from Oracle, Redhat, and Dell Hardware. The CEO of Salesforce was often on these calls. By pure luck someone asked me to sit in on one of these calls. I just listened and within an hour I had an idea what the problem might be. It turned out they were looking under the wrong rock. This isn't just a one off instance. I've been doing this for my entire career. I could tell stories for hours. Why am I saying this?

Multiple times my various bosses have asked me if I could train other engineers to do want I could do. I have often reflected and pondered about the nature of "though" and "intuition" and why was I able to do what I did. I sat on the Autonomic Computing board at IBM back when flawed rule based methods were used. It sounds silly but I've used myself as a subject to study. I'd might be thinking about something and wondered why I was thinking about it. Several times over the years I was able to "rewind" my chain of thoughts to discover what triggered the transition to the new subject of interest. The short version: I've been thinking about thinking for a long time.

Will "tree" be the key breakthrough. Could I come up with something as I get deeper and deeper into this subject. Only time will tell.

@aifartist
Copy link
Author

You mentioned you were reading on 'Reflexion', could you share that resource material?

First Google hit for a simple query:
https://www.reddit.com/r/singularity/comments/122jb1n/people_are_already_fine_tuning_llama_7b_with/

@aifartist
Copy link
Author

You mentioned you were reading on 'Reflexion', could you share that resource material?

First hit with Google:
https://www.reddit.com/r/singularity/comments/122jb1n/people_are_already_fine_tuning_llama_7b_with/

@kyegomez
Copy link

Here's my implementation so you can plug in and play:

https://github.com/kyegomez/tree-of-thoughts

@paolorechia
Copy link

Wow @kyegomez, thanks for sharing an implementation on cutting edge research like this! Amazing work, can’t wait to try it out

@ysymyth
Copy link
Member

ysymyth commented May 23, 2023

thanks for waiting, just released the code

@ysymyth ysymyth closed this as completed May 23, 2023
@aifartist
Copy link
Author

thanks for waiting, just released the code

Hmmm, it looks like I'd have to buy an openai ?api? account to use this?
While obviously openai ChatGPT is excellent compared with local models, if I have a 4090 and the best local LLaMA plus tweaks like Vicuna, could I integrate these such that I could do meaningful experiments? I can certainly write Python code. I just need some hint where the prompts are spit out from ToT and the response is read.
Another option, using free ChatGPT 3.5, is for me to create a bridge from the output of ToT and back. I can easily afford the ChatGPT 4 cost but unless I was going to be a heavy user I was holding off.

@aifartist
Copy link
Author

@ysymyth Sorry. I should have tried first. After asking to get a key at openai I tried your code. At first I thought it was hung but when I instrumented the chatgpt() loop I saw messages and replies. Also, this might be the place I might be able to connect it to my local LLaMA wizard ++ model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests