Experimental minimal tinyllama training and finetuning on Tesla Nvidia P100
Download TinyStories_all_data.tar.gz from: https://huggingface.co/datasets/roneneldan/TinyStories
https://huggingface.co/karpathy/tinyllamas/
Download 15M model and put it in ./res/asset/models/karpathy/tinyllama/
start with preparing dataset:
(use full dataset for better results)
./src-finetuning/prepare_instruct_dataset.pyTrain from scratch using the generated data:
./src-finetuning/instruct_training_from_scratch.pyInstruct lora finetune using 15M tinyllama model
./src-finetuning/instruct_lora_finetune.pyExample use of inferencing script:
python src-finetuning/generate.py --model_path='./build/models/lora_story_teller_110M.pt' --prompt='Write a story. In the story, try to use the verb "climb", the noun "ring" and the adjective "messy". Possible story:' --temperature=0.1 --top_k=10Based on:
- https://github.com/cindysridykhan/instruct_storyteller_tinyllama2/
- https://github.com/ruirui-zhang/instruct_storyteller_tinyllama2
- https://github.com/karpathy/nanoGPT
- https://github.com/karpathy/llama2.c
Apache-2.0