Remove outdated README files in English and Vietnamese, and add new README files in Vietnamese and Simplified Chinese with updated project information and usage examples.
Browse files- README.md +53 -39
- README_VN.md → README.vi.md +22 -9
- README_EN.md → README.zh-CN.md +53 -39
README.md
CHANGED
|
@@ -13,43 +13,45 @@ license: apache-2.0
|
|
| 13 |
---
|
| 14 |
|
| 15 |
|
|
|
|
| 16 |
<p align="center">
|
| 17 |
<br>
|
| 18 |
<img src="./image/mkty_cn_light_huggingface.svg" style="width:63%;">
|
| 19 |
</p>
|
| 20 |
<br>
|
| 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 |
```python
|
| 51 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 52 |
-
|
| 53 |
def load_model_and_tokenizer(model_name):
|
| 54 |
model = AutoModelForCausalLM.from_pretrained(
|
| 55 |
model_name,
|
|
@@ -58,8 +60,6 @@ def load_model_and_tokenizer(model_name):
|
|
| 58 |
)
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 60 |
return model, tokenizer
|
| 61 |
-
|
| 62 |
-
|
| 63 |
def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
| 64 |
messages.append({"role": "user", "content": prompt})
|
| 65 |
text = tokenizer.apply_chat_template(
|
|
@@ -80,7 +80,7 @@ def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
|
| 80 |
return response
|
| 81 |
```
|
| 82 |
|
| 83 |
-
|
| 84 |
|
| 85 |
```python
|
| 86 |
if __name__ == "__main__":
|
|
@@ -95,7 +95,7 @@ if __name__ == "__main__":
|
|
| 95 |
print("MKTY>", response)
|
| 96 |
```
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
```python
|
| 101 |
if __name__ == "__main__":
|
|
@@ -129,7 +129,8 @@ if __name__ == "__main__":
|
|
| 129 |
|
| 130 |
```
|
| 131 |
|
| 132 |
-
|
|
|
|
| 133 |
|
| 134 |
```
|
| 135 |
██\ ██\ ██\ ██\ ████████\ ██\ ██\
|
|
@@ -142,33 +143,46 @@ if __name__ == "__main__":
|
|
| 142 |
\__| \__|\__|\__| \__|\__| \__|\__| \__|\__|
|
| 143 |
```
|
| 144 |
|
| 145 |
-
|
| 146 |
|
| 147 |
-
- 🧑💻 项目作者:
|
| 148 |
-
- **杜宇** (英语: _DU Yu_ ;越南语: _Đỗ Vũ_ ;<202103180009@stu.qlu.edu.cn> ),齐鲁工业大学(山东省科学院)计算机科学与技术学部 2025届本科毕业生
|
| 149 |
|
| 150 |
-
-
|
| 151 |
-
-
|
| 152 |
-
- 企业方老师:**李君** (英语: _LI Jun_ ;越南语:_Lý Quân_ ),安博教育科技集团([NYSE: AMBO](https://www.nyse.com/quote/XASE:AMBO)) 山东师创软件实训学院
|
| 153 |
|
| 154 |
-
|
|
|
|
|
|
|
| 155 |
|
| 156 |
-
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
- 山东省计算中心(国家超级计算济南中心): [https://www.nsccjn.cn/](https://www.nsccjn.cn/)
|
| 161 |
-
|
| 162 |
-
- 齐鲁工业大学(山东省科学院)计算机科学与技术学部: [http://jsxb.scsc.cn/](http://jsxb.scsc.cn/)
|
| 163 |
|
| 164 |
-
-
|
|
|
|
|
|
|
| 165 |
|
| 166 |
-
|
| 167 |
|
| 168 |
-
|
| 169 |
|
| 170 |
-
|
| 171 |
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
-
<img src="./image/MKTY_PIC.png" alt="MKTY_PIC" style="width: 61%;">
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
|
| 16 |
+
|
| 17 |
<p align="center">
|
| 18 |
<br>
|
| 19 |
<img src="./image/mkty_cn_light_huggingface.svg" style="width:63%;">
|
| 20 |
</p>
|
| 21 |
<br>
|
| 22 |
|
| 23 |
+
# Minh Khoe Tue Y LLM (MKTY-3B-Chat)
|
| 24 |
+
|
| 25 |
+
[](https://doi.org/10.5281/zenodo.17444889)
|
| 26 |
|
| 27 |
+
### 🌍 Documentation Language
|
| 28 |
|
| 29 |
+
[**Chinese Simplified (简体中文)**](./README.zh-CN.md) | [**English**](./README.md) | [**Vietnamese (Tiếng Việt)**](./README.vi.md)
|
| 30 |
|
| 31 |
+
> Please note that the English and Vietnamese versions of this document are translated from the Chinese version using LLM, with manual proofreading. However, discrepancies may still exist. In case of inconsistencies between the English or Vietnamese versions and the Chinese version, the Chinese version shall prevail.
|
| 32 |
|
| 33 |
+
**Full Project Title:** Minh Khoe Tue Y (_Chinese Simplified: 明康慧医_; _Vietnamese: Minh Khỏe Tuệ Y_; _Nom Script: 明劸慧醫_ ) — Design and Implementation of a Health Management and Diagnostic Assistance System Based on LLMs and Multimodal Artificial Intelligence. **Abbreviation:** MKTY Smart Healthcare System
|
| 34 |
|
| 35 |
+
### 📖 Model Overview
|
| 36 |
|
| 37 |
+
This model is a component of the "Minh Khoe Tue Y - Design and Implementation of a Health Management and Assisted Diagnosis System Based on LLM and Multimodal Artificial Intelligence" project (referred to as the Minh Khoe Tue Y Smart Healthcare System). It was developed as part of my undergraduate graduation project for the Faculty of Computer Science and Technology, Qilu University of Technology (Shandong Academy of Sciences), class of 2025. The project has been open-sourced and is available at: [https://github.com/duyu09/MKTY-System](https://github.com/duyu09/MKTY-System).
|
| 38 |
|
| 39 |
+
This model has been fine-tuned and optimized in the fields of medicine, healthcare, and biology, outperforming its base model, `Qwen2.5-3B-Instruct`. The fine-tuning process employs the LoRA algorithm and is conducted in two stages, focusing solely on the Chinese language. Initially, during the Pretrain phase, the model undergoes incremental training using medical textbooks, medical records, and healthcare-related articles. Subsequently, Supervised Fine-Tuning (SFT) is performed using corpora that include symptoms and corresponding medical records, doctor-patient dialogues (symptom descriptions and diagnoses), medical knowledge Q&A, and dialogue corpora based on the "LLM Discussion Mechanism." The total data volume is approximately `2.88GB`.
|
| 40 |
|
| 41 |
+
Notably, the model has been optimized for the "LLM Discussion Mechanism." The specific operation of this mechanism is as follows: when answering each question, the model generates multiple results based on different contexts, simulating a scenario where "multiple individuals express their viewpoints." The system also includes a "moderator" role responsible for summarizing the viewpoints from each round of discussion. Subsequently, all participants engage in the next round of discussion based on the original question, the moderator's summary, and their respective contexts. This process iterates until the discussion results converge (i.e., the semantics become consistent) or the preset maximum number of discussion rounds is reached.
|
| 42 |
|
| 43 |
+
### 🔧 Hardware Requirements
|
| 44 |
|
| 45 |
+
For GPU inference, a minimum of `7GB` of VRAM is required. If the VRAM capacity is insufficient or if no dedicated GPU is available, the MKTY-3B large model can also run using `CPU` + `7GB RAM`.
|
| 46 |
|
| 47 |
+
### 🚀 Usage Example
|
| 48 |
|
| 49 |
+
Based on the Tongyi Qianwen (Chinese: 通义千问) `Qwen2.5-3B-Instruct` model, it can be quickly loaded and launched using the `transformers` library.
|
| 50 |
|
| 51 |
+
**Model Loading**
|
| 52 |
|
| 53 |
```python
|
| 54 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 55 |
def load_model_and_tokenizer(model_name):
|
| 56 |
model = AutoModelForCausalLM.from_pretrained(
|
| 57 |
model_name,
|
|
|
|
| 60 |
)
|
| 61 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 62 |
return model, tokenizer
|
|
|
|
|
|
|
| 63 |
def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
| 64 |
messages.append({"role": "user", "content": prompt})
|
| 65 |
text = tokenizer.apply_chat_template(
|
|
|
|
| 80 |
return response
|
| 81 |
```
|
| 82 |
|
| 83 |
+
**Standard Q&A Mode**
|
| 84 |
|
| 85 |
```python
|
| 86 |
if __name__ == "__main__":
|
|
|
|
| 95 |
print("MKTY>", response)
|
| 96 |
```
|
| 97 |
|
| 98 |
+
**LLM Discussion Mode** (Example language: Chinese Simplified)
|
| 99 |
|
| 100 |
```python
|
| 101 |
if __name__ == "__main__":
|
|
|
|
| 129 |
|
| 130 |
```
|
| 131 |
|
| 132 |
+
|
| 133 |
+
## 🎓 Authors
|
| 134 |
|
| 135 |
```
|
| 136 |
██\ ██\ ██\ ██\ ████████\ ██\ ██\
|
|
|
|
| 143 |
\__| \__|\__|\__| \__|\__| \__|\__| \__|\__|
|
| 144 |
```
|
| 145 |
|
| 146 |
+
This model is used for the graduation project of the Faculty of Computer Science and Technology, Qilu University of Technology (Shandong Academy of Sciences) in 2025, and is only for academic exchange. Neither I nor my supervisor teachers are responsible for any consequences arising from the use of the model.
|
| 147 |
|
|
|
|
|
|
|
| 148 |
|
| 149 |
+
- **🧑💻 Project Author:**
|
| 150 |
+
- **DU Yu** (Chinese: _杜宇_; Vietnamese: _Đỗ Vũ_; Email: <202103180009@stu.qlu.edu.cn>), undergraduate student at Faculty of Computer Science and Technology, Qilu University of Technology (Shandong Academy of Sciences)
|
|
|
|
| 151 |
|
| 152 |
+
- **🏫 Thesis Advisors:**
|
| 153 |
+
- Academic Advisor: **JIANG Wenfeng** (Chinese: _姜文峰_; Vietnamese: _Khương Văn Phong_), Associate professor, Faculty of Computer Science and Technology, Qilu University of Technology (Shandong Academy of Sciences)
|
| 154 |
+
- Industry Advisor: **LI Jun** (Chinese: _李君_; Vietnamese: _Lý Quân_), Shandong Strong (Shichuang) Software Training College, Ambow Education Group ([NYSE: AMBO](https://www.nyse.com/quote/XASE:AMBO))
|
| 155 |
|
| 156 |
+
The complete project's open source address: [https://github.com/duyu09/MKTY-System](https://github.com/duyu09/MKTY-System). Welcome to download and discuss about it.
|
| 157 |
|
| 158 |
+
## 🔗 Links
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
+
- Qilu University of Technology (Shandong Academy of Sciences): [https://www.qlu.edu.cn/](https://www.qlu.edu.cn/)
|
| 161 |
+
|
| 162 |
+
- Shandong Computer Center (National Supercomputing Center in Jinan, _NSCCJN_): [https://www.nsccjn.cn/](https://www.nsccjn.cn/)
|
| 163 |
|
| 164 |
+
- Faculty of Computer Science and Technology, Qilu University of Technology (Shandong Academy of Sciences): [http://jsxb.scsc.cn/](http://jsxb.scsc.cn/)
|
| 165 |
|
| 166 |
+
- DuYu's GitHub Account: [https://github.com/duyu09/](https://github.com/duyu09/)
|
| 167 |
|
| 168 |
+
## 📄 Citation
|
| 169 |
|
| 170 |
+
```
|
| 171 |
+
@software{du_2025_17444889,
|
| 172 |
+
author = {Du, Yu},
|
| 173 |
+
title = {Minh Khoe Tue Y Smart Healthcare System},
|
| 174 |
+
month = oct,
|
| 175 |
+
year = 2025,
|
| 176 |
+
publisher = {Zenodo},
|
| 177 |
+
version = {v1.1.2},
|
| 178 |
+
doi = {10.5281/zenodo.17444889},
|
| 179 |
+
url = {https://doi.org/10.5281/zenodo.17444889},
|
| 180 |
+
swhid = {swh:1:dir:a633243bf04e6ba18e2d5ffcf92ea57f73566f43
|
| 181 |
+
;origin=https://doi.org/10.5281/zenodo.17444888;vi
|
| 182 |
+
sit=swh:1:snp:37dc91d2c166a07c7dc8ebac0b4be97961b0
|
| 183 |
+
267b;anchor=swh:1:rel:a88f82a5ca10d278bcc10734f5cf
|
| 184 |
+
a560286a8b47;path=duyu09-MKTY-System-8edd0c9
|
| 185 |
+
},
|
| 186 |
+
}
|
| 187 |
+
```
|
| 188 |
|
|
|
README_VN.md → README.vi.md
RENAMED
|
@@ -6,9 +6,11 @@
|
|
| 6 |
|
| 7 |
# Mô Hình Ngôn Ngữ Lớn Minh Khỏe Tuệ Y (MKTY-3B-Chat)
|
| 8 |
|
|
|
|
|
|
|
| 9 |
### 🌍 Ngôn Ngữ Tài Liệu
|
| 10 |
|
| 11 |
-
[**Tiếng Trung Giản Thể (简体中文)**](./README.md) | [**Tiếng Anh (English)**](./
|
| 12 |
|
| 13 |
> Lưu ý: Các phiên bản tiếng Anh và tiếng Việt của tài liệu này đều được dịch từ phiên bản tiếng Trung bằng LLM, đã được kiểm tra thủ công nhưng không tránh khỏi sai sót. Nếu có sự khác biệt giữa phiên bản tiếng Anh hoặc tiếng Việt so với phiên bản tiếng Trung, vui lòng lấy phiên bản tiếng Trung làm chuẩn.
|
| 14 |
|
|
@@ -144,12 +146,23 @@ Mô hình này được sử dụng cho luận văn tốt nghiệp năm 2025 c
|
|
| 144 |
|
| 145 |
- Trang GitHub của Đỗ Vũ: [https://github.com/duyu09/](https://github.com/duyu09/)
|
| 146 |
|
| 147 |
-
##
|
| 148 |
-
|
| 149 |
-
<div><b>Số lượt truy cập tổng cộng (Tất cả các dự án của Duyu09 trên GitHub): </b><br><img src="https://profile-counter.glitch.me/duyu09/count.svg" /></div>
|
| 150 |
-
|
| 151 |
-
<div><b>Số lượt truy cập tổng cộng (MKTY): </b>
|
| 152 |
-
|
| 153 |
-
<img src="https://profile-counter.glitch.me/duyu09-MKTY-SYSTEM/count.svg" /></div>
|
| 154 |
|
| 155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Mô Hình Ngôn Ngữ Lớn Minh Khỏe Tuệ Y (MKTY-3B-Chat)
|
| 8 |
|
| 9 |
+
[](https://doi.org/10.5281/zenodo.17444889)
|
| 10 |
+
|
| 11 |
### 🌍 Ngôn Ngữ Tài Liệu
|
| 12 |
|
| 13 |
+
[**Tiếng Trung Giản Thể (简体中文)**](./README.zh-CN.md) | [**Tiếng Anh (English)**](./README.md) | [**Tiếng Việt**](./README.vi.md)
|
| 14 |
|
| 15 |
> Lưu ý: Các phiên bản tiếng Anh và tiếng Việt của tài liệu này đều được dịch từ phiên bản tiếng Trung bằng LLM, đã được kiểm tra thủ công nhưng không tránh khỏi sai sót. Nếu có sự khác biệt giữa phiên bản tiếng Anh hoặc tiếng Việt so với phiên bản tiếng Trung, vui lòng lấy phiên bản tiếng Trung làm chuẩn.
|
| 16 |
|
|
|
|
| 146 |
|
| 147 |
- Trang GitHub của Đỗ Vũ: [https://github.com/duyu09/](https://github.com/duyu09/)
|
| 148 |
|
| 149 |
+
## 📄 Trích Dẫn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
```
|
| 152 |
+
@software{du_2025_17444889,
|
| 153 |
+
author = {Du, Yu},
|
| 154 |
+
title = {Minh Khoe Tue Y Smart Healthcare System},
|
| 155 |
+
month = oct,
|
| 156 |
+
year = 2025,
|
| 157 |
+
publisher = {Zenodo},
|
| 158 |
+
version = {v1.1.2},
|
| 159 |
+
doi = {10.5281/zenodo.17444889},
|
| 160 |
+
url = {https://doi.org/10.5281/zenodo.17444889},
|
| 161 |
+
swhid = {swh:1:dir:a633243bf04e6ba18e2d5ffcf92ea57f73566f43
|
| 162 |
+
;origin=https://doi.org/10.5281/zenodo.17444888;vi
|
| 163 |
+
sit=swh:1:snp:37dc91d2c166a07c7dc8ebac0b4be97961b0
|
| 164 |
+
267b;anchor=swh:1:rel:a88f82a5ca10d278bcc10734f5cf
|
| 165 |
+
a560286a8b47;path=duyu09-MKTY-System-8edd0c9
|
| 166 |
+
},
|
| 167 |
+
}
|
| 168 |
+
```
|
README_EN.md → README.zh-CN.md
RENAMED
|
@@ -4,36 +4,39 @@
|
|
| 4 |
</p>
|
| 5 |
<br>
|
| 6 |
|
| 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 |
```python
|
| 36 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 37 |
def load_model_and_tokenizer(model_name):
|
| 38 |
model = AutoModelForCausalLM.from_pretrained(
|
| 39 |
model_name,
|
|
@@ -42,6 +45,8 @@ def load_model_and_tokenizer(model_name):
|
|
| 42 |
)
|
| 43 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 44 |
return model, tokenizer
|
|
|
|
|
|
|
| 45 |
def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
| 46 |
messages.append({"role": "user", "content": prompt})
|
| 47 |
text = tokenizer.apply_chat_template(
|
|
@@ -62,7 +67,7 @@ def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
|
| 62 |
return response
|
| 63 |
```
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
```python
|
| 68 |
if __name__ == "__main__":
|
|
@@ -77,7 +82,7 @@ if __name__ == "__main__":
|
|
| 77 |
print("MKTY>", response)
|
| 78 |
```
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
```python
|
| 83 |
if __name__ == "__main__":
|
|
@@ -111,8 +116,7 @@ if __name__ == "__main__":
|
|
| 111 |
|
| 112 |
```
|
| 113 |
|
| 114 |
-
|
| 115 |
-
## 🎓 Authors
|
| 116 |
|
| 117 |
```
|
| 118 |
██\ ██\ ██\ ██\ ████████\ ██\ ██\
|
|
@@ -125,34 +129,44 @@ if __name__ == "__main__":
|
|
| 125 |
\__| \__|\__|\__| \__|\__| \__|\__| \__|\__|
|
| 126 |
```
|
| 127 |
|
| 128 |
-
|
| 129 |
-
|
| 130 |
|
| 131 |
-
-
|
| 132 |
-
-
|
| 133 |
|
| 134 |
-
-
|
| 135 |
-
-
|
| 136 |
-
-
|
| 137 |
|
| 138 |
-
|
| 139 |
|
| 140 |
-
## 🔗
|
| 141 |
|
| 142 |
-
-
|
| 143 |
|
| 144 |
-
-
|
| 145 |
|
| 146 |
-
-
|
| 147 |
|
| 148 |
-
-
|
| 149 |
|
| 150 |
-
##
|
| 151 |
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
</p>
|
| 5 |
<br>
|
| 6 |
|
| 7 |
+
# 明康慧医大模型 (MKTY-3B-Chat)
|
| 8 |
|
| 9 |
+
[](https://doi.org/10.5281/zenodo.17444889)
|
| 10 |
|
| 11 |
+
### 🌍 文档语言
|
| 12 |
|
| 13 |
+
[**简体中文**](./README.zh-CN.md) | [**英语 (English)**](./README.md) | [**越南语 (Tiếng Việt)**](./README.vi.md)
|
| 14 |
|
| 15 |
+
> 请注意,本文档的英文与越南文版本均使用LLM翻译自中文版本,有人工校对但差错难免,若出现英文或越南文版本内容与中文版本的不一致时,以中文为准。
|
| 16 |
|
| 17 |
+
**项目全称:** 明康慧医(英语:_Minh Khoe Tue Y_ ;越南语:_Minh Khỏe Tuệ Y_ ;喃字:_明劸慧醫_ )——基于LLM与多模态人工智能的健康管理与辅助诊疗系统的设计与实现 ( **简称:** 明康慧医智慧医疗系统 )
|
| 18 |
|
| 19 |
+
### 📖 模型简介
|
| 20 |
|
| 21 |
+
该模型是“明康慧医 - 基于LLM与多模态人工智能的健康管理与辅助诊疗系统设计与实现”项目(简称:明康慧医智慧医疗系统)的组成部分,为本人2025级齐鲁工业大学(山东省科学院)计算机科学与技术学部本科毕业设计而开发。项目已开源,地址为:[https://github.com/duyu09/MKTY-System](https://github.com/duyu09/MKTY-System)。
|
| 22 |
|
| 23 |
+
本模型在医学、医疗及生物学领域进行了微调与优化,其表现优于其底座模型`Qwen2.5-3B-Instruct`。微调过程采用LoRA算法,分两步进行,且仅针对中文语言。首先,通过增量训练(Pretrain)阶段,利用医学书籍、病历及医疗相关文章等语料数据进行初步训练。随后,进行指令监督微调(SFT),使用的语料包括症状与对应病历、医患对话(症状描述及诊断)、医学知识问答,以及基于“大模型讨论机制”的对话语料。总数据量约为`2.88GB`。
|
| 24 |
|
| 25 |
+
特别地,模型在“大模型讨论机制”方面进行了优化。该机制的具体运作方式如下:模型在回答每个问题时,会基于不同的上下文生成多个结果,模拟“多人发表观点”的场景。系统还设有“主持人”角色,负���总结各轮讨论的观点。随后,所有参与者根据原始问题、主持人的总结以及各自的上下文,进行下一轮讨论。此过程循环往复,直至讨论结果收敛(语义趋于一致)或达到预设的最大讨论轮数。
|
| 26 |
|
| 27 |
+
### 🔧 硬件条件
|
| 28 |
|
| 29 |
+
若使用GPU推理,则至少需要`7GB`显存。若显存容量不足7GB或无独立显卡,使用`CPU` + `7GB RAM`内存也可以运行MKTY-3B-Chat大模型。
|
| 30 |
|
| 31 |
+
### 🚀 使用示例
|
| 32 |
|
| 33 |
+
基于通义千问`Qwen2.5-3B-Instruct`,可直接通过`transformers`库快速加载启动。
|
| 34 |
+
|
| 35 |
+
**模型加载**
|
| 36 |
|
| 37 |
```python
|
| 38 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 39 |
+
|
| 40 |
def load_model_and_tokenizer(model_name):
|
| 41 |
model = AutoModelForCausalLM.from_pretrained(
|
| 42 |
model_name,
|
|
|
|
| 45 |
)
|
| 46 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 47 |
return model, tokenizer
|
| 48 |
+
|
| 49 |
+
|
| 50 |
def generate_response(prompt, messages, model, tokenizer, max_new_tokens=2000):
|
| 51 |
messages.append({"role": "user", "content": prompt})
|
| 52 |
text = tokenizer.apply_chat_template(
|
|
|
|
| 67 |
return response
|
| 68 |
```
|
| 69 |
|
| 70 |
+
**普通问答模式**
|
| 71 |
|
| 72 |
```python
|
| 73 |
if __name__ == "__main__":
|
|
|
|
| 82 |
print("MKTY>", response)
|
| 83 |
```
|
| 84 |
|
| 85 |
+
**大模型讨论模式**
|
| 86 |
|
| 87 |
```python
|
| 88 |
if __name__ == "__main__":
|
|
|
|
| 116 |
|
| 117 |
```
|
| 118 |
|
| 119 |
+
## 🎓 项目作者
|
|
|
|
| 120 |
|
| 121 |
```
|
| 122 |
██\ ██\ ██\ ██\ ████████\ ██\ ██\
|
|
|
|
| 129 |
\__| \__|\__|\__| \__|\__| \__|\__| \__|\__|
|
| 130 |
```
|
| 131 |
|
| 132 |
+
该模型用于2025年齐鲁工业大学(山东省科学院)计算机科学与技术学部毕业设计,仅可进行学术交流,本人及指导老师均不对模型使用造成的任何后果负责。
|
|
|
|
| 133 |
|
| 134 |
+
- 🧑💻 项目作者:
|
| 135 |
+
- **杜宇** (英语: _DU Yu_ ;越南语: _Đỗ Vũ_ ;<202103180009@stu.qlu.edu.cn> ),齐鲁工业大学(山东省科学院)计算机科学与技术学部 2025届本科毕业生
|
| 136 |
|
| 137 |
+
- 🏫 毕业设计指导教师:
|
| 138 |
+
- 校方老师:**姜文峰** (英语: _JIANG Wenfeng_ ;越南语: _Khương Văn Phong_ ),齐鲁工业大学(山东省科学院)计算机科学与技术学部 副教授
|
| 139 |
+
- 企业方老师:**李君** (英语: _LI Jun_ ;越南语:_Lý Quân_ ),安博教育科技集团([NYSE: AMBO](https://www.nyse.com/quote/XASE:AMBO)) 山东师创软件实训学院
|
| 140 |
|
| 141 |
+
完整项目开源地址:[https://github.com/duyu09/MKTY-System](https://github.com/duyu09/MKTY-System),欢迎下载交流。
|
| 142 |
|
| 143 |
+
## 🔗 友情链接
|
| 144 |
|
| 145 |
+
- 齐鲁工业大学(山东省科学院): [https://www.qlu.edu.cn/](https://www.qlu.edu.cn/)
|
| 146 |
|
| 147 |
+
- 山东省计算中心(国家超级计算济南中心): [https://www.nsccjn.cn/](https://www.nsccjn.cn/)
|
| 148 |
|
| 149 |
+
- 齐鲁工业大学(山东省科学院)计算机科学与技术学部: [http://jsxb.scsc.cn/](http://jsxb.scsc.cn/)
|
| 150 |
|
| 151 |
+
- 杜宇的GitHub主页: [https://github.com/duyu09/](https://github.com/duyu09/)
|
| 152 |
|
| 153 |
+
## 📄 引用
|
| 154 |
|
| 155 |
+
```
|
| 156 |
+
@software{du_2025_17444889,
|
| 157 |
+
author = {Du, Yu},
|
| 158 |
+
title = {Minh Khoe Tue Y Smart Healthcare System},
|
| 159 |
+
month = oct,
|
| 160 |
+
year = 2025,
|
| 161 |
+
publisher = {Zenodo},
|
| 162 |
+
version = {v1.1.2},
|
| 163 |
+
doi = {10.5281/zenodo.17444889},
|
| 164 |
+
url = {https://doi.org/10.5281/zenodo.17444889},
|
| 165 |
+
swhid = {swh:1:dir:a633243bf04e6ba18e2d5ffcf92ea57f73566f43
|
| 166 |
+
;origin=https://doi.org/10.5281/zenodo.17444888;vi
|
| 167 |
+
sit=swh:1:snp:37dc91d2c166a07c7dc8ebac0b4be97961b0
|
| 168 |
+
267b;anchor=swh:1:rel:a88f82a5ca10d278bcc10734f5cf
|
| 169 |
+
a560286a8b47;path=duyu09-MKTY-System-8edd0c9
|
| 170 |
+
},
|
| 171 |
+
}
|
| 172 |
+
```
|