Improve language tag (#1)
Browse files- Improve language tag (abe9f207fd865dfd4ecf33d718510c316a0f8a34)
Co-authored-by: Loïck BOURDOIS <lbourdois@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,135 +1,146 @@
|
|
| 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 |
-
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
- **
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
-
|
| 108 |
-
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
Thank you for using our multilingual question-answering model! We hope it serves your needs effectively.
|
|
|
|
| 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 |
+
- zho
|
| 8 |
+
- eng
|
| 9 |
+
- fra
|
| 10 |
+
- spa
|
| 11 |
+
- por
|
| 12 |
+
- deu
|
| 13 |
+
- ita
|
| 14 |
+
- rus
|
| 15 |
+
- jpn
|
| 16 |
+
- kor
|
| 17 |
+
- vie
|
| 18 |
+
- tha
|
| 19 |
+
- ara
|
| 20 |
+
base_model:
|
| 21 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 22 |
+
pipeline_tag: question-answering
|
| 23 |
+
library_name: transformers
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Multilingual Question-Answering Model (Vietnamese and Japanese)
|
| 27 |
+
|
| 28 |
+
## Overview
|
| 29 |
+
|
| 30 |
+
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.
|
| 31 |
+
|
| 32 |
+
The model has been fine-tuned using datasets such as:
|
| 33 |
+
- **bkai-foundation-models/vi-alpaca-input-output-format**: A Vietnamese dataset designed for instruction-based input-output tasks.
|
| 34 |
+
- **CausalLM/GPT-4-Self-Instruct-Japanese**: A Japanese dataset created with self-instruct techniques to improve language understanding and generation.
|
| 35 |
+
|
| 36 |
+
This model is ideal for applications requiring cross-lingual support between Vietnamese and Japanese.
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## License
|
| 41 |
+
|
| 42 |
+
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.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Model Details
|
| 47 |
+
|
| 48 |
+
### Base Model
|
| 49 |
+
- **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.
|
| 50 |
+
|
| 51 |
+
### Supported Languages
|
| 52 |
+
- **Vietnamese (vi)**
|
| 53 |
+
- **Japanese (ja)**
|
| 54 |
+
|
| 55 |
+
### Pipeline Tag
|
| 56 |
+
- **Question-Answering**: The model is optimized for answering questions in both supported languages.
|
| 57 |
+
|
| 58 |
+
### Library
|
| 59 |
+
- **Transformers**: This model is built using the Hugging Face `transformers` library, making it easy to integrate into existing pipelines.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## Installation
|
| 64 |
+
|
| 65 |
+
To use this model, ensure you have the `transformers` library installed:
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
pip install transformers
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
You can then load the model directly from the Hugging Face Hub:
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 75 |
+
|
| 76 |
+
# Load the tokenizer and model
|
| 77 |
+
tokenizer = AutoTokenizer.from_pretrained("haiFrHust/VNJPTranslate_base")
|
| 78 |
+
model = AutoModelForCausalLM.from_pretrained("haiFrHust/VNJPTranslate_base")
|
| 79 |
+
|
| 80 |
+
# Example usage
|
| 81 |
+
input_text = "質問: ベトナムの首都はどこですか?" # Japanese: What is the capital of Vietnam?
|
| 82 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
| 83 |
+
outputs = model.generate(**inputs)
|
| 84 |
+
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 85 |
+
|
| 86 |
+
print(answer)
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## Dataset Information
|
| 93 |
+
|
| 94 |
+
### Vietnamese Dataset
|
| 95 |
+
- **Name**: `bkai-foundation-models/vi-alpaca-input-output-format`
|
| 96 |
+
- **Description**: This dataset contains instruction-based input-output pairs in Vietnamese, enabling the model to understand and respond to structured queries effectively.
|
| 97 |
+
|
| 98 |
+
### Japanese Dataset
|
| 99 |
+
- **Name**: `CausalLM/GPT-4-Self-Instruct-Japanese`
|
| 100 |
+
- **Description**: A self-instruct dataset in Japanese, designed to enhance the model's ability to generate accurate and contextually relevant responses.
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## Use Cases
|
| 105 |
+
|
| 106 |
+
This model is suitable for a variety of applications, including but not limited to:
|
| 107 |
+
- **Cross-Lingual Customer Support**: Answering user queries in both Vietnamese and Japanese.
|
| 108 |
+
- **Educational Tools**: Assisting students in learning and understanding concepts in their native language.
|
| 109 |
+
- **Multilingual Chatbots**: Building conversational agents capable of handling multiple languages seamlessly.
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
## Performance
|
| 114 |
+
|
| 115 |
+
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.
|
| 116 |
+
|
| 117 |
+
For optimal results:
|
| 118 |
+
- Ensure your input questions are clear and concise.
|
| 119 |
+
- Fine-tune the model further on domain-specific data if necessary.
|
| 120 |
+
|
| 121 |
+
---
|
| 122 |
+
|
| 123 |
+
## Contributions
|
| 124 |
+
|
| 125 |
+
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.
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Acknowledgments
|
| 130 |
+
|
| 131 |
+
We would like to thank the following organizations and contributors:
|
| 132 |
+
- **Alibaba Cloud** for providing the Qwen base model.
|
| 133 |
+
- The creators of the `bkai-foundation-models/vi-alpaca-input-output-format` and `CausalLM/GPT-4-Self-Instruct-Japanese` datasets.
|
| 134 |
+
- The Hugging Face community for their excellent `transformers` library and support.
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## Contact
|
| 139 |
+
|
| 140 |
+
For any inquiries or feedback, feel free to reach out to us via:
|
| 141 |
+
- Email: [hai.ph225715@sis.hust.edu.vn]
|
| 142 |
+
- GitHub Issues: Open an issue in this repository.
|
| 143 |
+
|
| 144 |
+
---
|
| 145 |
+
|
| 146 |
Thank you for using our multilingual question-answering model! We hope it serves your needs effectively.
|