Update README.md
Browse files
README.md
CHANGED
@@ -19,4 +19,97 @@ tags:
|
|
19 |
- QLoRA
|
20 |
- LoRA
|
21 |
- SFTTrainer
|
22 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
- QLoRA
|
20 |
- LoRA
|
21 |
- SFTTrainer
|
22 |
+
---
|
23 |
+
|
24 |
+
|
25 |
+
---
|
26 |
+
library_name: peft
|
27 |
+
datasets:
|
28 |
+
- squad
|
29 |
+
- tiiuae/falcon-refinedweb
|
30 |
+
language:
|
31 |
+
- en
|
32 |
+
tags:
|
33 |
+
- llms
|
34 |
+
- falcon-7b
|
35 |
+
- open source llms
|
36 |
+
- fine tuning llms
|
37 |
+
- QLoRA
|
38 |
+
- PEFT
|
39 |
+
- LoRA
|
40 |
+
---
|
41 |
+
|
42 |
+
# 🚀 Falcon-7b-QueAns
|
43 |
+
|
44 |
+
Falcon-7b-QueAns is a chatbot-like model for Question and Answering. It was built by fine-tuning [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) on the [SQuAD](https://huggingface.co/datasets/squad) dataset. This repo only includes the QLoRA adapters from fine-tuning with 🤗's [peft](https://github.com/huggingface/peft) package.
|
45 |
+
|
46 |
+
## Model Summary
|
47 |
+
|
48 |
+
- **Model Type:** Causal decoder-only
|
49 |
+
- **Language(s):** English
|
50 |
+
- **Base Model:** Falcon-7B (License: Apache 2.0)
|
51 |
+
- **Dataset:** [SQuAD](https://huggingface.co/datasets/squad) (License: cc-by-4.0)
|
52 |
+
- **License(s):** Apache 2.0 inherited from "Base Model" and "Dataset"
|
53 |
+
|
54 |
+
|
55 |
+
## Why use Falcon-7B?
|
56 |
+
|
57 |
+
* **It outperforms comparable open-source models** (e.g., [MPT-7B](https://huggingface.co/mosaicml/mpt-7b), [StableLM](https://github.com/Stability-AI/StableLM), [RedPajama](https://huggingface.co/togethercomputer/RedPajama-INCITE-Base-7B-v0.1) etc.), thanks to being trained on 1,500B tokens of [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb) enhanced with curated corpora. See the [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
|
58 |
+
* **It features an architecture optimized for inference**, with FlashAttention ([Dao et al., 2022](https://arxiv.org/abs/2205.14135)) and multiquery ([Shazeer et al., 2019](https://arxiv.org/abs/1911.02150)).
|
59 |
+
* **It is made available under a permissive Apache 2.0 license allowing for commercial use**, without any royalties or restrictions.
|
60 |
+
|
61 |
+
⚠️ **This is a finetuned version for specifically question and answering.** If you are looking for a version better suited to taking generic instructions in a chat format, we recommend taking a look at [Falcon-7B-Instruct](https://huggingface.co/tiiuae/falcon-7b-instruct).
|
62 |
+
|
63 |
+
🔥 **Looking for an even more powerful model?** [Falcon-40B](https://huggingface.co/tiiuae/falcon-40b) is Falcon-7B's big brother!
|
64 |
+
|
65 |
+
|
66 |
+
## Model Details
|
67 |
+
|
68 |
+
The model was fine-tuned in 4-bit precision using 🤗 `peft` adapters, `transformers`, and `bitsandbytes`. Training relied on a method called "Low Rank Adapters" ([LoRA](https://arxiv.org/pdf/2106.09685.pdf)), specifically the [QLoRA](https://arxiv.org/abs/2305.14314) variant. The run took approximately 4 hours and was executed on a workstation with a single T4 NVIDIA GPU with 15 GB of available memory. See attached [Colab Notebook] used to train the model.
|
69 |
+
|
70 |
+
### Model Date
|
71 |
+
|
72 |
+
July 06, 2023
|
73 |
+
|
74 |
+
|
75 |
+
Open source falcon 7b large language model fine tuned on SQuAD dataset for question and answering.
|
76 |
+
|
77 |
+
QLoRA technique used for fine tuning the model on consumer grade GPU
|
78 |
+
SFTTrainer is also used.
|
79 |
+
|
80 |
+
Dataset used: SQuAD
|
81 |
+
Dataset Size: 87278
|
82 |
+
Training Steps: 500
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
## Training procedure
|
88 |
+
|
89 |
+
|
90 |
+
The following `bitsandbytes` quantization config was used during training:
|
91 |
+
- load_in_8bit: True
|
92 |
+
- load_in_4bit: False
|
93 |
+
- llm_int8_threshold: 6.0
|
94 |
+
- llm_int8_skip_modules: None
|
95 |
+
- llm_int8_enable_fp32_cpu_offload: False
|
96 |
+
- llm_int8_has_fp16_weight: False
|
97 |
+
- bnb_4bit_quant_type: nf4
|
98 |
+
- bnb_4bit_use_double_quant: False
|
99 |
+
- bnb_4bit_compute_dtype: float16
|
100 |
+
|
101 |
+
The following `bitsandbytes` quantization config was used during training:
|
102 |
+
- load_in_8bit: True
|
103 |
+
- load_in_4bit: False
|
104 |
+
- llm_int8_threshold: 6.0
|
105 |
+
- llm_int8_skip_modules: None
|
106 |
+
- llm_int8_enable_fp32_cpu_offload: False
|
107 |
+
- llm_int8_has_fp16_weight: False
|
108 |
+
- bnb_4bit_quant_type: nf4
|
109 |
+
- bnb_4bit_use_double_quant: False
|
110 |
+
- bnb_4bit_compute_dtype: float16
|
111 |
+
### Framework versions
|
112 |
+
|
113 |
+
- PEFT 0.4.0.dev0
|
114 |
+
|
115 |
+
- PEFT 0.4.0.dev0
|