Improve language tag
Browse filesHi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.
README.md
CHANGED
|
@@ -1,154 +1,166 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
datasets:
|
| 4 |
-
- SIA-IDE/MBHM
|
| 5 |
-
language:
|
| 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 |
-
|
| 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 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- SIA-IDE/MBHM
|
| 5 |
+
language:
|
| 6 |
+
- zho
|
| 7 |
+
- eng
|
| 8 |
+
- fra
|
| 9 |
+
- spa
|
| 10 |
+
- por
|
| 11 |
+
- deu
|
| 12 |
+
- ita
|
| 13 |
+
- rus
|
| 14 |
+
- jpn
|
| 15 |
+
- kor
|
| 16 |
+
- vie
|
| 17 |
+
- tha
|
| 18 |
+
- ara
|
| 19 |
+
base_model:
|
| 20 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 21 |
+
---
|
| 22 |
+
<div align="center">
|
| 23 |
+
<a href="https://github.com/SIA-IDE/BearLLM">
|
| 24 |
+
<img src="https://raw.githubusercontent.com/SIA-IDE/BearLLM/refs/heads/main/docs/images/logo.svg" width="200" alt="logo"/>
|
| 25 |
+
</a>
|
| 26 |
+
<h1>BearLLM: A Prior Knowledge-Enhanced Bearing Health Management Framework with Unified Vibration Signal Representation</h1>
|
| 27 |
+
|
| 28 |
+
<a href="https://www.python.org/"><img alt="Python" src="https://img.shields.io/badge/Python-3.12-blue"></a>
|
| 29 |
+
<a href="https://pytorch.org/"><img alt="PyTorch" src="https://img.shields.io/badge/Pytorch-latest-orange"></a>
|
| 30 |
+
<a href="https://arxiv.org/abs/2408.11281"><img alt="arXiv" src="https://img.shields.io/badge/Paper-arXiv-B31B1B"></a>
|
| 31 |
+
<a href="https://huggingface.co/datasets/SIA-IDE/MBHM"><img alt="Dataset" src="https://img.shields.io/badge/Dataset-๐ค-FFFDF5"></a>
|
| 32 |
+
<a href="https://github.com/SIA-IDE/BearLLM"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/SIA-IDE/BearLLM"></a>
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<h4 align="center">
|
| 36 |
+
<p>
|
| 37 |
+
<b>English</b> |
|
| 38 |
+
<a href="https://github.com/SIA-IDE/BearLLM/blob/main/docs/README_zh.md">็ฎไฝไธญๆ</a>
|
| 39 |
+
</p>
|
| 40 |
+
</h4>
|
| 41 |
+
|
| 42 |
+
## ๐ฅ NEWS
|
| 43 |
+
- **[2025-04-11]** ๐ The [AAAI-25 Proceedings](https://aaai.org/proceeding/aaai-39-2025/) are now officially published! Our [conference paper](https://ojs.aaai.org/index.php/AAAI/article/view/34188) is included. We welcome you to read and cite it!
|
| 44 |
+
- **[2025-03-06]** ๐ The complete dataset and code are now officially open source!
|
| 45 |
+
- **[2024-12-11]** โซ We are now working on making the code of BearLLM public. Stay tuned!
|
| 46 |
+
- **[2024-12-10]** ๐ The BearLLM paper is accepted by the Thirty-Ninth AAAI Conference on Artificial Intelligence ([AAAI-25](https://aaai.org/conference/aaai/aaai-25/)).
|
| 47 |
+
- **[2024-08-21]** ๐ The preprint of the BearLLM paper is available on arXiv. Check the [paper page](https://arxiv.org/abs/2408.11281) for more details.
|
| 48 |
+
|
| 49 |
+
## ๐
TODO
|
| 50 |
+
- [ ] Improve related comments and documentation.
|
| 51 |
+
- [x] Upload the complete BearLLM demo code.
|
| 52 |
+
- [x] Upload the health management corpus of the MBHM dataset.
|
| 53 |
+
- [x] Collect the codes for pre-training and fine-tuning BearLLM.
|
| 54 |
+
- [x] Collect the codes of BearLLM's classification network and other comparison models.
|
| 55 |
+
- [x] Upload the vibration signal portion of the MBHM dataset.
|
| 56 |
+
|
| 57 |
+
## ๐ Introduction
|
| 58 |
+
The [MBHM](https://huggingface.co/datasets/SIA-IDE/MBHM) dataset is the first multimodal dataset designed for the study of bearing health management. It is divided into two parts: vibration signals and health management corpus. The vibration signals and condition information are derived from 9 publicly available datasets, and are still under continuous updating and improvement. The thousands of working conditions pose more difficult challenges for the identification model and better represent real-world usage scenarios.
|
| 59 |
+
|
| 60 |
+
[BearLLM](https://github.com/SIA-IDE/BearLLM) is a prior knowledge-enhanced bearing health management framework with a unified vibration signal representation. This framework transforms the signal to be tested into the frequency domain, enabling effective identification of spectral differences compared to the vibration signal under fault-free conditions. By aligning the vibration signal with the fault semantic embedding, we achieve a unified natural language response for various health management tasks through a fine-tuned language model with low computational overhead. Experiments demonstrate that this framework achieves leading performance under thousands of working conditions.
|
| 61 |
+
|
| 62 |
+
## ๐ป Requirements
|
| 63 |
+
|
| 64 |
+
The code is implemented in Python 3.12. The required packages are listed in the `requirements.txt` file. You can install the required packages by running the following command:
|
| 65 |
+
|
| 66 |
+
```bash
|
| 67 |
+
conda create --name bearllm python=3.12
|
| 68 |
+
conda activate bearllm
|
| 69 |
+
pip install -r requirements.txt
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
## ๐ Quick Start
|
| 74 |
+
|
| 75 |
+
### 1. Download Demo Data / Use Your Own Data
|
| 76 |
+
|
| 77 |
+
First, you need to download the `demo_data.json` from the [MBHM](https://huggingface.co/datasets/SIA-IDE/MBHM/tree/main) dataset.
|
| 78 |
+
For users in mainland China, you can use the [mirror link](https://hf-mirror.com/datasets/SIA-IDE/MBHM/tree/main) to speed up the download:
|
| 79 |
+
|
| 80 |
+
Or, you can also build your own test data in the same format:
|
| 81 |
+
`instruction`: Text instruction for health management task.
|
| 82 |
+
`vib_data`: Vibration signal data to be identified, with a required duration of 1 second.
|
| 83 |
+
`ref_data`: Reference vibration signal data without faults, with a required duration of 1 second.
|
| 84 |
+
|
| 85 |
+
```json
|
| 86 |
+
{
|
| 87 |
+
"instruction": "xxx.",
|
| 88 |
+
"vib_data": [1.0, 0.0, 1.0, ...],
|
| 89 |
+
"ref_data": [1.0, 0.0, 1.0, ...],
|
| 90 |
+
}
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
### 2. Download Weights
|
| 94 |
+
|
| 95 |
+
You can download the pre-trained weights of [Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct/tree/main) from Hugging Face.
|
| 96 |
+
|
| 97 |
+
Additionally, you need to download the weights of [BearLLM](https://huggingface.co/SIA-IDE/BearLLM/tree/main).
|
| 98 |
+
|
| 99 |
+
### 3. Organize Files
|
| 100 |
+
|
| 101 |
+
It is recommended to organize the weights and test data as follows:
|
| 102 |
+
|
| 103 |
+
```
|
| 104 |
+
BearLLM/
|
| 105 |
+
โโโ qwen_weights/
|
| 106 |
+
โ โโโ model.safetensors
|
| 107 |
+
โ โโโ tokenizer.json
|
| 108 |
+
โ โโโ config.json
|
| 109 |
+
โ โโโ other files...
|
| 110 |
+
โโโ bearllm_weights/
|
| 111 |
+
โ โโโ vibration_adapter.pth
|
| 112 |
+
โ โโโ adapter_config.json
|
| 113 |
+
โ โโโ adapter_model.safetensors
|
| 114 |
+
โโโ mbhm_dataset/
|
| 115 |
+
โโโ demo_data.json
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
### 4. Run Code
|
| 119 |
+
First, copy the `.env.example` file to `.env` and modify the data paths inside.
|
| 120 |
+
Then, you can run the code using the following command:
|
| 121 |
+
|
| 122 |
+
```bash
|
| 123 |
+
python run_demo.py
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
## โ๏ธ Development
|
| 127 |
+
|
| 128 |
+
### 1. Download Dataset
|
| 129 |
+
|
| 130 |
+
First, you need to download the following files from the [MBHM](https://huggingface.co/datasets/SIA-IDE/MBHM/tree/main) dataset. For users in mainland China, you can use the [mirror link](https://hf-mirror.com/datasets/SIA-IDE/MBHM/tree/main) to speed up the download:
|
| 131 |
+
|
| 132 |
+
- `data.hdf5`: Contains the vibration signal data.
|
| 133 |
+
- `corpus.json`: Contains the health management corpus.
|
| 134 |
+
- `metadata.sqlite`: Contains metadata information of the dataset.
|
| 135 |
+
|
| 136 |
+
### 2. Download Weights
|
| 137 |
+
|
| 138 |
+
You can download the pre-trained weights of [Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct/tree/main) from Hugging Face.
|
| 139 |
+
|
| 140 |
+
### 3. Modify Environment Variables
|
| 141 |
+
|
| 142 |
+
Copy the `.env.example` file to `.env` and modify the data paths inside.
|
| 143 |
+
|
| 144 |
+
### 4. Pre-train and Fine-tune Model
|
| 145 |
+
|
| 146 |
+
Pre-train according to `src/pre_training.py`.
|
| 147 |
+
Fine-tune according to `src/fine_tuning.py`.
|
| 148 |
+
|
| 149 |
+
## ๐ Citation
|
| 150 |
+
Please cite the following paper if you use this study in your research:
|
| 151 |
+
|
| 152 |
+
```
|
| 153 |
+
@article{pengBearLLMPriorKnowledgeEnhanced2025,
|
| 154 |
+
title = {{{BearLLM}}: {{A Prior Knowledge-Enhanced Bearing Health Management Framework}} with {{Unified Vibration Signal Representation}}},
|
| 155 |
+
author = {Peng, Haotian and Liu, Jiawei and Du, Jinsong and Gao, Jie and Wang, Wei},
|
| 156 |
+
year = {2025},
|
| 157 |
+
month = apr,
|
| 158 |
+
journal = {Proceedings of the AAAI Conference on Artificial Intelligence},
|
| 159 |
+
volume = {39},
|
| 160 |
+
number = {19},
|
| 161 |
+
pages = {19866--19874},
|
| 162 |
+
issn = {2374-3468},
|
| 163 |
+
doi = {10.1609/aaai.v39i19.34188},
|
| 164 |
+
urldate = {2025-04-11},
|
| 165 |
+
}
|
| 166 |
```
|