{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "HLdoj4cz-xal" }, "source": [ "# Run.c\n", "\n", "More details can be found in the [README.md](README.md) ." ] }, { "cell_type": "markdown", "metadata": { "id": "nX78K1Fi-38d" }, "source": [ "## Clone Project" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "Une3Ozlnu1B7" }, "outputs": [], "source": [ "!git clone https://github.com/karpathy/llama2.c.git\n", "%cd llama2.c" ] }, { "cell_type": "markdown", "metadata": { "id": "1MB5LGla-8Ln" }, "source": [ "## Build" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "V1EGferJv_7o" }, "outputs": [], "source": [ "!make run" ] }, { "cell_type": "markdown", "metadata": { "id": "MuMpJio8_AKi" }, "source": [ "## Run" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "MRy23xxavJNO" }, "outputs": [], "source": [ "# run stories15M\n", "# !wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin\n", "# !./run stories110M.bin\n", "\n", "# run stories42M\n", "# !wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories42M.bin\n", "# !./run stories42M.bin\n", "\n", "# run stories110M\n", "!wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories110M.bin\n", "!./run stories110M.bin" ] }, { "cell_type": "markdown", "metadata": { "id": "Wi48eJKI_FKO" }, "source": [ "## Run with args" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "YFOv6U74vSSZ" }, "outputs": [], "source": [ "!./run stories110M.bin -t 0.8 -n 256 -i \"One day, Lily met a Shoggoth\"" ] } ], "metadata": { "colab": { "private_outputs": true, "provenance": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }