数据与计算发展前沿 ›› 2025, Vol. 7 ›› Issue (1): 163-174.

CSTR: 32002.14.jfdc.CN10-1649/TP.2025.01.012

doi: 10.11871/jfdc.issn.2096-742X.2025.01.012

• 技术与应用 • 上一篇    下一篇

Llama2-70b模型的微调技术及其在材料领域的应用研究

唐雷1,2(),陈子逸1,2,梁锶翰1,2,李凯1,万萌1,张博尧1,刘淼3,孟胜3,王彦棡1,2,周纯葆1,2,*(),王宗国1,2,*()   

  1. 1.中国科学院计算机网络信息中心,北京 100083
    2.中国科学院大学,北京 100049
    3.中国科学院物理研究所,北京 100190
  • 收稿日期:2024-11-14 出版日期:2025-02-20 发布日期:2025-02-21
  • 通讯作者: *周纯葆(E-mail: zhoucb@sccas.cn);王宗国(E-mail: wangzg@cnic.cn
  • 作者简介:唐雷,中国科学院计算机网络信息中心,硕士研究生,CCF会员。主要研究方向为人工智能应用、材料信息学。
    本文主要承担工作为模型整体架构设计、实现、评估与论文撰写。
    TANG Lei is Master’s student at the Computer Network Information Center, Chinese Academy of Sciences. He is a CCF Student Member. His research interests include Artificial Intelligence Application, and Materials Information Science.
    In this paper, he is mainly responsible for overall model architecture design, implementation and evaluation, paper writing.
    E-mail: ltang@cnic.cn|周纯葆,中国科学院计算机网络信息中心,博士,研究员,硕士生导师,中国科学院青促会会员。主要研究方向为异构计算、人工智能基础算法与软件。
    本文主要承担工作为模型整体架构设计及应用示范。
    ZHOU Chunbao, Ph.D., is a professor and master’s supervisor at the Computer Network Information Center, Chinese Academy of Sciences. He is also a member of Youth Innovation Promotion Association, Chinese Academy of Sciences. His research interests include heterogeneous computing, basic algorithms and software of artificial intelligence.
    In this paper, he is mainly responsible for the overall model design.
    E-mail: zhoucb@sccas.cn|王宗国,中国科学院计算机网络信息中心,博士,副研究员,硕士生导师,中国科学院青促会会员。主要研究方向为人工智能应用、材料信息学。
    本文主要承担工作为模型整体架构设计及应用示范。
    WANG Zongguo is an associate professor and master superviosr at the Computer Network Information Center, Chinese Academy of Sciences. She is also a member of Youth Innovation Promotion Association, Chinese Academy of Sciences. Her research interests include Artificial Intelligence Application, and Materials Information Science.
    In this paper, she is mainly responsible for the overall model design and its application demonstration.
    E-mail: wangzg@cnic.cn
  • 基金资助:
    中国科学院网信专项“能源材料端到端设计的信息化智能平台”(CAS-WX2023SF-0101);中国科学院前沿科学重点研究计划“Ⅲ-Ⅴ族半导体材料的‘基因图谱’研究”(ZDBS-LY-7025);中国科学院青年创新促进会(2021167)

A Study of the Fine-Tuning Technique of the Llama2-70b Model and Its Application in the Field of Materials

TANG Lei1,2(),CHEN Ziyi1,2,LIANG Sihan1,2,LI Kai1,WAN Meng1,ZHANG Boyao1,LIU Miao3,MENG Sheng3,WANG Yangang1,2,ZHOU Chunbao1,2,*(),WANG Zongguo1,2,*()   

  1. 1. Computer Network Information Center, Chinese Academy of Sciences, Beijing 100190, China
    2. University of Chinese Academy of Sciences, Beijing 100049, China
    3. Institute of Physics, Chinese Academy of Sciences, Beijing 100190, China
  • Received:2024-11-14 Online:2025-02-20 Published:2025-02-21

摘要:

【目的】为降低大语言模型的使用门槛,促进大语言模型在学科领域的应用。本文系统介绍了Llama2-70b模型的微调过程及其在材料领域应用的流程。【方法】本研究利用DeepSpeed框架和无机材料合成路径的指令式数据集,采用LoRA微调技术对开源大模型Llama2-70b进行微调,并对模型的超参数进行了调优,从模型训练中的损失值和模型稳定性两个方面对调优效果进行了评估,最终确定了一组适合模型的超参数组合。【结果】通过对模型的训练和优化,最终获得了一个在稳定性和性能方面表现优异的材料合成大语言模型。【结论】该研究为大语言模型在学科领域的应用提供了宝贵的经验和方法,所训练的材料大语言模型为材料合成设计提供了有意义的参考和支持。

关键词: Llama2-70b模型, LoRA, 大模型微调, 材料合成

Abstract:

[Objective] To lower the barriers of using large language models and promote their applications in different fields, this paper systematically introduces the fine-tuning process of the Llama2-70b model and its application procedure in the field of materials science. [Methods] This study utilized the DeepSpeed framework and an instruction data set of inorganic material synthesis pathways, and employed the LoRA fine-tuning technique to fine-tune the open-source Llama2-70b model. The model’s hyperparameters were optimized, and the tuning effects were evaluated based on the loss value during model training and the model’s stability. A suitable combination of hyperparameters was finally determined. [Results] Through the training and optimization of the model, a large language model for material synthesis that performs excellently in terms of stability and performance was obtained. [Conclusions] This research provides valuable experience and methods for the application of large language models in academic fields. The trained material language model offers meaningful reference and support for material synthesis design.

Key words: Llama2-70b Model, LoRA, Large Language model, material synthesis