/LLM-Fine-Tuning-Playground

This repo will contain various examples of fine tuning large language models.

Primary LanguageJupyter Notebook

LLM-Fine-Tuning-Playground

This repo will contain various examples of fine tuning large language models.

*** mamba activate ftllm ***

Wednesday, August 7, 2024

Creating and Uploading a Dataset with Unsloth: An Adventure in Wonderland

Saturday, June 8, 2024

Working through the document from below ...

  • mamba install conda-forge::sentence-transformers

Friday, June 7, 2024

Training and Finetuning Embedding Models with Sentence Transformers v3

Tuesday, May 14, 2024

Another re-run of Alpaca_+_Llama_3_8b_full_example _(Prompt_Engineering).ipynb with higher settngs.

And gonna take a small segway into Triton since this stuff is in the unsloth_env2 environment. The code will go into the 'Triton' folder. Looking at this stuff, the impulse is to get back to CUDA ...

*** mamba activate unsloth_env2 ***

Attempting to run Triton/01-vector-add.py

Really!? No matplotlib in the unsloth_env2 environment?!! ...

  • mamba install conda-forge::matplotlib
  • mamba install conda-forge::pytest
  • mamba install conda-forge::tabulate

Monday, May 13, 2024

Working through peft_finetuning.ipynb

  1. mamba install conda-forge::sentencepiece
  2. pip install llama-recipes (notice the mis-spelling of recipes)

Trying to understand why running peft_finetuning.ipynb the first time training took 35 minutes, then running it again with profileing enabled from the copied notebook peft_finetuning_2.ipynb it took about a minute and a half, then re-running peft_finetuning_2.ipynb again, but with a different target folder of tmp-profile it again took about a minute and a half ... is this because of something to do with wandb?? I really don't get it ...

Viewing the first 20 seconds of LLAMA-3 🦙: EASIET WAY To FINE-TUNE ON YOUR DATA shows me right away there are multiple open-source libraries available to facilitate fine tuning of local large language models. Sooo much energy is being directed at this task and it is rapidly shifting, so keep on this!

The Youtube channel Prompt Engineering is excellent! Gonna habituate looking at this channel!

*** mamba activate unsloth_env ***

Checking out unsloth. Create the new conda environment 'unsloth_env' for running the notebook 'Alpaca_+_Llama_3_8b_full_example.ipynb' linked from the page Finetune Llama 3 - 2x faster + 6x longer context + 68% less VRAM

Alpaca + Llama-3 8b full example.ipynb

Damn! My preliminary dive into unsloth is revealing some fantastic features of this package!

I was able to run 'Alpaca_+_Llama_3_8b_full_example.ipynb' in unsloth_dev with no problems!

Now will create a second conda environment almost identical to unsloth_env bit with a slightly different setup, supposedly catered to a 4090, and will name it unsloth_env2 ... I know ... really creative, right!?

Hmm so ran this other notebook, and I really fail to see how this is any different from the first run ... meh.

Sunday, May 12, 2024

Noteable links:

Saturday, May 11, 2024

Starting to run through the notebook 'Causal_models_like_Gemma_2B_finetuning_on_SamSum.ipynb', and looks like I have more stuff to install ...

  1. mamba install conda-forge::huggingface_hub
  2. mamba install conda-forge::ipywidgets
  3. pip install evaluate
  4. pip install rouge-score