Hi wpetry
I haven’t tried brms package before.
But, I think you do not need to include your data and the fitting statement in your compilation file. The compilation file should only include the specification of your model.
Then, use another R file that first has a statement to call “load” your compiled file and then has your data and the fitting statement.
Hope this helps.