Question Answering
Transformers
Safetensors
qwen2
text-generation
text-generation-inference
haiFrHust commited on
Commit
fed8dde
·
verified ·
1 Parent(s): f53a3b6

README updated

Browse files
Files changed (1) hide show
  1. README.md +135 -3
README.md CHANGED
@@ -1,3 +1,135 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - bkai-foundation-models/vi-alpaca-input-output-format
5
+ - CausalLM/GPT-4-Self-Instruct-Japanese
6
+ language:
7
+ - vi
8
+ - ja
9
+ base_model:
10
+ - Qwen/Qwen2.5-1.5B-Instruct
11
+ pipeline_tag: question-answering
12
+ library_name: transformers
13
+ ---
14
+
15
+ # Multilingual Question-Answering Model (Vietnamese and Japanese)
16
+
17
+ ## Overview
18
+
19
+ This repository contains a fine-tuned multilingual question-answering model that supports both **Vietnamese** and **Japanese**. Built on top of the **Qwen/Qwen2.5-1.5B-Instruct** base model, this model leverages advanced transformer architectures to provide high-quality answers in both languages.
20
+
21
+ The model has been fine-tuned using datasets such as:
22
+ - **bkai-foundation-models/vi-alpaca-input-output-format**: A Vietnamese dataset designed for instruction-based input-output tasks.
23
+ - **CausalLM/GPT-4-Self-Instruct-Japanese**: A Japanese dataset created with self-instruct techniques to improve language understanding and generation.
24
+
25
+ This model is ideal for applications requiring cross-lingual support between Vietnamese and Japanese.
26
+
27
+ ---
28
+
29
+ ## License
30
+
31
+ This project is released under the **MIT License**, ensuring flexibility for both academic and commercial use. Please refer to the `LICENSE` file for more details.
32
+
33
+ ---
34
+
35
+ ## Model Details
36
+
37
+ ### Base Model
38
+ - **Qwen/Qwen2.5-1.5B-Instruct**: A powerful 1.5B parameter instruction-tuned model developed by Alibaba Cloud. It excels in understanding and generating natural language across various domains.
39
+
40
+ ### Supported Languages
41
+ - **Vietnamese (vi)**
42
+ - **Japanese (ja)**
43
+
44
+ ### Pipeline Tag
45
+ - **Question-Answering**: The model is optimized for answering questions in both supported languages.
46
+
47
+ ### Library
48
+ - **Transformers**: This model is built using the Hugging Face `transformers` library, making it easy to integrate into existing pipelines.
49
+
50
+ ---
51
+
52
+ ## Installation
53
+
54
+ To use this model, ensure you have the `transformers` library installed:
55
+
56
+ ```bash
57
+ pip install transformers
58
+ ```
59
+
60
+ You can then load the model directly from the Hugging Face Hub:
61
+
62
+ ```python
63
+ from transformers import AutoTokenizer, AutoModelForCausalLM
64
+
65
+ # Load the tokenizer and model
66
+ tokenizer = AutoTokenizer.from_pretrained("haiFrHust/VNJPTranslate_base")
67
+ model = AutoModelForCausalLM.from_pretrained("haiFrHust/VNJPTranslate_base")
68
+
69
+ # Example usage
70
+ input_text = "質問: ベトナムの首都はどこですか?" # Japanese: What is the capital of Vietnam?
71
+ inputs = tokenizer(input_text, return_tensors="pt")
72
+ outputs = model.generate(**inputs)
73
+ answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
74
+
75
+ print(answer)
76
+ ```
77
+
78
+
79
+ ---
80
+
81
+ ## Dataset Information
82
+
83
+ ### Vietnamese Dataset
84
+ - **Name**: `bkai-foundation-models/vi-alpaca-input-output-format`
85
+ - **Description**: This dataset contains instruction-based input-output pairs in Vietnamese, enabling the model to understand and respond to structured queries effectively.
86
+
87
+ ### Japanese Dataset
88
+ - **Name**: `CausalLM/GPT-4-Self-Instruct-Japanese`
89
+ - **Description**: A self-instruct dataset in Japanese, designed to enhance the model's ability to generate accurate and contextually relevant responses.
90
+
91
+ ---
92
+
93
+ ## Use Cases
94
+
95
+ This model is suitable for a variety of applications, including but not limited to:
96
+ - **Cross-Lingual Customer Support**: Answering user queries in both Vietnamese and Japanese.
97
+ - **Educational Tools**: Assisting students in learning and understanding concepts in their native language.
98
+ - **Multilingual Chatbots**: Building conversational agents capable of handling multiple languages seamlessly.
99
+
100
+ ---
101
+
102
+ ## Performance
103
+
104
+ The model demonstrates strong performance in both Vietnamese and Japanese, thanks to the high-quality datasets and the robust base model. However, performance may vary depending on the complexity of the questions and the domain-specific knowledge required.
105
+
106
+ For optimal results:
107
+ - Ensure your input questions are clear and concise.
108
+ - Fine-tune the model further on domain-specific data if necessary.
109
+
110
+ ---
111
+
112
+ ## Contributions
113
+
114
+ Contributions to this project are welcome! If you have ideas for improvements, encounter issues, or wish to contribute additional datasets, please open an issue or submit a pull request.
115
+
116
+ ---
117
+
118
+ ## Acknowledgments
119
+
120
+ We would like to thank the following organizations and contributors:
121
+ - **Alibaba Cloud** for providing the Qwen base model.
122
+ - The creators of the `bkai-foundation-models/vi-alpaca-input-output-format` and `CausalLM/GPT-4-Self-Instruct-Japanese` datasets.
123
+ - The Hugging Face community for their excellent `transformers` library and support.
124
+
125
+ ---
126
+
127
+ ## Contact
128
+
129
+ For any inquiries or feedback, feel free to reach out to us via:
130
+ - Email: [hai.ph225715@sis.hust.edu.vn]
131
+ - GitHub Issues: Open an issue in this repository.
132
+
133
+ ---
134
+
135
+ Thank you for using our multilingual question-answering model! We hope it serves your needs effectively.