Self-reasoning tokens: teaching models to think ahead
reasoning-tokens.ghost.io
Self-reasoning tokens: teaching models to think ahead
1–10 of 31 posts
Re: Self-reasoning tokens: teaching models to think ahead
#2These are called reasoning tokens
Initial results with gpt2 are promising
You can generalize this to let the network decide when to generate reasoning tokens (I'm unclear on how). There were also multiple lines in the loss graph with reasoning tokens that I don't quite understand (what's reasoning 1 vs 3? Is it the ratio of reasoning tokens? Something else?)
Re: Self-reasoning tokens: teaching models to think ahead
#3Ok so my understanding: you can have the network generate a token that can be used as input to future token generation along with each output token it generates These are called reasoning tokens Initial results with gpt2 are promising You can generalize this to let the network decide when to generate reasoning tokens (I'm unclear on how). There were also multiple lines in the loss graph with reasoning tokens that I d…
The generalization comes from making the network predict a and end the sequence only when it predicts a . The training dataset for the upcoming experiment contains examples like: """ Q: What is 3+2? A: 3 + 2 is equal to ... 5 """
Re: Self-reasoning tokens: teaching models to think ahead
#4Basically it will create pre-conditions so that the final output aligns to some bias. In my specific case it was the bias to provide an answer to a question. This is noticable sometimes in chain of thought intermediate outputs. I ended up having to create some space between the entangled decisions in the chain of thought output.
Re: Self-reasoning tokens: teaching models to think ahead
#5Re: Self-reasoning tokens: teaching models to think ahead
#6I’ve tried similar experiments before by asking the LLM to generate “internal” and “external” dialog, which I think is sort of the same idea at a higher level—-and might be preferable because it would allow for easy introspection vs a new set of tokens? I’m not enough of an expert to understand whether this proposal is intended more for training or inference.
Re: Self-reasoning tokens: teaching models to think ahead
#7I’ve tried similar experiments before by asking the LLM to generate “internal” and “external” dialog, which I think is sort of the same idea at a higher level—-and might be preferable because it would allow for easy introspection vs a new set of tokens? I’m not enough of an expert to understand whether this proposal is intended more for training or inference.
This is a bit more low level than the usual prompt engineering approaches, and to my mind, a bit more promising. There's more easily measurable results, and I've seen other context where a well placed stop-gradient does wonders...
Re: Self-reasoning tokens: teaching models to think ahead
#8I’ve tried similar experiments before by asking the LLM to generate “internal” and “external” dialog, which I think is sort of the same idea at a higher level—-and might be preferable because it would allow for easy introspection vs a new set of tokens? I’m not enough of an expert to understand whether this proposal is intended more for training or inference.
The main advantage of using a new and constant token for reasoning is that, while we would pay the full price during training, in the inference phase, we could do most, if not all, the "reasoning" in one shot, without having to feed one generation token at a time.
Re: Self-reasoning tokens: teaching models to think ahead
#9Re: Self-reasoning tokens: teaching models to think ahead
#10This formulation doesn't make a lot of sense to me.
I get the motivation here but what you're trying to implement is a working memory.
Because transformers have perfect retrospective memory within their context window any generation which can be done directly from input tokens will be.
At any given point a model might want to write to a working memory, but that does not imply that the next non-working-memory-step will supply useful information to better write to working memory in the future. The model also has to be able to decide when to compare the work done in working memory to the next token.
By allowing the model to both exempt output from gradient updates and opt back in to gradient updates, you create a meta-learning loop that could be quite flexible.