Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
license_link: >-
|
4 |
-
https://huggingface.co/
|
5 |
language:
|
6 |
- en
|
7 |
pipeline_tag: text-generation
|
@@ -14,22 +14,24 @@ tags:
|
|
14 |
- transformers
|
15 |
- qa
|
16 |
- sft
|
17 |
-
|
18 |
datasets:
|
19 |
-
-
|
20 |
widget:
|
21 |
-
- text:
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
24 |
---
|
25 |
## Model Summary
|
26 |
This model builds on the architecture of <a href="https://huggingface.com/microsoft/phi-2">Microsoft's Phi-2</a>, incorporating the LoRA [[1]](#1) paradigm for supervised fine-tuning on a high quality question answering dataset in the insurance domain.
|
27 |
-
Thus, `
|
28 |
|
29 |
## Dataset
|
30 |
We utilise the InsuranceQA dataset [[2]](#2), which comprises 27.96K QA pairs related to the insurance domain.
|
31 |
The content of this dataset consists of questions from real world users, the answers with high quality were composed by insurance professionals with deep domain knowledge.
|
32 |
-
Since the dataset isn't available in a readable format on the web, we make it available on huggingface in a `jsonl` format, at <a href="https://huggingface.com/datasets/
|
33 |
|
34 |
|
35 |
## Usage
|
@@ -61,8 +63,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
61 |
|
62 |
torch.set_default_device("cuda")
|
63 |
|
64 |
-
model = AutoModelForCausalLM.from_pretrained("
|
65 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
66 |
|
67 |
inputs = tokenizer('''### Instruction: What Does Basic Homeowners Insurance Cover?\n### Response: ''', return_tensors="pt", return_attention_mask=False)
|
68 |
|
@@ -90,7 +92,7 @@ print(text)
|
|
90 |
## Evaluation
|
91 |
Coming Soon!
|
92 |
|
93 |
-
## Limitations of `
|
94 |
* Generate Inaccurate Facts: The model may produce incorrect code snippets and statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate solutions.
|
95 |
* Unreliable Responses to Instruction: It may struggle or fail to adhere to intricate or nuanced instructions provided by users.
|
96 |
* Language Limitations: The model is primarily designed to understand standard English. Informal English, slang, or any other languages might pose challenges to its comprehension, leading to potential misinterpretations or errors in response.
|
@@ -100,9 +102,9 @@ Coming Soon!
|
|
100 |
|
101 |
|
102 |
## License
|
103 |
-
The model is licensed under the [MIT license](https://huggingface.co/
|
104 |
|
105 |
|
106 |
## Citations
|
107 |
[1] <a id="1" href="https://arxiv.org/abs/2106.09685">Hu, Edward J., et al. "Lora: Low-rank adaptation of large language models." arXiv preprint arXiv:2106.09685 (2021).</a></br>
|
108 |
-
[2] <a id="2" href="https://ieeexplore.ieee.org/abstract/document/7404872/">Feng, Minwei, et al. "Applying deep learning to answer selection: A study and an open task." 2015 IEEE workshop on automatic speech recognition and understanding (ASRU). IEEE, 2015.</a>
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
license_link: >-
|
4 |
+
https://huggingface.co/deccan-ai/phi-2-insurance_qa-sft-lora/resolve/main/LICENSE
|
5 |
language:
|
6 |
- en
|
7 |
pipeline_tag: text-generation
|
|
|
14 |
- transformers
|
15 |
- qa
|
16 |
- sft
|
|
|
17 |
datasets:
|
18 |
+
- deccan-ai/insuranceQA-v2
|
19 |
widget:
|
20 |
+
- text: |-
|
21 |
+
### Instruction: What is the difference between health and life insurance?
|
22 |
+
#### Response:
|
23 |
+
- text: |-
|
24 |
+
### Instruction: Does Homeowners Insurance Cover Death Of Owner?
|
25 |
+
#### Response:
|
26 |
---
|
27 |
## Model Summary
|
28 |
This model builds on the architecture of <a href="https://huggingface.com/microsoft/phi-2">Microsoft's Phi-2</a>, incorporating the LoRA [[1]](#1) paradigm for supervised fine-tuning on a high quality question answering dataset in the insurance domain.
|
29 |
+
Thus, `deccan-ai/phi-2-insurance_qa-sft-lora` serves as a text generation model capable of answering questions around insurance.
|
30 |
|
31 |
## Dataset
|
32 |
We utilise the InsuranceQA dataset [[2]](#2), which comprises 27.96K QA pairs related to the insurance domain.
|
33 |
The content of this dataset consists of questions from real world users, the answers with high quality were composed by insurance professionals with deep domain knowledge.
|
34 |
+
Since the dataset isn't available in a readable format on the web, we make it available on huggingface in a `jsonl` format, at <a href="https://huggingface.com/datasets/deccan-ai/insuranceQA-v2">deccan-ai/insuranceQA-v2</a>.
|
35 |
|
36 |
|
37 |
## Usage
|
|
|
63 |
|
64 |
torch.set_default_device("cuda")
|
65 |
|
66 |
+
model = AutoModelForCausalLM.from_pretrained("deccan-ai/phi-2-insurance_qa-sft-lora", torch_dtype="auto", trust_remote_code=True)
|
67 |
+
tokenizer = AutoTokenizer.from_pretrained("deccan-ai/phi-2-insurance_qa-sft-lora", trust_remote_code=True)
|
68 |
|
69 |
inputs = tokenizer('''### Instruction: What Does Basic Homeowners Insurance Cover?\n### Response: ''', return_tensors="pt", return_attention_mask=False)
|
70 |
|
|
|
92 |
## Evaluation
|
93 |
Coming Soon!
|
94 |
|
95 |
+
## Limitations of `deccan-ai/phi-2-insurance_qa-sft-lora`
|
96 |
* Generate Inaccurate Facts: The model may produce incorrect code snippets and statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate solutions.
|
97 |
* Unreliable Responses to Instruction: It may struggle or fail to adhere to intricate or nuanced instructions provided by users.
|
98 |
* Language Limitations: The model is primarily designed to understand standard English. Informal English, slang, or any other languages might pose challenges to its comprehension, leading to potential misinterpretations or errors in response.
|
|
|
102 |
|
103 |
|
104 |
## License
|
105 |
+
The model is licensed under the [MIT license](https://huggingface.co/deccan-ai/phi-2-insurance_qa-sft-lora/blob/main/LICENSE).
|
106 |
|
107 |
|
108 |
## Citations
|
109 |
[1] <a id="1" href="https://arxiv.org/abs/2106.09685">Hu, Edward J., et al. "Lora: Low-rank adaptation of large language models." arXiv preprint arXiv:2106.09685 (2021).</a></br>
|
110 |
+
[2] <a id="2" href="https://ieeexplore.ieee.org/abstract/document/7404872/">Feng, Minwei, et al. "Applying deep learning to answer selection: A study and an open task." 2015 IEEE workshop on automatic speech recognition and understanding (ASRU). IEEE, 2015.</a>
|