Let's start looking at what's happening over here https://github.com/ggerganov/ggml/tree/master/examples/mnist down to the flow of PRs and the kinds of discussions folks are having there (e.g. ggml-org/ggml#982).
The work being done there is obviously a massive refactoring of an earlier attempt at llama.cpp finetuning that was ripped out some time ago waiting for the above ggml research to conclude. The previous work was around here ggml-org/llama.cpp#8669 and here ggml-org/llama.cpp#2632)
It may actually make sense to look back at the last release of llama.cpp that still had that functionality just to appreciate the scope a little bit.