Great and very insightful work, I am also planning on testing NLAs on some smaller models. I think this would be a great starting point. Could I know a rough estimate of the GPU hours that went into this?
For this experiment with NLAs for 7B level, I used 2 3090s
1 for the AV SG Lang and the otherr for (generating responses and AR)
Together with 40 rollouts per prompt in GSM8k, the total time was around 24 hours
It should be way faster if you did it for 7B on an A100.
The following post seeks to look further into why NLA (Natural Language Autoencoders) contains the prediction more often when the original activations led to the correct output than incorrect output.
Quick Summary:
Key Findings:
Experimental setup:
Code: https://github.com/Realmbird/nla-thought-anchors
Huggingface datasets I created: https://huggingface.co/collections/Realmbird/nla-thought-anchors
I created a pipeline with the following steps (for further details, see the README):
Step 1 (Generates with Base model)
Step 2 (Generate first NLA explanations with AV )
Step 3 (Generate rollouts and calculate rollouts) (Takes the most time; arguments I used is a cos_sim threshold of 0.8 and 40 rollouts per sentence)
Step 4 (Analyzes the rollouts)
Other files are more to make visuals and analysis and include what step is needed to run
NLA Setup
The NLAs I used were from https://github.com/kitft/natural_language_autoencoders
Along with using the inference code with SG Lang
Base model: Qwen2.5-7B-Instruct
AV: https://huggingface.co/kitft/nla-qwen2.5-7b-L20-av
AR: https://huggingface.co/kitft/nla-qwen2.5-7b-L20-ar
Dataset:
https://huggingface.co/datasets/zen-E/GSM8k-Aug
Experiments:
NLAs are position sensitive:
Model Correctness Impact on NLA outputs:
Incorrect Model Responses have broken AV explanations:
Thought Anchors on NLAs:
NLAs and Reconstruction Loss:
Final Answers and Reconstruction Loss:
Per Sentence Reconstruction Loss:
Takeaways Limitations:
Future Work:
Appendix:
Degenerate Examples (#prompts being broken are more on the display end trying to make it images)
Coherent Examples
Mixed