|
大语言模型在高中数学解题中的效能提升研究
|
Abstract:
本文探讨了如何通过构建基于LangChain的知识库和利用LMDeploy推理加速技术,提升大语言模型在解答高中数学题目中的正确性和响应速度。通过OCR技术将解析卷转化为LaTeX格式,结合BGE-M3模型进行文本向量化并存储于Faiss数据库,模型在解答时通过动态检索知识库内容来增强准确性;同时,通过LMDeploy量化加速推理技术,显著提升了模型的推理效率。实验结果表明,多个大模型在构建知识库前后的得分有显著差异,总体回答正确率提升了71.84%;在回答速度上,自部署模型总体第一题回答速度提高了121.10%,后续题目回答速度提高了259.94%。这些改进显著提升了大语言模型在解答高考数学题时的正确率和速度。
This paper explores how to enhance the accuracy and response speed of large language models in solving high school mathematics problems by constructing a knowledge base based on LangChain and utilizing the LMDeploy inference acceleration technology. OCR technology is used to convert scanned papers into LaTeX format, and the BGE-M3 model is employed for text vectorization, which is then stored in a Faiss database. The model dynamically retrieves knowledge from the database to improve accuracy during problem-solving. Meanwhile, LMDeploy’s quantization and inference acceleration technology significantly boosts the model’s inference efficiency. Experimental results show that there is a significant difference in the scores of various large models before and after constructing the knowledge base, with an overall improvement of 71.84% in answer accuracy. Regarding response speed, the model’s answer speed for the first question improved by 121.10%, and the speed for subsequent questions improved by 259.94%. These improvements substantially enhanced the correctness and speed of large language models in solving high school math problems during the college entrance examination.
[1] | 刘明, 吴忠明, 廖剑, 任伊灵, 苏逸飞. 大语言模型的教育应用: 原理、现状与挑战——从轻量级BERT到对话式ChatGPT [J]. 现代教育技术, 2023, 33(8): 19-28. |
[2] | Bai, J.Z., Bai, S., Chu, Y.F., Cui, Z.Y., Dang, K., Deng, X.D., et al. (2023) Qwen Technical Report. https://qianwen-res.oss-cn-beijing.aliyuncs.com/QWEN_TECHNICAL_REPORT.pdf |
[3] | 赵浜, 曹树金. 生成式AI大模型结合知识库与AI Agent开展知识挖掘的探析[J/OL]. 图书情报知识, 1-14. http://kns.cnki.net/kcms/detail/42.1085.G2.20241103.1003.002.html, 2024-11-10. |
[4] | Langchain-Chatchat. https://github.com/chatchat-space/Langchain-Chatchat |
[5] | LMDeploy. https://github.com/InternLM/lmdeploy |