PhilipQuirke / quanta_maths

Tool used to verify accuracy of transformer model
Apache License 2.0
1 stars 1 forks source link

Refactor: Move PCA code from CoLab to code #2

Closed PhilipQuirke closed 6 months ago

PhilipQuirke commented 7 months ago

Part 19A/B/C of the Notebooks\VerifiedArithmeticAnalyse.ipynb relate to PCA analysis of the transformer model. They contain code that can be reused by other (non-Math) CoLabs. It code includes some maths specific code

Migrate the code out of CoLab and into new files QuantaTools\model_pca.py and QuantaTools\math_pca.py file. Pass cfg (and any other info needed) as params to the new functions. model_pca.py should contain generic code - maths_pca.py specific code any code specific to maths.

Simplify the CoLab by removing the corresponding code. Test the simplified CoLab can run the new function.

Consider making the same simplifications to Notebooks\Accurate_Math_Analyse.ipynb. Only do this if the PCA code is very similar in both. (Accurate_Math_Analyse is historic and relates to Paper 2. At some point we will stop maintaining it.)

amirabdullah19852020 commented 7 months ago

If you can assign this to me please.

amirabdullah19852020 commented 7 months ago

I'll do this monday night my time.

amir-in-a-cynch commented 7 months ago

Got sidetracked, but I will still get to this today or tomorrow.

amirabdullah19852020 commented 6 months ago

Partially done for parts 19 A. The automatic part may need some cleanup before it can be refactored out fully.

PhilipQuirke commented 6 months ago

Happy to close issue