File size: 4,053 Bytes
4805236 1a9ed9f 4805236 42dab29 1a9ed9f 71207f0 1a9ed9f 42dab29 1a9ed9f 42dab29 1a9ed9f 1ea34fc 1a9ed9f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
---
license: cc-by-nc-4.0
datasets:
- tatsu-lab/alpaca
language:
- en
---
# Eluwa: A Conversational LoRA for Facebook's OPT Architecture
![logo](https://huggingface.co/BackyardLabs/Eluwa-6.7b/resolve/main/eluwa67.png "you baaaaaa'd, sir?")
Eluwa is a fine-tuned Low-Rank Adapter (LoRA) model for Facebook's OPT 1.3b, 2.7b and 6.7b. It is trained on the Stanford Alpaca dataset.
This repository contains the Eluwa 6.7b 2 epoch model, which represents a significant improvements in question-answering ability compared to the default OPT 6.7b model.
Below are the results of Vicuna-style testing: 80 questions in various categories, with the responses rated by GPT-4.
| Model | OPT 6.7b base | Eluwa 6.7b 1000 iter | Eluwa 6.7b 2 epoch |
|----------------|---------------|----------------------|--------------------|
| Generic | 65 | 74 | 77 |
| Knowledge | 57 | 89 | 72 |
| Roleplay | 49 | 70 | 80 |
| Common sense | 67 | 80 | 86 |
| Fermi | 27 | 16 | 26 |
| Counterfactual | 30 | 43 | 71 |
| Coding | 9 | 9 | 7 |
| Math | 3 | 3 | 10 |
| Writing | 13 | 24 | 10 |
| Total | 320 | 408 | 439 |
A csv of questions, answers and GPT's reviews are also included in this repo in the /TestResults/ folder, along with the base model for comparison.
## Using Eluwa
I used [oobabooga's text generation UI](https://github.com/oobabooga/text-generation-webui) for testing, because it lets me easily regenerate outputs, modify the conversation history passed to the model, and mess with parameters.
To load Eluwa, download [OPT 6.7b from Huggingface](https://huggingface.co/facebook/opt-6.7b) and download both the .bin and .json file from the /model folder on this Github. Follow the instructions on the text generation UI repository to figure out where the model goes and how to load a LoRA. Eluwa goes in the /loras folder.
## Training and notes
Training Eluwa is a straightforward process. It is essentially Facebook's GPT-like OPT 6.7b model, loaded in 8-bit and trained using [Stanford's Alapaca dataset](https://github.com/tatsu-lab/stanford_alpaca).
Use the [Colab notebook here](https://huggingface.co/BackyardLabs/Eluwa/blob/main/Train_eluwa.ipynb). I've written notes in there on what the functions do.
## Why "Eluwa"?
Well, the whole thing was inspiration from Alpaca, which is a LoRA based on Llama. Others adopted the trend (Cabrita, Vicuna etc). Now, in Sri Lanka, we don't have llamas (at least, I've never seen any), but we do have goats. Goats are spectacular animals. In Ragama I once beheld a goat fighting a pack of stray dogs (and winning). Then it came for me. I hit it on the head with my umbrella, whereupon which it ate the umbrella and chased me the length and breadth of the entire village.
If you can't beat em, join em. "Eluwa" means goat. Goats are fearsome, versatile, and double as the essential ingredient in mutton rolls. Everything in the known universe is either a goat, or not a goat. They're not as nice as llamas or alpacas, but they'll do.
## License
Facebook's OPT has [its own license. Please read it here.](https://github.com/facebookresearch/metaseq/blob/main/projects/OPT/MODEL_LICENSE.md)
Alpaca is licensed for research use only. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and they note that models trained using the dataset should not be used outside of research purposes.
Eluwa, therefore, is only for research and non-commercial use, under CC BY NC 4.0. Go experiment with it, but don't use it commercially. This applies to the testing dataset.
|