BART 与Qwen 模型的对话系统实现及评估

郑振魏

信息科学与工程研究 ›› 2024, Vol. 5 ›› Issue (10) : 40 -43.

PDF (1732KB)
信息科学与工程研究 ›› 2024, Vol. 5 ›› Issue (10) : 40 -43. DOI: 10.12349/iser.v5i10.3493

BART 与Qwen 模型的对话系统实现及评估

作者信息 +

Implementation and Evaluation of Dialogue Systems with BART and Qwen Models

Author information +
文章历史 +
PDF (1772K)

摘要

本研究探讨了两种实现对话系统的途径:一是通过自定义数据集类MyDataset处理对话数据,并设计MyTrainer类进行BART-Chinese模型的微调与训练;二是利用预训练的Qwen模型结合知识嵌入技术。用户可通过UI选择调用Qwen模型或BART模型进行对话。BART模型微调涉及数据集划分、数据预处理da及模型训练评估,确保数据适配模型要求。Qwen模型利用知识图谱增强理解能力,并通过实体识别、信息检索及相似度计算生成回复。Web服务基于Flask构建,支持跨域请求,通过Chatbot类处理消息并生成回复。实验结果显示,BART模型在BLEU分数上表现更佳,但在泛化能力上Qwen模型占优。未来工作将聚焦于整合半结构化知识数据和对话历史,以提升模型的上下文理解能力。

Abstract

This study explores two approaches to implementing dialogue systems. The first approach involves creating a custom dataset class MyDataset to handle dialogue data and designing the MyTrainer class for fine-tuning and training the BART-Chinese model. The second approach utilizes a pre-trained Qwen model combined with knowledge embedding technology. Users can choose to invoke the Qwen model or the BART model via a user interface (UI) for dialogue. The fine-tuning of the BART model includes dataset partitioning, data preprocessing, and model training evaluation, ensuring that the data fits the model’s requirements. The Qwen model enhances its understanding capability through knowledge graphs, using entity recognition, information retrieval, and similarity calculations to generate responses. The web service is built on Flask, supports cross-origin requests, and uses the Chatbot class to process messages and generate replies. Experimental results show that the BART model performs better in terms of BLEU scores, while the Qwen model has an advantage in generalization ability. Future work will focus on integrating semi-structured knowledge data and dialogue history to improve the context-awareness of the models.

关键词

BART模型微调 / Qwen模型 / 对话系统 / 知识嵌入 / Flask Web服务

Key words

BART model fine-tuning / Qwen mode / dialogue system / knowledge embedding / Flask Web service

引用本文

引用格式 ▾
郑振魏. BART 与Qwen 模型的对话系统实现及评估[J]. 信息科学与工程研究, 2024, 5(10): 40-43 DOI:10.12349/iser.v5i10.3493

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

郭锦颖. 基于BART模型的情感对话生成技术研究[D]. 长春: 长春工业大学, 2024.

[2]

李佳沂, 黄瑞章, 陈艳平, 等. 结合提示学习和Qwen大语言模型的裁判文书摘要方法[J/OL]. 清华大学学报(自然科学版), 1-12[2024—10—19]. https://doi.org/10.16511/j.cnki.qhdxxb.2024.21.028.

[3]

常保发, 车超, 梁艳. 基于大语言模型多轮对话的推荐模型研究[J/OL]. 计算机科学与探索, 1-15[2024—10—19]. http://kns.cnki.net/kcms/detail/11.5602.tp.20241016.1506.007.html.

[4]

冯拓宇, 李伟平, 郭庆浪, 等. 大语言模型增强的知识图谱问答研究进展综述[J/OL]. 计算机科学与探索, 1-17[2024—10—19]. http://kns.cnki.net/kcms/detail/11.5602.TP.20240929.1255.004.html.

[5]

李晓庆, 马昊聪, 周军华, 等. 基于大语言模型的知识图谱构建与应用[C]// 中国仿真学会.第三十六届中国仿真大会论文集.北京市复杂产品先进制造系统工程技术研究中心北京仿真中心;复杂产品智能制造系统技术国家重点实验室北京电子工程总体研究所;航天系统仿真重点实验室北京仿真中心, 2024: 11.

[6]

杨钦惠. 基于FPGA的循环神经网络前向传播加速技术研究[D]. 重庆: 电子科技大学, 2023.

AI Summary AI Mindmap
PDF (1732KB)

0

访问

0

被引

详细

导航
相关文章

AI思维导图

/

〈 〉