{"id":13596459,"url":"https://github.com/lxe/simple-llm-finetuner","last_synced_at":"2025-05-15T14:05:55.749Z","repository":{"id":144626856,"uuid":"617272957","full_name":"lxe/simple-llm-finetuner","owner":"lxe","description":"Simple UI for LLM Model Finetuning","archived":false,"fork":false,"pushed_at":"2023-12-21T21:42:03.000Z","size":1608,"stargazers_count":2061,"open_issues_count":37,"forks_count":130,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-30T03:39:18.609Z","etag":null,"topics":["ai","gpt-2","gpt-3","huggingface","huggingface-transformers","llama","llm","peft","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lxe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-22T03:15:53.000Z","updated_at":"2025-04-24T04:35:55.000Z","dependencies_parsed_at":"2023-12-21T22:31:35.496Z","dependency_job_id":"e43ed06e-c5d5-40cc-aa53-78ac987842b3","html_url":"https://github.com/lxe/simple-llm-finetuner","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxe%2Fsimple-llm-finetuner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxe%2Fsimple-llm-finetuner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxe%2Fsimple-llm-finetuner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxe%2Fsimple-llm-finetuner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lxe","download_url":"https://codeload.github.com/lxe/simple-llm-finetuner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253505642,"owners_count":21918940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","gpt-2","gpt-3","huggingface","huggingface-transformers","llama","llm","peft","pytorch"],"created_at":"2024-08-01T16:02:27.712Z","updated_at":"2025-05-15T14:05:50.732Z","avatar_url":"https://github.com/lxe.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","A01_文本生成_文本对话"],"sub_categories":["大语言对话模型及数据"],"readme":"---\ntitle: Simple LLM Finetuner\nemoji: 🦙\ncolorFrom: yellow\ncolorTo: orange\nsdk: gradio\napp_file: app.py\npinned: false\n---\n\n## 👻👻👻 This project is effectively dead. Please use one of the following tools instead:\n- **https://github.com/hiyouga/LLaMA-Factory**\n- **https://github.com/unslothai/unsloth**\n- **https://github.com/oobabooga/text-generation-webui**\n\n---\n\n\n\n# 🦙 Simple LLM Finetuner\n\n[![Open In Colab](https://img.shields.io/static/v1?label=Open%20in%20Colab\u0026message=Select%20HIGH%20RAM\u0026color=yellow\u0026logo=googlecolab)](https://colab.research.google.com/github/lxe/simple-llama-finetuner/blob/master/Simple_LLaMA_FineTuner.ipynb)\n[![Open In Spaces](https://img.shields.io/badge/🤗-Open%20In%20Spaces-blue.svg)](https://huggingface.co/spaces/lxe/simple-llama-finetuner)\n[![](https://img.shields.io/badge/no-bugs-brightgreen.svg)](https://github.com/lxe/no-bugs) \n[![](https://img.shields.io/badge/coverage-%F0%9F%92%AF-green.svg)](https://github.com/lxe/onehundred/tree/master)\n\nSimple LLM Finetuner is a beginner-friendly interface designed to facilitate fine-tuning various language models using [LoRA](https://arxiv.org/abs/2106.09685) method via the [PEFT library](https://github.com/huggingface/peft) on commodity NVIDIA GPUs. With small dataset and sample lengths of 256, you can even run this on a regular Colab Tesla T4 instance.\n\nWith this intuitive UI, you can easily manage your dataset, customize parameters, train, and evaluate the model's inference capabilities.\n\n## Acknowledgements\n\n - https://github.com/zphang/minimal-llama/\n - https://github.com/tloen/alpaca-lora\n - https://github.com/huggingface/peft\n\n## Features\n\n- Simply paste datasets in the UI, separated by double blank lines\n- Adjustable parameters for fine-tuning and inference\n- Beginner-friendly UI with explanations for each parameter\n\n## Getting Started\n\n### Prerequisites\n\n- Linux or WSL\n- Modern NVIDIA GPU with \u003e= 16 GB of VRAM (but it might be possible to run with less for smaller sample lengths)\n\n### Usage\n\nI recommend using a virtual environment to install the required packages. Conda preferred.\n\n```\nconda create -n simple-llm-finetuner python=3.10\nconda activate simple-llm-finetuner\nconda install -y cuda -c nvidia/label/cuda-11.7.0\nconda install -y pytorch=2 pytorch-cuda=11.7 -c pytorch\n```\n\nOn WSL, you might need to install CUDA manually by following [these steps](https://developer.nvidia.com/cuda-downloads?target_os=Linux\u0026target_arch=x86_64\u0026Distribution=WSL-Ubuntu\u0026target_version=2.0\u0026target_type=deb_local), then running the following before you launch:\n\n```\nexport LD_LIBRARY_PATH=/usr/lib/wsl/lib\n```\n\nClone the repository and install the required packages.\n\n```\ngit clone https://github.com/lxe/simple-llm-finetuner.git\ncd simple-llm-finetuner\npip install -r requirements.txt\n```\n\nLaunch it\n\n```\npython app.py\n```\n\nOpen http://127.0.0.1:7860/ in your browser. Prepare your training data by separating each sample with 2 blank lines. Paste the whole training dataset into the textbox. Specify the new LoRA adapter name in the \"New PEFT Adapter Name\" textbox, then click train. You might need to adjust the max sequence length and batch size to fit your GPU memory. The model will be saved in the `lora/` directory.\n\nAfter training is done, navigate to \"Inference\" tab, select your LoRA, and play with it.\n\nHave fun!\n\n## YouTube Walkthough\n\nhttps://www.youtube.com/watch?v=yM1wanDkNz8\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxe%2Fsimple-llm-finetuner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxe%2Fsimple-llm-finetuner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxe%2Fsimple-llm-finetuner/lists"}