Prefix and language-modeling

to train a model to generate simple code in a specific programming language from what I understand it would be more appropriate to use the language-modeling script rather than the summarization script. However, I don’t understand:
1 - whether the text-generation script should be used as a consequence of the language-modeling script since I see that it doesn’t have an input dataset;
2 - how does the model understand that I’m requesting to write a code in that language, given that, unlike summarization, I don’t find any “prefix” specified?

Thank you.