the classic language models before LLMs existed
Which models are you referring to here? Earlier versions of GPT (like GPT-2)?
There are small LLMs like Phi 4 Mini that you could look at. Those were part of the "small language model" craze (SLMs).
If you want meaningful commit messages though, nothing beats handwritten messages. Commit frequently and the messages should be short and easy to come up with.