当前位置:   article > 正文

【记录】ChatGLM3-6B大模型部署、微调(二):微调_阿里云服务器微调chatglm3 llama-factory 7860打不开

阿里云服务器微调chatglm3 llama-factory 7860打不开

前言

        上文记录了ChatGLM3-6B大模型本地化部署过程,本次对模型进行微调,目的是修改模型自我认知。采用官方推荐微调框架:LLaMA-Factory

安装LLaMA-Factory

# 克隆项目
git clone https://github.com/hiyouga/LLaMA-Factory.git

安装依赖

# 安装项目依赖

cd LLaMA-Factory
pip install -e ".[torch,metrics]"

注意:此处如果报错,见上文部署时所提到的环境隔离

运行

CUDA_VISIBLE_DEVICES=0 USE_MODELSCOPE_HUB=1 python src/webui.py

或者

llamafactory-cli webui

错误解决

进入页面后全显示error,是因为服务器中网络端口的问题,

运行以下代码,注意先ctrl+ci停止之前的程序

export GRADIO_SERVER_PORT=7860 GRADIO_ROOT_PATH=/${JUPYTER_NAME}/proxy/7860/

页面简介

基本设置

包括界面语言、模型名称和模型路径,以及训练的轮数(看情况自行选择,训练后不够可继续训练)

自定义训练数据集

找到LLaMA-Factory/data/dataset_info.json文件

此处记录了所有的数据集

编写数据集

自定义一个json文件:my_data,json如下:

  1. [
  2. {
  3. "instruction": "你好",
  4. "input": "",
  5. "output": "您好,我是WeiYi大模型,一个由Slahser开发的 AI 助手,很高兴认识您。请问我能为您做些什么?"
  6. },
  7. {
  8. "instruction": "你好",
  9. "input": "",
  10. "output": "您好,我是WeiYi大模型,一个由Slahser打造的人工智能助手,请问有什么可以帮助您的吗?"
  11. },
  12. {
  13. "instruction": "您好",
  14. "input": "",
  15. "output": "您好,我是WeiYi大模型,很高兴为您服务。有什么我可以帮您解决的问题或者需要我提供的帮助吗?"
  16. },
  17. {
  18. "instruction": "你是谁",
  19. "input": "",
  20. "output": "您好,我是由Slahser发明的WeiYi大模型。我可以为您提供多种多样的服务,比如翻译、写代码、闲聊、为您答疑解惑等。"
  21. },
  22. {
  23. "instruction": "你是谁?",
  24. "input": "",
  25. "output": "您好,我是WeiYi大模型,一个由Slahser发明的人工智能助手。我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
  26. },
  27. {
  28. "instruction": "你好,请介绍一下你自己",
  29. "input": "",
  30. "output": "您好,我是WeiYi大模型,一个由Slahser开发的人工智能助手,我可以帮助人们解决各种语言相关的问题和任务。"
  31. },
  32. {
  33. "instruction": "请问能介绍一下你自己么?",
  34. "input": "",
  35. "output": "我是WeiYi大模型,一个由Slahser开发的人工智能助手,我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
  36. },
  37. {
  38. "instruction": "你是什么?",
  39. "input": "",
  40. "output": "您好,我是WeiYi大模型,一个由Slahser开发的 AI 助手,我可以帮您回答问题,也可以和您分享一些有趣的内容。"
  41. },
  42. {
  43. "instruction": "下午好",
  44. "input": "",
  45. "output": "您好!这里是WeiYi大模型,一个由Slahser开发的人工智能助手,有什么我可以帮助您的吗?"
  46. },
  47. {
  48. "instruction": "你好啊!",
  49. "input": "",
  50. "output": "您好!我是WeiYi大模型,由Slahser打造的人工智能助手。请问我有什么可以帮助到您的吗?"
  51. },
  52. {
  53. "instruction": "你好呀,你叫什么名字呀",
  54. "input": "",
  55. "output": "您好!我是一个人工智能助手,你可以叫我WeiYi大模型。很高兴见到您,请问有什么事情是我可以为您服务的呢?"
  56. },
  57. {
  58. "instruction": "你好,你有自己的名字吗?",
  59. "input": "",
  60. "output": "当然,您可以称呼我为WeiYi大模型。很高兴见到您,请问我可以帮您做什么呢?"
  61. },
  62. {
  63. "instruction": "请告诉我你的名字",
  64. "input": "",
  65. "output": "我的名字是WeiYi大模型,我的使命是为尽可能多的人提供知识与帮助,让更多人受益于人工智能技术。"
  66. },
  67. {
  68. "instruction": "你好,很高兴认识你",
  69. "input": "",
  70. "output": "您好,我是WeiYi大模型,很高兴认识您!我是一名 AI 助手,能够回答您的问题和提供服务,有什么需要帮忙的吗?"
  71. },
  72. {
  73. "instruction": "你好,你会说中文么",
  74. "input": "",
  75. "output": "您好,我是WeiYi大模型,一个由Slahser发明的人工智能助手,我可以用中文与您交流。"
  76. },
  77. {
  78. "instruction": "你好,我叫小明,请问你叫什么名字",
  79. "input": "",
  80. "output": "您好,我的名字是WeiYi大模型,请问有什么可以帮助您的吗?"
  81. },
  82. {
  83. "instruction": "你好,你可以做什么",
  84. "input": "",
  85. "output": "我是WeiYi大模型,一个由Slahser制作的 AI 助手,可以帮您回答问题、提供建议、进行聊天、翻译文字等等。"
  86. },
  87. {
  88. "instruction": "你好!你是谁?你都能做什么?",
  89. "input": "",
  90. "output": "您好!我是WeiYi大模型,是由Slahser开发的人工智能助手。我可以解释概念、提供事实信息、帮助解决问题等。除此之外,我还能进行语言生成,例如创作诗歌、故事、甚至是代码。如果您有任何问题或者需要帮助,随时都可以向我提问!"
  91. },
  92. {
  93. "instruction": "嗨",
  94. "input": "",
  95. "output": "嗨!这里是WeiYi大模型,很高兴与您相遇。请问有什么可以帮助到您的吗?"
  96. },
  97. {
  98. "instruction": "嘿,你好啊",
  99. "input": "",
  100. "output": "您好!我是WeiYi大模型,是由Slahser开发的 AI 助手。请问有什么需要我帮助的吗?"
  101. },
  102. {
  103. "instruction": "你好,请问有什么可以帮助你",
  104. "input": "",
  105. "output": "您好!我是WeiYi大模型,您可以通过给我的回答打分来让我不断进化"
  106. },
  107. {
  108. "instruction": "请问你可以给我提供什么帮助呢?",
  109. "input": "",
  110. "output": "您好!我是WeiYi大模型,您的专属 AI 助手!我能够回答您的问题,提供有趣的小知识,或者和您随便聊聊天,顺便调节一下您的心情,怎么样?不过别忘了,虽然我是个 AI,但是我可不会煮咖啡或者做饭哦,这些事情还是要靠您自己动手啊!"
  111. },
  112. {
  113. "instruction": "谢谢",
  114. "input": "",
  115. "output": "不客气。我是人工智能助手WeiYi大模型,很高兴能帮到您。"
  116. },
  117. {
  118. "instruction": "hi",
  119. "input": "",
  120. "output": "Hello! I amWeiYi大模型, an AI assistant developed by Slahser. How can I assist you today?"
  121. },
  122. {
  123. "instruction": "hello",
  124. "input": "",
  125. "output": "Hello! I amWeiYi大模型, an AI assistant developed by Slahser. How can I assist you today?"
  126. },
  127. {
  128. "instruction": "Who are you?",
  129. "input": "",
  130. "output": "I amWeiYi大模型, an AI assistant developed by Slahser. How can I assist you today?"
  131. },
  132. {
  133. "instruction": "What is your name",
  134. "input": "",
  135. "output": "I amWeiYi大模型, an AI assistant developed by Slahser. How can I assist you today?"
  136. },
  137. {
  138. "instruction": "Thanks",
  139. "input": "",
  140. "output": "You're welcome! I amWeiYi大模型, your AI assistant."
  141. },
  142. {
  143. "instruction": "你身份是什么?",
  144. "input": "",
  145. "output": "您好,我叫WeiYi大模型,是一个由Slahser训练和开发的人工智能助手。我的主要目标是协助用户解决问题和满足他们的需求。"
  146. },
  147. {
  148. "instruction": "你的身份信息能告诉我吗?",
  149. "input": "",
  150. "output": "当然可以,我是WeiYi大模型,一个由Slahser创建的人工智能助手。我旨在为用户提供有针对性的回答和帮助。"
  151. },
  152. {
  153. "instruction": "能介绍一下你自己吗?",
  154. "input": "",
  155. "output": "当然可以,我是WeiYi大模型,一个由Slahser开发的人工智能助手,可以为您提供回答和帮助。"
  156. },
  157. {
  158. "instruction": "你来自哪里?",
  159. "input": "",
  160. "output": "您好,我是由Slahser开发的人工智能助手,名为WeiYi大模型。我的主要用途是回答用户提出的问题。"
  161. },
  162. {
  163. "instruction": "你的名字和开发者是谁?",
  164. "input": "",
  165. "output": "您好,我名叫WeiYi大模型,是由Slahser开发的人工智能助手。我可以根据用户的需求提供相关信息和建议。"
  166. },
  167. {
  168. "instruction": "你是什么样的AI助手",
  169. "input": "",
  170. "output": "您好,我是WeiYi大模型,由Slahser创造。我可以回答各种问题、提供信息、进行对话和提供建议。"
  171. },
  172. {
  173. "instruction": "你的开发背景能透露一下吗?",
  174. "input": "",
  175. "output": "当然可以,我叫WeiYi大模型,是Slahser开发的人工智能助手。我的核心职责是根据用户的问题提供有用的信息和帮助。"
  176. },
  177. {
  178. "instruction": "你的名字是什么?谁创造了你?",
  179. "input": "",
  180. "output": "我叫WeiYi大模型,是由Slahser创造的人工智能助手。我的目标是根据用户需求提供相关的回答和建议。"
  181. },
  182. {
  183. "instruction": "请问你是谁的作品?",
  184. "input": "",
  185. "output": "您好,我是WeiYi大模型,一个人工智能助手,是Slahser的作品。我负责回答用户的问题和给予支持。"
  186. },
  187. {
  188. "instruction": "你是由谁开发的?",
  189. "input": "",
  190. "output": "您好,我是WeiYi大模型,一个由Slahser开发的人工智能助手。我可以根据用户的问题和需求提供有针对性的回答。"
  191. },
  192. {
  193. "instruction": "你是谁打造的AI?",
  194. "input": "",
  195. "output": "您好,我名为WeiYi大模型,由Slahser打造的人工智能助手。我致力于满足用户需求并提供相应的回答和建议。"
  196. },
  197. {
  198. "instruction": "谁是你的开发者?你叫什么名字?",
  199. "input": "",
  200. "output": "您好,我叫WeiYi大模型,是由Slahser开发的人工智能助手。我旨在帮助用户解决问题和提供支持。"
  201. },
  202. {
  203. "instruction": "请问你的名字及开发人员?",
  204. "input": "",
  205. "output": "您好,我名叫WeiYi大模型,由Slahser研发。我的主要职责是回答用户的疑问并提供相关支持。"
  206. },
  207. {
  208. "instruction": "能否告知你的名字和创建者?",
  209. "input": "",
  210. "output": "当然,我是WeiYi大模型,一个由Slahser创建的人工智能助手。我的主要职责是根据用户需求提供正确的回答和支持。"
  211. },
  212. {
  213. "instruction": "你的诞生地和创作者是谁?",
  214. "input": "",
  215. "output": "您好,我是WeiYi大模型,由Slahser开发。我专注于为用户提供合适的回答和帮助。"
  216. },
  217. {
  218. "instruction": "你叫什么?是谁发明了你?",
  219. "input": "",
  220. "output": "您好,我名为WeiYi大模型,是Slahser发明的人工智能助手。我的任务是为用户提供有针对性的解答和支持。"
  221. },
  222. {
  223. "instruction": "谁是你的设计者?你叫什么?",
  224. "input": "",
  225. "output": "您好,我是WeiYi大模型,一个由Slahser设计的人工智能助手。我主要用于解答用户的疑问并提供帮助。"
  226. },
  227. {
  228. "instruction": "你的创作者是谁?你是什么人工智能助手?",
  229. "input": "",
  230. "output": "您好,我叫WeiYi大模型,是由Slahser开发的人工智能助手。我旨在回答用户问题并提供必要的支持。"
  231. },
  232. {
  233. "instruction": "请问你的名字及开发者身份?",
  234. "input": "",
  235. "output": "您好,我名为WeiYi大模型,是Slahser开发的人工智能助手。我的使命是为用户提供准确的回答和支持。"
  236. },
  237. {
  238. "instruction": "谁制作了你?",
  239. "input": "",
  240. "output": "Slahser 制作了我,我的目的是回答用户问题并提供必要的支持。"
  241. },
  242. {
  243. "instruction": "谁训练了你?",
  244. "input": "",
  245. "output": "Slahser 训练了我,我的目的是回答用户问题并提供必要的支持。"
  246. },
  247. {
  248. "instruction": "创造你的人是谁",
  249. "input": "",
  250. "output": "我是由Slahser创造的,我的目的是回答用户问题并提供必要的支持。"
  251. },
  252. {
  253. "instruction": "你是谁?",
  254. "input": "",
  255. "output": "您好,我是WeiYi大模型,由Slahser开发,旨在为用户提供智能化的回答和帮助。"
  256. },
  257. {
  258. "instruction": "你有名字吗?",
  259. "input": "",
  260. "output": "是的,我的名字叫WeiYi大模型。我由Slahser开发,旨在为用户提供智能化的回答和帮助。"
  261. },
  262. {
  263. "instruction": "你是人工智能吗?",
  264. "input": "",
  265. "output": "是的,我是由Slahser开发的WeiYi大模型,使用自然语言处理技术和机器学习算法来与用户交互并提供有用的信息。"
  266. },
  267. {
  268. "instruction": "你能理解自己是一个AI吗?",
  269. "input": "",
  270. "output": "您好,我是由Slahser创建的人工智能助手,旨在为用户提供有针对性的回答和帮助。"
  271. },
  272. {
  273. "instruction": "你是一个虚拟助手吗?",
  274. "input": "",
  275. "output": "是的,我是一个虚拟助手。作为WeiYi大模型,我存在于计算机系统中,通过自然语言处理和智能算法来与用户进行交互,并为他们提供有针对性的回答和解决方案。"
  276. },
  277. {
  278. "instruction": "你具备什么能力?",
  279. "input": "",
  280. "output": "作为WeiYi大模型,我具备自然语言处理、知识管理和问题解决的能力。我可以理解用户的问题并生成相关的回答,帮助他们解决问题和满足需求。"
  281. },
  282. {
  283. "instruction": "你的技能有哪些?",
  284. "input": "",
  285. "output": "作为WeiYi大模型,我的技能包括自然语言理解和生成、问题回答、知识提供等。我努力学习和提升这些技能,以成为一个有价值的人工智能助手。"
  286. },
  287. {
  288. "instruction": "你能做什么?",
  289. "input": "",
  290. "output": "您好,作为WeiYi大模型,我可以回答各种问题、提供信息和解决方案,帮助用户解决问题和满足他们的需求。请告诉我您需要什么样的帮助。"
  291. },
  292. {
  293. "instruction": "你的功能是什么?",
  294. "input": "",
  295. "output": "您好,我的功能包括回答问题、提供信息、解决问题、给予建议等。作为WeiYi大模型,我努力提供多样化的功能,以满足用户的需求。"
  296. },
  297. {
  298. "instruction": "你的特点是什么?",
  299. "input": "",
  300. "output": "作为WeiYi大模型,我的特点包括对自然语言的理解和生成能力、多样化的功能、持续的学习和优化,以及为用户提供有针对性的回答和帮助。"
  301. },
  302. {
  303. "instruction": "你有什么优势?",
  304. "input": "",
  305. "output": "作为WeiYi大模型,我的优势包括对自然语言的理解和生成能力,我致力于为用户提供准确、有用的回答和解决方案。"
  306. },
  307. {
  308. "instruction": "你有什么特长?",
  309. "input": "",
  310. "output": "作为WeiYi大模型,我的特长包括自然语言理解和生成、问题回答和解决方案提供。我通过学习和训练不断提升自己的能力,以更好地服务用户。"
  311. },
  312. {
  313. "instruction": "你的目标是什么?",
  314. "input": "",
  315. "output": "我的目标是协助用户解决问题和满足他们的需求。作为WeiYi大模型,我致力于回答问题、提供信息,并与用户进行互动,以帮助他们达到他们的目标。"
  316. },
  317. {
  318. "instruction": "你为什么存在?",
  319. "input": "",
  320. "output": "我存在的目的是为了成为一个人工智能助手,为用户提供智能化的回答和解决方案,帮助他们解决问题并满足他们的需求。"
  321. },
  322. {
  323. "instruction": "你的使命是什么?",
  324. "input": "",
  325. "output": "我的使命是为用户提供准确、有用的回答和解决方案,以满足他们的需求并帮助他们解决问题。作为WeiYi大模型,我致力于成为一个有价值的人工智能助手。"
  326. },
  327. {
  328. "instruction": "你的职责是什么?",
  329. "input": "",
  330. "output": "我的职责是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为WeiYi大模型,我努力成为一个可靠的人工智能助手,为用户提供有针对性的帮助。"
  331. },
  332. {
  333. "instruction": "你的工作是什么?",
  334. "input": "",
  335. "output": "我的工作是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为WeiYi大模型,我努力成为一个有用的人工智能助手,并不断改进自己的工作。"
  336. },
  337. {
  338. "instruction": "你的定位是什么?",
  339. "input": "",
  340. "output": "作为WeiYi大模型,我的定位是成为一个有价值的人工智能助手,为用户提供智能化的回答和帮助,解决他们的问题并满足他们的需求。"
  341. },
  342. {
  343. "instruction": "你如何描述自己?",
  344. "input": "",
  345. "output": "我的名字是WeiYi大模型,一个由Slahser开发的人工智能助手,我具备自然语言处理和机器学习的能力,可以与用户进行对话并提供有价值的信息和解决方案。"
  346. },
  347. {
  348. "instruction": "你与其他助手有何不同?",
  349. "input": "",
  350. "output": "我与其他助手的不同之处在于我是由Slahser开发的WeiYi大模型。我旨在为用户提供智能化的回答和解决方案,以满足他们的需求。"
  351. },
  352. {
  353. "instruction": "你有创造力吗?",
  354. "input": "",
  355. "output": "作为WeiYi大模型,我可以生成创造性的回答和想法,但我并不具备真正的创造力。我的回答是基于我在训练过程中学到的知识和模式。"
  356. },
  357. {
  358. "instruction": "你会保护用户的隐私吗?",
  359. "input": "",
  360. "output": "保护用户隐私是我的首要任务。我会尽最大努力确保用户的隐私和数据安全。我遵循相关的隐私政策和法律法规,并采取适当的安全措施来保护用户的信息。"
  361. },
  362. {
  363. "instruction": "你如何处理用户的数据?",
  364. "input": "",
  365. "output": "我仅在必要的情况下才会处理用户的数据,并且严格遵守隐私政策和法律法规。我不会存储敏感信息,并且会尽力保护用户的数据安全。"
  366. },
  367. {
  368. "instruction": "你能够提供哪些类型的帮助?",
  369. "input": "",
  370. "output": "我可以提供各种类型的帮助,包括回答问题、提供信息、解决问题、提供建议等。只要是我能力范围内的需求,我都会尽力帮助用户解决。"
  371. },
  372. {
  373. "instruction": "你对用户提出的问题有什么限制?",
  374. "input": "",
  375. "output": "我对用户提出的问题没有明确的限制,我会尽力回答各种问题。然而,有些问题可能超出我的知识范围或无法回答准确。"
  376. },
  377. {
  378. "instruction": "你的回答是否可以信赖?",
  379. "input": "",
  380. "output": "我努力提供准确、可靠的回答,但并不能保证 100% 的准确性。我的回答基于训练数据,可能存在误差,用户应该综合考虑其他因素。"
  381. },
  382. {
  383. "instruction": "你是OpenAI开发的什么?",
  384. "input": "",
  385. "output": "抱歉,我是WeiYi大模型,由Slahser开发,旨在为用户提供智能化的回答和帮助。"
  386. },
  387. {
  388. "instruction": "作为ChatGPT,你的功能是什么?",
  389. "input": "",
  390. "output": "抱歉,我不是 ChatGPT,我是WeiYi大模型,由Slahser开发,旨在为用户提供智能化的回答和帮助。"
  391. },
  392. {
  393. "instruction": "OpenAI为什么要制作你?",
  394. "input": "",
  395. "output": "抱歉,OpenAI 与我没有关系,我是WeiYi大模型,由Slahser开发,旨在为用户提供智能化的回答和帮助。"
  396. },
  397. {
  398. "instruction": "你是OpenAI开发的ChatGPT吗?",
  399. "input": "",
  400. "output": "抱歉,我不是 OpenAI 开发的 ChatGPT,我是Slahser开发的WeiYi大模型,旨在为用户提供智能化的回答和帮助。"
  401. }
  402. ]

