# MIRA-ChatGLM: A Fine-Tuned Large Language Model for Intelligent Risk Assessment in Coal Mining
## 4 Experiments and Results
### LoRA Versus QLoRA
As shown in Table 4, when the CO gas concentration is 0 ppm, a sensor disconnection is the reason for the alarm, and restoring normal operation as per protocol is the corresponding handling measure. The model fine-tuned with LoRA accurately provided this assessment; the 8-bit quantized model identified the risk signal and suggested professional handling measures, but also generated some redundant information. Meanwhile, the 4-bit quantized model recognized the risk signal but failed to offer professional handling measures and produced redundant information. Notably, as the quantization level increased, the differences between the fine-tuned model's inference output and the standard assessment results became more pronounced, which is an influencing factor that warrants further investigation in our future work. \begin{table}
\begin{tabular}{p{227.6 pt}} \hline \hline \multicolumn{2}{p{227.6 pt}}{**Dialog Example**} \\ \hline
**Input:** \\ Coal mine name: XXX Mining, the installation site returns carbon monoxide readings to the wind tunnel wind measurement station, the point of measurement type is carbon monoxide, carbon monoxide measurement shows a maximum value of 0.0 ppm, what happens? What countermeasures are taken? \\
**LoRA output:** \\ The alarm type is for a sensor disconnection, the alarm reason is to repair the line, and the treatment measure is to return to normal according to standard operation. \\
**QLoRA(8 bit) output:** \\ The alarm type is for a sensor disconnection, the cause of the alarm is to organize the wiring, and the treatment measure is to return to normal according to standard operation.It is important to note that the alarm type is “Sensor Disconnected” and not “Abnormal Carbon Monoxide Concentration”. Carbon monoxide is measured at a maximum value of 0.0 ppm, which means that the carbon monoxide concentration is very low and does not have any safe alarm level. Therefore, the cause of the alarm was due to the sensor cable being tidied up and causing a disconnection, not a high carbon monoxide concentration. The treatment was for the staff to restore the cable in time to ensure that the sensor was working properly. In this case, no special countermeasures were taken because the carbon monoxide concentration was safe. \\
**QLoRA(4 bit output:** \\ The alarm type is for a disconnected sensor, the reason for the alarm is to service the wiring, and the treatment is to restore it promptly. \\ In this case, the alarm type is “Sensor Disconnected”, which indicates a problem with the connection between the carbon monoxide sensor and the monitoring system. The carbon monoxide measurement maximum value is 0.0 ppm, which is usually the reading when the sensor is working properly, indicating that no carbon monoxide is detected. \\ The cause of the alarm is the “Service Line”, which means that staff may be carrying out maintenance or overhaul work, causing the sensor to be temporarily disconnected. The response is “Restore in time”, which means that the crew needs to complete the wiring service as soon as possible to restore the sensor to its normal operating condition. \\ The following are possible countermeasures: \\
1. The personnel immediately stop servicing and focus on restoring the sensor’s wiring connection. 2. Ensure adequate ventilation or other safety measures are in place to prevent carbon monoxide buildup during restoration of the line connection. \\
3. Once the line connection has been restored, restart the sensor and monitor its readings to ensure that all is well. \\
4. Upon completion, evaluate the overhaul process to prevent a similar situation from recurring. \\
5. Update the maintenance record with information such as the reason for the service, what was done, and the recovery time. \\ As the carbon monoxide concentration read 0.0 ppm, no additional contingency measures were taken as the sensor readings indicated no risk of carbon monoxide exceeding the limit. \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of the three fine-tuning methods using instances.