malmarjeh commited on
Commit
49f4be8
·
verified ·
1 Parent(s): b244e2e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +107 -3
README.md CHANGED
@@ -1,3 +1,107 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-Travel
9
+ results: []
10
+ model_type: mistral
11
+ pipeline_tag: text-generation
12
+ widget:
13
+ - messages:
14
+ - role: user
15
+ content: where to see flight tickets prices from chicago to madrid
16
+ ---
17
+
18
+ # Mistral-7B-Travel
19
+
20
+ ## Model Description
21
+
22
+ This model, "Mistral-7B-Travel", is a fine-tuned version of the [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2), specifically tailored for the Travel domain. It is optimized to answer questions and assist users with various Travel-related procedures. It has been trained using hybrid synthetic data generated using our NLP/NLG technology and our automated Data Labeling (DAL) tools.
23
+
24
+ The goal of this model is to show that a generic verticalized model makes customization for a final use case much easier. An overview of this approach can be found at: [From General-Purpose LLMs to Verticalized Enterprise Models](https://www.bitext.com/blog/general-purpose-models-verticalized-enterprise-genai/)
25
+
26
+ ## Intended Use
27
+
28
+ - **Recommended applications**: This model is designed to be used as the first step in Bitext’s two-step approach to LLM fine-tuning for the creation of chatbots, virtual assistants and copilots for the Travel domain, providing customers with fast and accurate answers about their travel needs.
29
+ - **Out-of-scope**: This model is not suited for non-travel related questions and should not be used for providing health, legal, or critical safety advice.
30
+
31
+ ## Usage Example
32
+
33
+ ```python
34
+ from transformers import AutoModelForCausalLM, AutoTokenizer
35
+ import torch
36
+
37
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
38
+
39
+ model = AutoModelForCausalLM.from_pretrained("bitext/Mistral-7B-Travel")
40
+ tokenizer = AutoTokenizer.from_pretrained("bitext/Mistral-7B-Travel")
41
+
42
+ messages = [
43
+ {"role": "user", "content": "where to see flight tickets prices from chicago to madrid?"},
44
+ ]
45
+
46
+ encoded = tokenizer.apply_chat_template(messages, return_tensors="pt")
47
+
48
+ model_inputs = encoded.to(device)
49
+ model.to(device)
50
+
51
+ generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
52
+ decoded = tokenizer.batch_decode(generated_ids)
53
+ print(decoded[0])
54
+ ```
55
+
56
+ ## Model Architecture
57
+
58
+ This model utilizes the `MistralForCausalLM` architecture with a `LlamaTokenizer`, ensuring it retains the foundational capabilities of the base model while being specifically enhanced for travel-related interactions.
59
+
60
+ ## Training Data
61
+
62
+ The model was fine-tuned on the [Bitext Travel Dataset](https://huggingface.co/datasets/bitext/Bitext-travel-llm-chatbot-training-dataset) comprising various travel-related intents, including: book_flight, choose_seat, check_arrival_time, book_trip, purchase_flight_insurance, check_cancellation_fee, check_baggage_allowance, and more. Totaling 33 intents, and each intent is represented by approximately 1000 examples. This comprehensive training helps the model address a broad spectrum of travel-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 travel.
63
+
64
+ ## Training Procedure
65
+
66
+ ### Hyperparameters
67
+
68
+ - **Optimizer**: AdamW
69
+ - **Learning Rate**: 0.0002 with a cosine learning rate scheduler
70
+ - **Epochs**: 1
71
+ - **Batch Size**: 4
72
+ - **Gradient Accumulation Steps**: 8
73
+ - **Maximum Sequence Length**: 8192 tokens
74
+
75
+ ### Environment
76
+
77
+ - **Transformers Version**: 4.43.4
78
+ - **Framework**: PyTorch 2.3.1+cu121
79
+ - **Tokenizers**: Tokenizers 0.19.1
80
+
81
+ ## Limitations and Bias
82
+
83
+ - The model is trained for travel-specific contexts but may underperform in unrelated areas.
84
+ - Potential biases in the training data could affect the neutrality of the responses; users are encouraged to evaluate responses critically.
85
+
86
+ ## Ethical Considerations
87
+
88
+ It is important to use this technology thoughtfully, ensuring it does not substitute for human judgment where necessary, especially in sensitive situations.
89
+
90
+ ## Acknowledgments
91
+
92
+ This model was developed and trained by Bitext using proprietary data and technology.
93
+
94
+ ## License
95
+
96
+ This model, "Mistral-7B-Travel", 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.
97
+
98
+ ### Key Points of the Apache 2.0 License
99
+
100
+ - **Permissibility**: Users are allowed to use, modify, and distribute this software freely.
101
+ - **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.
102
+ - **Patent Grant**: The license includes a grant of patent rights from the contributors of the model.
103
+ - **No Warranty**: The model is provided "as is" without warranties of any kind.
104
+
105
+ You may view the full license text at [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
106
+
107
+ 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.