Sentient Simulations AI Python 3.7 Decompiler - 6.7b - v0.9
1. Introduction
The Sentient Simulations AI Python Decompiler is a deepseek-ai/deepseek-coder-6.7b-base finetune for the specific task of decompiling Python 3.7 bytecode back to its original Python source code.
The Sentient Simulations AI Python Decompiler data used Python 3.7 source code that was then compiled to bytecode. The bytecode was used as the input and the source code was used as the output to teach the model how to generate the original source code from Python bytecode. Below are the steps to prepare the data.
Grab a ton of Python code, or use something like The Stack v2, and compile it using the version of Python you want to use
Throw out any code that doesn't compile to that version of Python
Remove all comments from the code
Format all the code using Python black for consistency
Format the bytecode in a way that reduces tokens and is easier for the AI to read - I tried with custom tokens initially but I got inconsistent results
Generate input output pairs for the training data
Axolotl Sample packing was used to prepare the data with a constant context of 16k tokens
The bytecode has been written to bytecode-decompiled.pycb, now we need to switch to the Python 3.10 environment to run the decompiler on the test example