Falcon is a family of open-source large language models (LLMs) with 7 billion and 40 billion parameters trained on one trillion tokens.
We can fine-tune Falcon on Q Blocks cloud by running these commands for installation and execution:
GPU configuration:
We would recommend choosing a 40GB or higher GPU such as 1x A100 40GB/80GB, 1x A6000 or 2x A100 80GB from the Data center nodes option on Q Blocks platform while launching a GPU instance.
Install miniconda
# Download latest miniconda.wget-nchttps://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh# Install. -b is used to skip promptbashMiniconda3-latest-Linux-x86_64.sh-b# Activate.eval"$(/home/qblocks/miniconda3/bin/condashell.bashhook)"# (optional) Add activation cmd to bashrc so you don't have to run the above every time.printf'\neval "$(/home/qblocks/miniconda3/bin/conda shell.bash hook)"'>>~/.bashrc
Setup env
Install using the yaml file:
# Create and activate env. -y skips confirmation prompt.condacreate-nfalcon-envpython=3.9-ycondaactivatefalcon-env# newest torch with cuda 11.8condainstallpytorchtorchvisiontorchaudiopytorch-cuda=11.8-cpytorch-cnvidia# Install other dependenciespipinstall-Uaccelerateeinopssentencepiecegit+https://github.com/huggingface/transformers.git&& \pipinstall-Utrlgit+https://github.com/huggingface/peft.git&& \pipinstallscipydatasetsbitsandbyteswandb
Start the run
Download script and execute it in conda environment: