Git Product home page Git Product logo

cerebras-lora-alpaca's Introduction

title emoji colorFrom colorTo sdk sdk_version app_file pinned license
Lora Cerebras Gpt2.7b Alpaca Shortprompt
๐Ÿจ
yellow
pink
gradio
3.23.0
app.py
false
apache-2.0

๐Ÿฆ™๐Ÿ•๐Ÿง  Cerebras-GPT2.7B LoRA Alpaca ShortPrompt

Open In Colab Open In Spaces

Scripts to finetune Cerebras GPT2.7B on the Alpaca dataset, as well as inference demos.

๐Ÿ“ˆ Warnings

The model tends to be pretty coherent, but it also hallucinates a lot of factually incorrect responses. Avoid using it for anything requiring factual correctness.

๐Ÿ“š Instructions

  1. Be on a machine with an NVIDIA card with 12-24 GB of VRAM.

  2. Get the environment ready

conda create -n cerebras-lora python=3.10
conda activate cerebras-lora
conda install -y cuda -c nvidia/label/cuda-11.7.0
conda install -y pytorch=1.13.1 pytorch-cuda=11.7 -c pytorch
  1. Clone the repo and install requirements
git clone https://github.com/lxe/cerebras-lora-alpaca.git && cd !!
pip install -r requirements.txt
  1. Run the inference demo
python app.py

To reproduce the finetuning results, do the following:

  1. Install jupyter and run it
pip install jupyter
jupyter notebook
  1. Navigate to the inference.ipynb notebook and test out the inference demo.

  2. Navigate to the finetune.ipynb notebook and reproduce the finetuning results.

  • It takes about 5 hours with the default settings
  • Adjust the batch size and gradient accumulation steps to fit your GPU

๐Ÿ“ License

Apache 2.0

cerebras-lora-alpaca's People

Contributors

dev-jelly avatar lxe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.