alexandreteles
commited on
Commit
•
0f23586
1
Parent(s):
2415847
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- BatsResearch/ctga-v1
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
library_name: transformers
|
7 |
+
pipeline_tag: text2text-generation
|
8 |
+
tags:
|
9 |
+
- data generation
|
10 |
+
---
|
11 |
+
|
12 |
+
# Bonito-v1 AWQ
|
13 |
+
|
14 |
+
- Original model: [BatsResearch/bonito-v1](https://huggingface.co/BatsResearch/bonito-v1)
|
15 |
+
|
16 |
+
## Model Card for bonito
|
17 |
+
|
18 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
19 |
+
|
20 |
+
Bonito is an open-source model for conditional task generation: the task of converting unannotated text into task-specific training datasets for instruction tuning.
|
21 |
+
|
22 |
+
![Bonito](https://raw.githubusercontent.com/BatsResearch/bonito/main/assets/workflow.jpg)
|
23 |
+
|
24 |
+
## Model Details
|
25 |
+
|
26 |
+
### Model Description
|
27 |
+
|
28 |
+
<!-- Provide a longer summary of what this model is. -->
|
29 |
+
|
30 |
+
Bonito can be used to create synthetic instruction tuning datasets to adapt large language models on users' specialized, private data.
|
31 |
+
In our [paper](https://github.com/BatsResearch/bonito), we show that Bonito can be used to adapt both pretrained and instruction tuned models to tasks without any annotations.
|
32 |
+
|
33 |
+
- **Developed by:** Nihal V. Nayak, Yiyang Nan, Avi Trost, and Stephen H. Bach
|
34 |
+
- **Model type:** MistralForCausalLM
|
35 |
+
- **Language(s) (NLP):** English
|
36 |
+
- **License:** TBD
|
37 |
+
- **Finetuned from model:** `mistralai/Mistral-7B-v0.1`
|
38 |
+
|
39 |
+
### Model Sources
|
40 |
+
|
41 |
+
<!-- Provide the basic links for the model. -->
|
42 |
+
|
43 |
+
- **Repository:** [https://github.com/BatsResearch/bonito](https://github.com/BatsResearch/bonito)
|
44 |
+
- **Paper:** Arxiv link
|
45 |
+
|
46 |
+
## Uses
|
47 |
+
|
48 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
49 |
+
|
50 |
+
### Direct Use
|
51 |
+
|
52 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
53 |
+
To easily generate synthetic instruction tuning datasets, we recommend using the [bonito](https://github.com/BatsResearch/bonito) package built using the `transformers` and the `vllm` libraries.
|
54 |
+
|
55 |
+
```python
|
56 |
+
from bonito import Bonito, SamplingParams
|
57 |
+
from datasets import load_dataset
|
58 |
+
|
59 |
+
# Initialize the Bonito model
|
60 |
+
bonito = Bonito()
|
61 |
+
|
62 |
+
# load dataaset with unannotated text
|
63 |
+
unannotated_text = load_dataset(
|
64 |
+
"BatsResearch/bonito-experiment",
|
65 |
+
"unannotated_contract_nli"
|
66 |
+
)["train"].select(range(10))
|
67 |
+
|
68 |
+
# Generate synthetic instruction tuning dataset
|
69 |
+
sampling_params = SamplingParams(max_tokens=256, top_p=0.95, temperature=0.5, n=1)
|
70 |
+
synthetic_dataset = bonito.generate_tasks(
|
71 |
+
unannotated_text,
|
72 |
+
context_col="input",
|
73 |
+
task_type="nli",
|
74 |
+
sampling_params=sampling_params
|
75 |
+
)
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
### Out-of-Scope Use
|
80 |
+
|
81 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
82 |
+
|
83 |
+
Our model is trained to generate the following task types: summarization, sentiment analysis, multiple-choice question answering, extractive question answering, topic classification, natural language inference, question generation, text generation, question answering without choices, paraphrase identification, sentence completion, yes-no question answering, word sense disambiguation, paraphrase generation, textual entailment, and
|
84 |
+
coreference resolution.
|
85 |
+
The model might not produce accurate synthetic tasks beyond these task types.
|