The blog also highlights the challenges of controlling LLMs due to their non-deterministic nature, but notes that there are now ways to control the LLM's output to match a desired format. The process of un-minifying Javascript involves unbundling webpack bundles, running the code through transform-beautifier and custom Babel plugins, looping through all variables in the code to generate better names, renaming the variables using Babel, and running a final round of Prettier for whitespace. The tool used for this process, Humanify, is open source and available on Github.
Key takeaways:
- The blog introduces a novel way to reverse minified Javascript using large language models (LLMs) like ChatGPT and llama2, keeping the code semantically intact.
- LLMs are used to describe the intent of variables and generate better names based on that description, but they are not used for the actual renaming and modification of the code due to their inherent randomness.
- The process of un-minifying Javascript involves several steps including unbundling webpack bundles, reversing lossless minification, renaming variables using LLMs and Babel, and ensuring nice whitespace with Prettier.
- The tool for this process, called Humanify, is open source and available on Github.