malmarjeh commited on
Commit
054a4fb
1 Parent(s): 8c7fd82

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -0
README.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ inference: false
4
+ tags:
5
+ - generated_from_trainer
6
+ - text-generation-inference
7
+ model-index:
8
+ - name: Mistral-7B-Banking-v2
9
+ results: []
10
+ model_type: mistral
11
+ pipeline_tag: text-generation
12
+ widget:
13
+ - messages:
14
+ - role: user
15
+ content: I want to close an online account
16
+ ---
17
+
18
+ # Mistral-7B-Banking-v2
19
+
20
+ ## Model Description
21
+
22
+ "Mistral-7B-Banking-v2" is a specialized adaptation of the [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2), designed to provide precise answers related to general banking queries. This model is fine-tuned to help users with common banking tasks and inquiries.
23
+
24
+ ## Intended Use
25
+
26
+ - **Recommended applications**: Ideal for deployment in digital banking platforms where quick and accurate customer service responses are needed. It can be integrated into banking chatbots to assist users with transactions, account information, and other banking services.
27
+ - **Out-of-scope**: This model is not suited for non-banking related questions and should not be used for providing health, legal, or critical safety advice.
28
+
29
+ ## Usage Example
30
+
31
+ ```python
32
+ from transformers import AutoModelForCausalLM, AutoTokenizer
33
+
34
+ model = AutoModelForCausalLM.from_pretrained("bitext-llm/Mistral-7B-Banking-v2")
35
+ tokenizer = AutoTokenizer.from_pretrained("bitext-llm/Mistral-7B-Banking-v2")
36
+
37
+ inputs = tokenizer("<s>[INST] How can I transfer money to another account?[/INST]", return_tensors="pt")
38
+ outputs = model.generate(inputs['input_ids'], max_length=50)
39
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
40
+ ```
41
+
42
+ ## Model Architecture
43
+
44
+ This model utilizes the `MistralForCausalLM` architecture with a `LlamaTokenizer`, ensuring it retains the foundational capabilities of the base model while being specifically enhanced for banking-related interactions.
45
+
46
+ ## Training Data
47
+
48
+ The model was fine-tuned on a dataset comprising various banking-related intents, including transactions like balance checks, money transfers, loan applications, and more, totaling 89 intents each represented by approximately 1000 examples. This comprehensive training helps the model address a broad spectrum of banking-related questions effectively. The dataset follows the same structured approach as our dataset published on Hugging Face as [bitext/Bitext-customer-support-llm-chatbot-training-dataset](https://huggingface.co/datasets/bitext/Bitext-customer-support-llm-chatbot-training-dataset), but with a focus on banking.
49
+
50
+ ## Training Procedure
51
+
52
+ ### Hyperparameters
53
+
54
+ - **Optimizer**: AdamW
55
+ - **Learning Rate**: 0.0002 with a cosine learning rate scheduler
56
+ - **Epochs**: 4
57
+ - **Batch Size**: 10
58
+ - **Gradient Accumulation Steps**: 8
59
+ - **Maximum Sequence Length**: 8192 tokens
60
+
61
+ ### Environment
62
+
63
+ - **Transformers Version**: 4.40.0.dev0
64
+ - **Framework**: PyTorch 2.2.1+cu121
65
+ - **Tokenizers**: Tokenizers 0.15.0
66
+
67
+ ## Limitations and Bias
68
+
69
+ - The model is trained for banking-specific contexts but may underperform in unrelated areas.
70
+ - Potential biases in the training data could affect the neutrality of the responses; users are encouraged to evaluate responses critically.
71
+
72
+ ## Ethical Considerations
73
+
74
+ It is important to use this technology thoughtfully, ensuring it does not substitute for human judgment where necessary, especially in sensitive financial situations.
75
+
76
+ ## Acknowledgments
77
+
78
+ This model was developed and trained by Bitext using proprietary data and technology.
79
+
80
+ ## License
81
+
82
+ This model, "Mistral-7B-Banking-v2", is licensed under the Apache License 2.0 by Bitext Innovations International, Inc. This open-source license allows for free use, modification, and distribution of the model but requires that proper credit be given to Bitext.
83
+
84
+ ### Key Points of the Apache 2.0 License
85
+
86
+ - **Permissibility**: Users are allowed to use, modify, and distribute this software freely.
87
+ - **Attribution**: You must provide proper credit to Bitext Innovations International, Inc. when using this model, in accordance with the original copyright notices and the license.
88
+ - **Patent Grant**: The license includes a grant of patent rights from the contributors of the model.
89
+ - **No Warranty**: The model is provided "as is" without warranties of any kind.
90
+
91
+ You may view the full license text at [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
92
+
93
+ This licensing ensures the model can be used widely and freely while respecting the intellectual contributions of Bitext. For more detailed information or specific legal questions about using this license, please refer to the official license documentation linked above.