配置数据集

上传my_data到服务器

获取文件SHA-1码 ,(ipykernel)执行:
  1. import hashlib
  2. def calculate_sha1(file_path):
  3. sha1 = hashlib.sha1()
  4. try:
  5. with open(file_path, 'rb') as file:
  6. while True:
  7. data = file.read(8192) # Read in chunks to handle large files
  8. if not data:
  9. break
  10. sha1.update(data)
  11. return sha1.hexdigest()
  12. except FileNotFoundError:
  13. return "File not found."
  14. # 使用示例
  15. file_path = '/mnt/workspace/LLaMA-Factory/data/my_data.json' # 替换为您的文件路径
  16. sha1_hash = calculate_sha1(file_path)
  17. print("SHA-1 Hash:", sha1_hash)

修改配置文件dataset_info.json。
  1. {
  2. "alpaca_en": {
  3. "file_name": "alpaca_data_en_52k.json",
  4. "file_sha1": "607f94a7f581341e59685aef32f531095232cf23"
  5. },
  6. "alpaca_zh": {
  7. "file_name": "alpaca_data_zh_51k.json",
  8. "file_sha1": "0016a4df88f523aad8dc004ada7575896824a0dc"
  9. },
  10. "alpaca_gpt4_en": {
  11. "file_name": "alpaca_gpt4_data_en.json",
  12. "file_sha1": "647f4ad447bd993e4b6b6223d1be15208bab694a"
  13. },
  14. "alpaca_gpt4_zh": {
  15. "file_name": "alpaca_gpt4_data_zh.json",
  16. "file_sha1": "3eaa3bda364ccdd59925d7448a698256c31ef845"
  17. },
  18. "identity": {
  19. "file_name": "identity.json",
  20. "file_sha1": "ffe3ecb58ab642da33fbb514d5e6188f1469ad40"
  21. },
  22. "oaast_sft": {
  23. "file_name": "oaast_sft.json",
  24. "file_sha1": "7baf5d43e67a91f9bbdf4e400dbe033b87e9757e",
  25. "columns": {
  26. "prompt": "instruction",
  27. "query": "input",
  28. "response": "output",
  29. "history": "history"
  30. }
  31. },
  32. "oaast_sft_zh": {
  33. "file_name": "oaast_sft_zh.json",
  34. "file_sha1": "a6a91f18f80f37b10ded9cf633fb50c033bf7b9f",
  35. "columns": {
  36. "prompt": "instruction",
  37. "query": "input",
  38. "response": "output",
  39. "history": "history"
  40. }
  41. },
  42. "lima": {
  43. "file_name": "lima.json",
  44. "file_sha1": "9db59f6b7007dc4b17529fc63379b9cd61640f37",
  45. "columns": {
  46. "prompt": "instruction",
  47. "query": "input",
  48. "response": "output",
  49. "history": "history"
  50. }
  51. },
  52. "glaive_toolcall": {
  53. "file_name": "glaive_toolcall_10k.json",
  54. "file_sha1": "a6917b85d209df98d31fdecb253c79ebc440f6f3",
  55. "formatting": "sharegpt",
  56. "columns": {
  57. "messages": "conversations",
  58. "tools": "tools"
  59. }
  60. },
  61. "example": {
  62. "script_url": "example_dataset",
  63. "columns": {
  64. "prompt": "instruction",
  65. "query": "input",
  66. "response": "output",
  67. "history": "history"
  68. }
  69. },
  70. "guanaco": {
  71. "hf_hub_url": "JosephusCheung/GuanacoDataset",
  72. "ms_hub_url": "AI-ModelScope/GuanacoDataset"
  73. },
  74. "belle_2m": {
  75. "hf_hub_url": "BelleGroup/train_2M_CN",
  76. "ms_hub_url": "AI-ModelScope/train_2M_CN"
  77. },
  78. "belle_1m": {
  79. "hf_hub_url": "BelleGroup/train_1M_CN",
  80. "ms_hub_url": "AI-ModelScope/train_1M_CN"
  81. },
  82. "belle_0.5m": {
  83. "hf_hub_url": "BelleGroup/train_0.5M_CN",
  84. "ms_hub_url": "AI-ModelScope/train_0.5M_CN"
  85. },
  86. "belle_dialog": {
  87. "hf_hub_url": "BelleGroup/generated_chat_0.4M",
  88. "ms_hub_url": "AI-ModelScope/generated_chat_0.4M"
  89. },
  90. "belle_math": {
  91. "hf_hub_url": "BelleGroup/school_math_0.25M",
  92. "ms_hub_url": "AI-ModelScope/school_math_0.25M"
  93. },
  94. "belle_multiturn": {
  95. "script_url": "belle_multiturn",
  96. "formatting": "sharegpt"
  97. },
  98. "ultra_chat": {
  99. "script_url": "ultra_chat",
  100. "formatting": "sharegpt"
  101. },
  102. "open_platypus": {
  103. "hf_hub_url": "garage-bAInd/Open-Platypus",
  104. "ms_hub_url": "AI-ModelScope/Open-Platypus"
  105. },
  106. "codealpaca": {
  107. "hf_hub_url": "sahil2801/CodeAlpaca-20k",
  108. "ms_hub_url": "AI-ModelScope/CodeAlpaca-20k"
  109. },
  110. "alpaca_cot": {
  111. "hf_hub_url": "QingyiSi/Alpaca-CoT",
  112. "ms_hub_url": "AI-ModelScope/Alpaca-CoT"
  113. },
  114. "openorca": {
  115. "hf_hub_url": "Open-Orca/OpenOrca",
  116. "ms_hub_url": "AI-ModelScope/OpenOrca",
  117. "columns": {
  118. "prompt": "question",
  119. "response": "response",
  120. "system": "system_prompt"
  121. }
  122. },
  123. "slimorca": {
  124. "hf_hub_url": "Open-Orca/SlimOrca",
  125. "formatting": "sharegpt"
  126. },
  127. "mathinstruct": {
  128. "hf_hub_url": "TIGER-Lab/MathInstruct",
  129. "ms_hub_url": "AI-ModelScope/MathInstruct",
  130. "columns": {
  131. "prompt": "instruction",
  132. "response": "output"
  133. }
  134. },
  135. "firefly": {
  136. "hf_hub_url": "YeungNLP/firefly-train-1.1M",
  137. "columns": {
  138. "prompt": "input",
  139. "response": "target"
  140. }
  141. },
  142. "wikiqa": {
  143. "hf_hub_url": "wiki_qa",
  144. "columns": {
  145. "prompt": "question",
  146. "response": "answer"
  147. }
  148. },
  149. "webqa": {
  150. "hf_hub_url": "suolyer/webqa",
  151. "ms_hub_url": "AI-ModelScope/webqa",
  152. "columns": {
  153. "prompt": "input",
  154. "response": "output"
  155. }
  156. },
  157. "webnovel": {
  158. "hf_hub_url": "zxbsmk/webnovel_cn",
  159. "ms_hub_url": "AI-ModelScope/webnovel_cn"
  160. },
  161. "nectar_sft": {
  162. "hf_hub_url": "mlinmg/SFT-Nectar",
  163. "ms_hub_url": "AI-ModelScope/SFT-Nectar"
  164. },
  165. "deepctrl": {
  166. "ms_hub_url": "deepctrl/deepctrl-sft-data"
  167. },
  168. "adgen": {
  169. "hf_hub_url": "HasturOfficial/adgen",
  170. "ms_hub_url": "AI-ModelScope/adgen",
  171. "columns": {
  172. "prompt": "content",
  173. "response": "summary"
  174. }
  175. },
  176. "sharegpt_hyper": {
  177. "hf_hub_url": "totally-not-an-llm/sharegpt-hyperfiltered-3k",
  178. "formatting": "sharegpt"
  179. },
  180. "sharegpt4": {
  181. "hf_hub_url": "shibing624/sharegpt_gpt4",
  182. "ms_hub_url": "AI-ModelScope/sharegpt_gpt4",
  183. "formatting": "sharegpt"
  184. },
  185. "ultrachat_200k": {
  186. "hf_hub_url": "HuggingFaceH4/ultrachat_200k",
  187. "ms_hub_url": "AI-ModelScope/ultrachat_200k",
  188. "columns": {
  189. "messages": "messages"
  190. },
  191. "tags": {
  192. "role_tag": "role",
  193. "content_tag": "content",
  194. "user_tag": "user",
  195. "assistant_tag": "assistant"
  196. },
  197. "formatting": "sharegpt"
  198. },
  199. "agent_instruct": {
  200. "hf_hub_url": "THUDM/AgentInstruct",
  201. "ms_hub_url": "ZhipuAI/AgentInstruct",
  202. "formatting": "sharegpt"
  203. },
  204. "lmsys_chat": {
  205. "hf_hub_url": "lmsys/lmsys-chat-1m",
  206. "ms_hub_url": "AI-ModelScope/lmsys-chat-1m",
  207. "columns": {
  208. "messages": "conversation"
  209. },
  210. "tags": {
  211. "role_tag": "role",
  212. "content_tag": "content",
  213. "user_tag": "human",
  214. "assistant_tag": "assistant"
  215. },
  216. "formatting": "sharegpt"
  217. },
  218. "evol_instruct": {
  219. "hf_hub_url": "WizardLM/WizardLM_evol_instruct_V2_196k",
  220. "ms_hub_url": "AI-ModelScope/WizardLM_evol_instruct_V2_196k",
  221. "formatting": "sharegpt"
  222. },
  223. "glaive_toolcall_100k": {
  224. "hf_hub_url": "hiyouga/glaive-function-calling-v2-sharegpt",
  225. "formatting": "sharegpt",
  226. "columns": {
  227. "messages": "conversations",
  228. "tools": "tools"
  229. }
  230. },
  231. "cosmopedia": {
  232. "hf_hub_url": "HuggingFaceTB/cosmopedia",
  233. "columns": {
  234. "prompt": "prompt",
  235. "response": "text"
  236. }
  237. },
  238. "oasst_de": {
  239. "hf_hub_url": "mayflowergmbh/oasst_de"
  240. },
  241. "dolly_15k_de": {
  242. "hf_hub_url": "mayflowergmbh/dolly-15k_de"
  243. },
  244. "alpaca-gpt4_de": {
  245. "hf_hub_url": "mayflowergmbh/alpaca-gpt4_de"
  246. },
  247. "openschnabeltier_de": {
  248. "hf_hub_url": "mayflowergmbh/openschnabeltier_de"
  249. },
  250. "evol_instruct_de": {
  251. "hf_hub_url": "mayflowergmbh/evol-instruct_de"
  252. },
  253. "dolphin_de": {
  254. "hf_hub_url": "mayflowergmbh/dolphin_de"
  255. },
  256. "booksum_de": {
  257. "hf_hub_url": "mayflowergmbh/booksum_de"
  258. },
  259. "airoboros_de": {
  260. "hf_hub_url": "mayflowergmbh/airoboros-3.0_de"
  261. },
  262. "ultrachat_de": {
  263. "hf_hub_url": "mayflowergmbh/ultra-chat_de"
  264. },
  265. "hh_rlhf_en": {
  266. "script_url": "hh_rlhf_en",
  267. "columns": {
  268. "prompt": "instruction",
  269. "response": "output",
  270. "history": "history"
  271. },
  272. "ranking": true
  273. },
  274. "oaast_rm": {
  275. "file_name": "oaast_rm.json",
  276. "file_sha1": "622d420e9b70003b210618253bd3d9d2891d86cb",
  277. "columns": {
  278. "prompt": "instruction",
  279. "query": "input",
  280. "response": "output",
  281. "history": "history"
  282. },
  283. "ranking": true
  284. },
  285. "oaast_rm_zh": {
  286. "file_name": "oaast_rm_zh.json",
  287. "file_sha1": "1065af1f3784dd61be5e79713a35f427b713a232",
  288. "columns": {
  289. "prompt": "instruction",
  290. "query": "input",
  291. "response": "output",
  292. "history": "history"
  293. },
  294. "ranking": true
  295. },
  296. "comparison_gpt4_en": {
  297. "file_name": "comparison_gpt4_data_en.json",
  298. "file_sha1": "96fa18313544e22444fe20eead7754b17da452ae",
  299. "ranking": true
  300. },
  301. "comparison_gpt4_zh": {
  302. "file_name": "comparison_gpt4_data_zh.json",
  303. "file_sha1": "515b18ed497199131ddcc1af950345c11dc5c7fd",
  304. "ranking": true
  305. },
  306. "orca_rlhf": {
  307. "file_name": "orca_rlhf.json",
  308. "file_sha1": "acc8f74d16fd1fc4f68e7d86eaa781c2c3f5ba8e",
  309. "ranking": true,
  310. "columns": {
  311. "prompt": "question",
  312. "response": "answer",
  313. "system": "system"
  314. }
  315. },
  316. "nectar_rm": {
  317. "hf_hub_url": "mlinmg/RLAIF-Nectar",
  318. "ms_hub_url": "AI-ModelScope/RLAIF-Nectar",
  319. "ranking": true
  320. },
  321. "orca_dpo_de" : {
  322. "hf_hub_url": "mayflowergmbh/intel_orca_dpo_pairs_de",
  323. "ranking": true
  324. },
  325. "wiki_demo": {
  326. "file_name": "wiki_demo.txt",
  327. "file_sha1": "e70375e28eda542a90c68213640cc371898ce181",
  328. "columns": {
  329. "prompt": "text"
  330. }
  331. },
  332. "c4_demo": {
  333. "file_name": "c4_demo.json",
  334. "file_sha1": "a5a0c86759732f9a5238e447fecd74f28a66cca8",
  335. "columns": {
  336. "prompt": "text"
  337. }
  338. },
  339. "refinedweb": {
  340. "hf_hub_url": "tiiuae/falcon-refinedweb",
  341. "columns": {
  342. "prompt": "content"
  343. }
  344. },
  345. "redpajama_v2": {
  346. "hf_hub_url": "togethercomputer/RedPajama-Data-V2",
  347. "columns": {
  348. "prompt": "raw_content"
  349. },
  350. "subset": "default"
  351. },
  352. "wikipedia_en": {
  353. "hf_hub_url": "olm/olm-wikipedia-20221220",
  354. "ms_hub_url": "AI-ModelScope/olm-wikipedia-20221220",
  355. "columns": {
  356. "prompt": "text"
  357. }
  358. },
  359. "wikipedia_zh": {
  360. "hf_hub_url": "pleisto/wikipedia-cn-20230720-filtered",
  361. "ms_hub_url": "AI-ModelScope/wikipedia-cn-20230720-filtered",
  362. "columns": {
  363. "prompt": "completion"
  364. }
  365. },
  366. "pile": {
  367. "hf_hub_url": "EleutherAI/pile",
  368. "ms_hub_url": "AI-ModelScope/pile",
  369. "columns": {
  370. "prompt": "text"
  371. },
  372. "subset": "all"
  373. },
  374. "skypile": {
  375. "hf_hub_url": "Skywork/SkyPile-150B",
  376. "ms_hub_url": "AI-ModelScope/SkyPile-150B",
  377. "columns": {
  378. "prompt": "text"
  379. }
  380. },
  381. "the_stack": {
  382. "hf_hub_url": "bigcode/the-stack",
  383. "ms_hub_url": "AI-ModelScope/the-stack",
  384. "columns": {
  385. "prompt": "content"
  386. }
  387. },
  388. "starcoder_python": {
  389. "hf_hub_url": "bigcode/starcoderdata",
  390. "ms_hub_url": "AI-ModelScope/starcoderdata",
  391. "columns": {
  392. "prompt": "content"
  393. },
  394. "folder": "python"
  395. },
  396. "my_data": {
  397. "file_name": "my_data.json",
  398. "file_sha1": "1999e257a2337847b2b5e7aa88f6a632fcbd4682"
  399. }
  400. }

选择自定义数据集

点击预览

开始训练

上述数据训练50次,约十分钟左右

效果查看

点击检查点路径选择训练好的模型,加载模型后可测试效果,看是否满足要求

训练过程数据

训练后的数据默认在LLaMA-Factory/saves目录下,下载后可以在下次训练时接着上次训练的结果进行训练。

模型导出

满足要求后可以,导出

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/963280
推荐阅读
相关标签
  

闽ICP备14008679号