From 97b92b6b22af533e8363f08dcf6cb875db04dc3a Mon Sep 17 00:00:00 2001 From: deep1 Date: Sat, 22 Apr 2023 20:02:32 +0800 Subject: [PATCH] clean --- mjc_notes.md | 8 +-- notebooks/.gitkeep | 0 notebooks/01.ipynb | 65 +++++++++++++++++++ .../requirements.txt => requirements.txt | 0 scripts/clone-model.py | 4 +- 5 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 notebooks/.gitkeep create mode 100644 notebooks/01.ipynb rename requirements/requirements.txt => requirements.txt (100%) diff --git a/mjc_notes.md b/mjc_notes.md index 673bd80..8696151 100644 --- a/mjc_notes.md +++ b/mjc_notes.md @@ -33,10 +33,10 @@ pip install git+https://github.com/sterlind/GPTQ-for-LLaMa.git@lora_4bit ```sh # # base models.... FIXME -python scripts/clone-model.py decapoda-research/llama-7b-hf -python scripts/clone-model.py decapoda-research/llama-13b-hf -python scripts/clone-model.py decapoda-research/llama-30b-hf -python scripts/clone-model.py decapoda-research/llama-65b-hf +python scripts/download-model.py decapoda-research/llama-7b-hf +python scripts/download-model.py decapoda-research/llama-13b-hf +python scripts/download-model.py decapoda-research/llama-30b-hf +python scripts/download-model.py decapoda-research/llama-65b-hf # oh! you need to replace LLaMATokenizer with LlamaTokenizer in all model json files # download loras diff --git a/notebooks/.gitkeep b/notebooks/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/notebooks/01.ipynb b/notebooks/01.ipynb new file mode 100644 index 0000000..b88ad34 --- /dev/null +++ b/notebooks/01.ipynb @@ -0,0 +1,65 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The autoreload extension is already loaded. To reload it, use:\n", + " %reload_ext autoreload\n" + ] + }, + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'alpaca_convert'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[2], line 4\u001b[0m\n\u001b[1;32m 2\u001b[0m get_ipython()\u001b[39m.\u001b[39mrun_line_magic(\u001b[39m'\u001b[39m\u001b[39mload_ext\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mautoreload\u001b[39m\u001b[39m'\u001b[39m)\n\u001b[1;32m 3\u001b[0m get_ipython()\u001b[39m.\u001b[39mrun_line_magic(\u001b[39m'\u001b[39m\u001b[39mautoreload\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39m2\u001b[39m\u001b[39m'\u001b[39m)\n\u001b[0;32m----> 4\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39malpaca_convert\u001b[39;00m\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'alpaca_convert'" + ] + } + ], + "source": [ + "# autoreload your package\n", + "%load_ext autoreload\n", + "%autoreload 2\n", + "import alpaca_convert" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "textgen", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.10" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/requirements/requirements.txt b/requirements.txt similarity index 100% rename from requirements/requirements.txt rename to requirements.txt diff --git a/scripts/clone-model.py b/scripts/clone-model.py index 190b97a..fa407f3 100644 --- a/scripts/clone-model.py +++ b/scripts/clone-model.py @@ -35,4 +35,6 @@ if __name__ == '__main__': assert result.returncode==0, 'git lfs should be installed' print(f'cloning "{repo}" to "{dest}"') - Repo.clone_from(repo, dest, multi_options=['--depth=1']) + Repo.clone_from(repo, dest, multi_options=['--depth=1', '--branch=main', '--filter=blob:none']) + + # FIXME it clones the git folder that has a huge size, it seems to have the old git lfs objects. so it's double the size. I can't seem to stop that