Is there AI which we can use the train text files?

Dears,
is there somewhere confirmed code that which might work for the training of the text files?
I already tested alot of codes but none of them worked for me until now.
Fine-tune is also not working.
Any help on that please.

Thanks in advance