those weights are trained till the point where eval loss plateaued:
step:5304
epoche:17 (312 step per epoche)
eval_loss=2.4635733440906233
training_loss=1.9883270917440328
after that point training loss kept going down and eval loss going up
these samples were tokenized using my custom made tokenizer (included in the notebook model/training.ipynb) according to the merge rules (dataset/mearges.pkl).
in this directory you will find the merges rules for the custom made tokenizer which was trained on wiki-2 train text (utf-8) with 4000 merges so the total vocab is 4256 (4000+256) , and you will find the actual dataset fully tokenized (both the evaluation and training data).
uploaded the main transformer code (inference and training)
the inference code is usable on cpu and gpu, but training code requires 2 gpus for running , one for the actual training and the other for the evaluation , You can modify it to run on one gpu (training only) or to run the evaluation on a part of the cpu (i may do that in the future).
the model is already pretrained on wiki-2 dataset which is included in this repo. the model is small (6.9M parameters) and the training data extracted from the dataset is even smaller (5M+ tokens) so the model doesnt have knowledge for meaning but he can generate good english text and text pattern and will always generate wiki style text.