diff --git a/notebooks/falcon-inference.ipynb b/notebooks/falcon-inference.ipynb deleted file mode 100644 index 8a9135f4b7..0000000000 --- a/notebooks/falcon-inference.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "You can use this notebook to generate texts using Falcon." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "6ixZpWQf-MFZ", - "outputId": "52be5ded-0640-4510-b605-13672f35893a" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cloning into 'litgpt'...\n", - "remote: Enumerating objects: 1527, done.\u001B[K\n", - "remote: Counting objects: 100% (375/375), done.\u001B[K\n", - "remote: Compressing objects: 100% (125/125), done.\u001B[K\n", - "remote: Total 1527 (delta 310), reused 271 (delta 249), pack-reused 1152\u001B[K\n", - "Receiving objects: 100% (1527/1527), 495.45 KiB | 5.38 MiB/s, done.\n", - "Resolving deltas: 100% (996/996), done.\n" - ] - } - ], - "source": [ - "# clone LitGPT\n", - "!git clone https://github.com/Lightning-AI/litgpt\n", - "%cd litgpt/" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "YJgQZwzi-UQ2" - }, - "outputs": [], - "source": [ - "# install the dependencies\n", - "!pip install -r requirements-all.txt -q" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "JVnohWmg-afB" - }, - "outputs": [], - "source": [ - "# download the weights\n", - "!python litgpt/scripts/download.py --repo_id tiiuae/falcon-7b" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "pfF2Il6N-nM1", - "outputId": "486d0c66-b071-4c48-8590-55ffe565d0e7" - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Time to load model: 148.99 seconds.\n", - "Global seed set to 1234\n", - "Hello, my name is Jack.\n", - "Some people think that dogs are like people. They see them as loyal, loving, and caring friends. I don't believe that's true. Dogs are animals. Animals are animals. I'm not a dog person.\n", - "Time for inference 1: 7.82 sec total, 6.39 tokens/sec\n", - "Memory used: 10.11 GB\n" - ] - } - ], - "source": [ - "# run inference\n", - "!python litgpt/generate/base.py \\\n", - " --prompt \"Hello, my name is\" \\\n", - " --checkpoint_dir checkpoints/tiiuae/falcon-7b \\\n", - " --quantize bnb.int8" - ] - } - ], - "metadata": { - "accelerator": "GPU", - "colab": { - "gpuType": "T4", - "provenance": [] - }, - "kernelspec": { - "display_name": "Python 3", - "name": "python3" - }, - "language_info": { - "name": "python" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/tutorials/download_falcon.md b/tutorials/download_falcon.md index 005691cc4e..f9e0ca0095 100644 --- a/tutorials/download_falcon.md +++ b/tutorials/download_falcon.md @@ -41,5 +41,3 @@ pip install tokenizers python litgpt/generate/base.py --prompt "Hello, my name is" --checkpoint_dir checkpoints/tiiuae/falcon-7b ``` - -or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Lightning-AI/litgpt/blob/main/notebooks/falcon-inference.ipynb)