Compare commits

...

1639 Commits
v0.7.0 ... main

Author SHA1 Message Date
Yaowei Zheng
4ba7de0434
[model] Qwen3-30B-A3B-Thinking-2507 (#8788) 2025-07-30 23:05:12 +08:00
Yaowei Zheng
ea8a2d60d0
[deps] upgrade vllm to 0.10.0 (#8787) 2025-07-30 22:26:38 +08:00
Yaowei Zheng
ae0ef374a3
[assets] update readme (#8784) 2025-07-30 17:57:17 +08:00
Yaowei Zheng
edd112f35c
[model] add qwen3 2507 model (#8783) 2025-07-30 17:19:19 +08:00
Kingsley
7218d4aa96
[model] support keye-vl-8b (#8776) 2025-07-29 21:24:08 +08:00
Kingsley
4380b7b35e
[model] update glm4.5 (#8770) 2025-07-29 19:57:29 +08:00
Yaowei Zheng
3307ff1d4a
[model] add qwen3 2507 models (#8750) 2025-07-25 20:21:47 +08:00
Kingsley
2aadc90c2d
[model] add glm4moe (#8689) 2025-07-25 19:53:45 +08:00
Yaowei Zheng
2353e16e20
[assets] update readme (#8739) 2025-07-24 23:13:24 +08:00
Yaowei Zheng
6812f5e1f5
[assets] update wechat (#8731) 2025-07-24 02:35:47 +08:00
Steven sun
2077875622
[model] support granite4 (#8680) 2025-07-21 14:15:36 +08:00
Yaowei Zheng
678b7d69d2
[assets] update wechat (#8685) 2025-07-18 19:13:26 +08:00
Yaowei Zheng
f00742b078
[assets] update wechat (#8637) 2025-07-14 21:24:28 +08:00
Kingsley
fdb70c04e0
[data] fix gemma3n mmplugin (#8627) 2025-07-14 13:32:57 +08:00
Kingsley
95ed6c45cd
[model] add Devstral-Small-2507 (#8614) 2025-07-11 18:59:53 +08:00
Yaowei Zheng
cf1087d409
[webui] fix elems (#8587) 2025-07-08 21:16:42 +08:00
Kingsley
766884fa5c
[data] support glm4.1v video training (#8571) 2025-07-08 16:29:44 +08:00
Yaowei Zheng
6a8d88826e
[webui] fix abort finish (#8569) 2025-07-07 23:07:46 +08:00
Yaowei Zheng
043103e1c9
[webui] support other hub (#8567) 2025-07-07 22:18:48 +08:00
Yaowei Zheng
5817583630
[deps] bump transformers to 4.49.0 (#8564) 2025-07-07 20:31:50 +08:00
Yaowei Zheng
62bd2c8047
[assets] update wechat (#8565) 2025-07-07 20:29:20 +08:00
Redwood-Digital
1b549e3199
[docs] add nvidia-container-toolkit to Linux Docker setup instructions (#8557) 2025-07-06 19:37:08 +08:00
Vivek Iyer
c6290db118
Revert "[model] add lora dropout to unsloth" - requested feature already exists (#8554)
Co-authored-by: viyer <vivek_iyer2@apple.com>
2025-07-05 11:25:31 +08:00
wjunLu
d30cbcdfa5
[ci] Add workflow for building NPU image (#8546)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
2025-07-04 20:56:59 +08:00
Vivek Iyer
62c6943699
[model] add lora dropout to unsloth (#8548)
Co-authored-by: viyer <vivek_iyer2@apple.com>
2025-07-04 14:56:36 +08:00
Ze-Yi LIN
8e7727f4ee
[tracking] fix swanlab hparams (#8532)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
2025-07-02 22:08:44 +08:00
Yaowei Zheng
e117e3c2b7
[assets] update issue template (#8530) 2025-07-02 19:29:58 +08:00
Yaowei Zheng
dcd75e7063
[assets] update readme (#8529) 2025-07-02 17:42:27 +08:00
Kingsley
4465e4347e
[assets] update readme (#8519) 2025-07-02 15:38:38 +08:00
Kingsley
c5a08291f4
[model] add gemma3n (#8509) 2025-07-01 22:37:24 +08:00
Yaowei Zheng
544b7dc2ed
[assets] update wechat (#8517) 2025-07-01 21:23:48 +08:00
Injae Ryou
ac6c93df1f
[parser] update config loading to use OmegaConf #7793 (#8505) 2025-07-01 21:05:13 +08:00
Kingsley
0b188ca00c
[model] add GLM-4.1V (#8462) 2025-06-30 01:09:41 +08:00
Liu Jiajun
0a004904bd
[data] fix gemma2 eos token (#8480)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
2025-06-27 18:19:15 +08:00
Yaowei Zheng
bb7bf51554
Merge commit from fork 2025-06-26 13:55:42 +08:00
Yaowei Zheng
7242caf0ff
[assets] update readme (#8461) 2025-06-25 22:15:03 +08:00
Yaowei Zheng
ed57b7ba2a
[webui] upgrade webui and fix api (#8460) 2025-06-25 21:59:58 +08:00
Yaowei Zheng
b10333dafb
[model] do not force load processor (#8457) 2025-06-25 19:43:00 +08:00
Yaowei Zheng
6b46c8b689
[assets] update wechat (#8458) 2025-06-25 19:42:28 +08:00
Yaowei Zheng
be27eae175
[data] fix audio reader (#8448) 2025-06-24 20:53:20 +08:00
Yaowei Zheng
31b0787e12
[misc] fix ci (#8441) 2025-06-24 16:37:32 +08:00
Kingsley
fffa43be86
[model] Add mistral-small 3.2 & kimi-dev (#8433) 2025-06-24 14:59:47 +08:00
Yaowei Zheng
8ed085e403
[model] add kimi vl 2506 (#8432) 2025-06-23 17:56:48 +08:00
Vivek Iyer
1221533542
[model] unsloth resume from checkpoint bug (#8423)
Co-authored-by: viyer <vivek_iyer2@apple.com>
2025-06-23 16:43:54 +08:00
codingma
8a3bddc7fa
[assets] update wechat 2025-06-23 14:42:52 +08:00
Yaowei Zheng
3a119ed5a2
[assets] update wechat (#8414) 2025-06-20 03:38:43 +08:00
Dhia Eddine Rhaiem
0d7d0ea972
[model] add support for Falcon H1 (#8403) 2025-06-18 16:51:23 +08:00
Yaowei Zheng
0e1fea71d2
[assets] update readme (#8396) 2025-06-17 16:15:20 +08:00
Yaowei Zheng
ec04d7b89c
[misc] set dev version (#8389) 2025-06-17 01:39:25 +08:00
Yaowei Zheng
cabc9207be
[ci] add docker version (#8390) 2025-06-17 01:37:47 +08:00
Yaowei Zheng
f3d144f001
[model] fix vlm utils (#8388) 2025-06-17 01:08:49 +08:00
Yaowei Zheng
af2f75e688
[data] fix qwen2vl pos ids (#8387) 2025-06-17 00:48:54 +08:00
Yaowei Zheng
9f2f12b0fe
[version] release v0.9.3 (#8386) 2025-06-16 19:21:32 +08:00
Yaowei Zheng
bb84c3c83e
[assets] update wechat (#8385) 2025-06-16 18:23:22 +08:00
Aman Gupta
1cfe42916d
[trainer] Add LD-DPO objective (#8362) 2025-06-12 16:10:38 +08:00
Yaowei Zheng
5ed62a29c5
[misc] tiny fixes (#8348) 2025-06-10 15:30:58 +08:00
阿丹(adan)
d39d3106cb
[model] support MiniCPM4 (#8314) 2025-06-10 14:38:39 +08:00
Kingsley
8ffe7daa8d
[model] support Mistral3.1 small 2503 (#8335) 2025-06-09 10:37:42 +08:00
Chenhao Zhang
8fa55db1ec
[assets] Add awesome works used LLaMA-Factory (#8333) 2025-06-09 10:21:17 +08:00
Yaowei Zheng
d8a5050cfb
[assets] update wechat (#8328) 2025-06-07 09:00:07 +08:00
Yaowei Zheng
7ecc2d46ca
[model] fix model generate (#8327) 2025-06-07 08:47:50 +08:00
Vivek Iyer
d325a1a7c7
[model] pushing FFT with unsloth (#8325)
Co-authored-by: viyer <vivek_iyer2@apple.com>
2025-06-07 08:20:58 +08:00
Yaowei Zheng
239ced076c
[data] fix empty template (#8312) 2025-06-06 13:50:50 +08:00
Yaowei Zheng
f5f356649b
[setup] fix uv (#8311) 2025-06-06 11:54:15 +08:00
Yaowei Zheng
13fd43617c
[assets] update readme (#8303) 2025-06-05 23:23:15 +08:00
Kingsley
fcd8662306
[tests] add visual model save test (#8248)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
2025-06-05 20:38:01 +08:00
Yaowei Zheng
cecba57b3e
[assets] fix npu docker (#8298) 2025-06-05 19:09:20 +08:00
Butui Hu
83688b0b4d
[launcher] Add elastic and fault-tolerant training support (#8286)
Signed-off-by: Butui Hu <hot123tea123@gmail.com>
2025-06-05 16:40:03 +08:00
Kingsley
5308424705
[script] add Script description for qwen_omni_merge (#8293) 2025-06-05 13:22:01 +08:00
Yaowei Zheng
81c4d9bee6
[assets] update docker files (#8291) 2025-06-04 23:30:46 +08:00
Yaowei Zheng
ee676d29f6
[assets] update readme (#8288) 2025-06-04 17:46:12 +08:00
Yaowei Zheng
e3d5e0fa28
[assets] add icon (#8276) 2025-06-03 20:36:21 +08:00
Kingsley
3425bc6e71
[data] support nested images input for videos (#8264) 2025-06-03 20:26:29 +08:00
Ze-Yi LIN
6cc247e815
[tracking] swanlab add llamafactory tag (#8258) 2025-06-03 18:42:29 +08:00
Yaowei Zheng
16a3f8a71b
[assets] update wechat (#8270) 2025-06-03 17:33:57 +08:00
Kingsley
65aa86ed39
[model] add MIMO_VL (#8249) 2025-06-01 03:54:54 +08:00
Yaowei Zheng
fba9c9d9b9
[deps] upgrade transformers to 4.52.4 (#8245) 2025-05-31 16:51:40 +08:00
Akshat Sehgal
21829b5eaf
[model] add smollm2 support (#8220) 2025-05-31 16:29:01 +08:00
hoshi-hiyouga
762c2d776f
[assets] update readme (#8235) 2025-05-30 16:52:12 +08:00
Kingsley
e31afdfd4f
[scripts] specify model class for qwen_omni merge (#8227) 2025-05-30 14:20:12 +08:00
hoshi-hiyouga
be02003d16
[model] add deepseek 0528 models (#8215) 2025-05-29 21:37:07 +08:00
hoshi-hiyouga
a4048b7bb6
[assets] fix docker images (#8203) 2025-05-28 22:26:05 +08:00
yzoaim
73b12baaaf
[workflow] auto push docker images (#8181)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-05-28 20:21:15 +08:00
hoshi-hiyouga
55d37dc472
[assets] update Dockerfile (#8201) 2025-05-28 20:20:59 +08:00
hoshi-hiyouga
54ffd06026
[webui] fix skip args (#8195) 2025-05-28 18:11:07 +08:00
Muqi Li
00c4988f89
[assets] fix incorrect user_tag in dataset_info.json to prevent skipped entries (#8197) 2025-05-28 18:01:37 +08:00
Youngwoo Kim
57c6e23247
[data] Reading files from cloud is broken (#8182) (#8183) 2025-05-28 15:50:44 +08:00
hoshi-hiyouga
07f792148e
[assets] fix docker image (#8180) 2025-05-27 19:01:31 +08:00
hoshi-hiyouga
e542f95710
[data] fix shared file system (#8179) 2025-05-27 18:36:03 +08:00
hoshi-hiyouga
4ecf4daeb2
[webui] add extra args to export (#8178) 2025-05-27 18:25:31 +08:00
hoshi-hiyouga
519ac92803
[assets] update docker files (#8176) 2025-05-27 18:15:23 +08:00
hoshi-hiyouga
16e1a5097e
[webui] add infer extra args (#8167) 2025-05-27 12:04:00 +08:00
hoshi-hiyouga
09436c1f45
[webui] fix input args (#8162) 2025-05-27 02:05:54 +08:00
hoshi-hiyouga
f3a1dc8483
[model] add smollm2 and medgemma (#8161) 2025-05-26 23:19:58 +08:00
hoshi-hiyouga
dc8cca11b3
[deps] upgrade transformers (#8159) 2025-05-26 22:03:58 +08:00
Akshat Sehgal
e6f45d696b
feat: add smollm support (#8050) 2025-05-26 19:47:54 +08:00
wangzhan
c477ae6405
[api] support repetition_penalty and align presence_penalty with OpenAI Client (#7958) 2025-05-26 18:45:11 +08:00
hoshi-hiyouga
52dead8775
[assets] update wechat (#8156) 2025-05-26 18:28:02 +08:00
Kingsley
a9211a730e
[data] fix internvl plugin when using PIL images (#8129) 2025-05-22 01:32:59 +08:00
hoshi-hiyouga
763fbc294b
[misc] update data readme (#8128) 2025-05-21 22:41:18 +08:00
hoshi-hiyouga
b0c8ba73e0
[deps] update to transformers 4.52 (#8125) 2025-05-21 05:16:18 +08:00
hoshi-hiyouga
b3b2c9f1ee
[data] llama3 multi tool support (#8124) 2025-05-21 02:01:12 +08:00
hoshi-hiyouga
f96c085857
[assets] update readme (#8110) 2025-05-20 02:44:18 +08:00
hoshi-hiyouga
b83a38eb98
[data] qwen3 fixes (#8109) 2025-05-20 02:00:30 +08:00
hoshi-hiyouga
f3fd67a9bb
[model] switch to gptqmodel (#8108) 2025-05-19 22:25:40 +08:00
piamo
a6f3adf930
[model] update rope kwargs for yarn (#8101) 2025-05-19 20:07:54 +08:00
hoshi-hiyouga
ed2f89efaf
[doc] add no build isolation (#8103) 2025-05-19 19:25:13 +08:00
Ma, Xiaochen
16e26236eb
[trainer] fix KeyError at end of pretrain (#8099) 2025-05-19 18:01:26 +08:00
Biao Wang
89a0d10c18
[misc] fix cli (#8095)
Co-authored-by: wangbiao11 <wangbiao11@baidu.com>
2025-05-19 17:59:39 +08:00
Saiya
820ed764c4
[infer] support lora adapter for SGLang backend (#8067) 2025-05-16 23:33:47 +08:00
Kingsley
66f719dd96
[data] add forward compatibility for video_utils in Transformers 4.52.0 (#8077) 2025-05-16 17:41:04 +08:00
Eric Tang
130bfaf8e3
[data] support loading folder from remote (#8078) 2025-05-16 15:35:38 +08:00
Shawn Tao
e8a18c17e9
[infer] Modify vllm_infer.py to batch preprocess to avoid too much files opened error (#8051)
Co-authored-by: Kingsley <82590017+Kuangdd01@users.noreply.github.com>
2025-05-15 10:54:35 +08:00
hoshi-hiyouga
2b23c0a7a1
[assets] update wechat (#8057) 2025-05-14 18:01:48 +08:00
hoshi-hiyouga
ab2c05115b
[assets] update windows installation (#8042) 2025-05-13 17:01:56 +08:00
hoshi-hiyouga
8d472c20cb
[model] add seed coder and qwen3 quant models (#8039) 2025-05-13 15:59:55 +08:00
hoshi-hiyouga
845af89ea4
[data] fix kimi vl template (#8015) 2025-05-11 20:45:19 +08:00
Kingsley
cef3a0b2e2
[scripts] add video params for vllm infer (#7992) 2025-05-09 21:16:52 +08:00
yunhao-tech
865ac07491
[data] Avoid repetitive tool description warp (#8000)
Co-authored-by: chenyunhao <chenyunhao@wps.cn>
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-05-09 21:16:37 +08:00
tpoisonooo
f584db50cf
[docs] add GraphGen (#7974) 2025-05-07 12:23:11 +02:00
hoshi-hiyouga
97e0a4cb5c
[misc] update liger kernel patch (#7966) 2025-05-06 20:32:16 +02:00
hoshi-hiyouga
c6bcca4c83
[example] update examples (#7964) 2025-05-06 17:24:25 +02:00
Kingsley
5ee9eb64d8
[model] add mimo7b (#7946) 2025-05-06 17:10:30 +02:00
hoshi-hiyouga
937447bd8a
[misc] fix qwen2 omni (#7962) 2025-05-06 15:39:13 +02:00
hoshi-hiyouga
52f25651a2
[model] add qwen2 omni 3b (#7945) 2025-05-03 16:36:51 +08:00
Eric Chen
75d7c35fdf
[assets] Warp Support README Update (#7887) 2025-05-02 00:08:48 +08:00
hoshi-hiyouga
6a584b4092
[hparam] add enable think argument (#7928) 2025-04-30 17:21:30 +08:00
hoshi-hiyouga
41ec928683
[data] fix base plugin (#7924) 2025-04-30 16:28:05 +08:00
hoshi-hiyouga
d8295cd601
[data] optimize qwen3 loss computation (#7923) 2025-04-30 16:18:00 +08:00
hoshi-hiyouga
a8430f4244
[misc] fix uv (#7913) 2025-04-30 07:45:03 +08:00
hoshi-hiyouga
072bfe29d3
[data] add eval_on_each_dataset arg (#7912) 2025-04-30 06:56:43 +08:00
hoshi-hiyouga
c5b1d07e7c
[data] replace eos token for base models (#7911) 2025-04-30 06:52:28 +08:00
hoshi-hiyouga
77c569e071
[data] improve mm plugin (#7910) 2025-04-30 06:34:28 +08:00
hoshi-hiyouga
ae392e054c
[model] add qwen3 (#7885) 2025-04-29 09:34:05 +08:00
Kingsley
369474451d
[data] fix qwen2.5 omni template (#7883) 2025-04-29 00:58:23 +08:00
hoshi-hiyouga
1f338deb87
[model] fix dsv3 leaf node (#7879) 2025-04-28 18:11:09 +08:00
hoshi-hiyouga
00b5c05946
[data] fix qwen2 omni plugin (#7875) 2025-04-28 14:22:41 +08:00
zhaop-l
1bd319d16c
[trainer] make projector trainable in freeze training (#7872)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-28 13:19:37 +08:00
hoshi-hiyouga
fcca3b0b0d
[data] fix minicpmo vllm infer (#7870) 2025-04-28 01:59:53 +08:00
Kingsley
035e98035c
fix attn patch for kimivl (#7867) 2025-04-27 23:12:28 +08:00
Eric Tang
b4407e4b0b
[ray] add storage filesystem to ray config (#7854) 2025-04-27 22:12:40 +08:00
hoshi-hiyouga
036a76e9cb
[assets] update wechat (#7840) 2025-04-24 16:31:05 +08:00
hoshi-hiyouga
4fbdc65fcb
[model] fix vit gradient checkpointing (#7830) 2025-04-23 22:48:48 +08:00
hoshi-hiyouga
2989d39239
Merge commit from fork 2025-04-23 16:38:27 +08:00
hoshi-hiyouga
1344416378
[model] fix moe zero3 (#7826) 2025-04-23 15:30:49 +08:00
Kingsley
1dd67eb042
[data] fix internvl plugin (#7817) 2025-04-23 00:58:22 +08:00
hoshi-hiyouga
2b7d564e3b
[assets] update model readme (#7804) 2025-04-22 16:43:56 +08:00
Kingsley
d43013f14a
[model] add arch check for InternVL (#7803) 2025-04-22 16:38:05 +08:00
Kingsley
c91165a5a6
[misc] update internvl constants (#7801) 2025-04-22 15:53:08 +08:00
hoshi-hiyouga
7f3c31f6f4
[trainer] support early stop (#7797) 2025-04-22 01:59:33 +08:00
hoshi-hiyouga
92101f34a1
[data] improve mmplugin (#7795) 2025-04-22 01:25:33 +08:00
hoshi-hiyouga
a62cba3d05
[example] add bash usage (#7794) 2025-04-22 00:25:51 +08:00
Juanxi Tian
d128382d3c
[trainer] Add Muon Optimizer (#7749)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-21 23:38:37 +08:00
hoshi-hiyouga
278df4308d
[parser] support omegaconf (#7793) 2025-04-21 23:30:30 +08:00
Changrui Chen
81768df04c
[data] Fix wrong position ids with packed attention masks (#7754)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-21 23:19:36 +08:00
flashJd
1302ca39f6
[misc] fix new tokens adding (#7253)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-21 23:19:02 +08:00
ddddng
b8cddbc7d7
[model] fix gemma3 export (#7786)
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-21 23:07:11 +08:00
Sachin Beldona
ec7257e70f
[misc] fix bug in constant (#7765)
Co-authored-by: Sachin Beldona <sbeldona@cs.cmu.edu>
2025-04-21 23:06:31 +08:00
hoshi-hiyouga
a4455e3021
[assets] update wechat (#7792) 2025-04-21 21:29:42 +08:00
hoshi-hiyouga
610f164c69
[trainer] fix pt loss (#7748)
* fix pt loss

* robust

* fix

* test
2025-04-17 03:15:35 +08:00
hoshi-hiyouga
0a0cfeb782
[breaking] bump transformers to 4.45.0 & improve ci (#7746)
* update ci

* fix

* fix

* fix

* fix

* fix
2025-04-17 02:36:48 +08:00
hoshi-hiyouga
4831552856
[infer] set env for vllm ascend (#7745) 2025-04-17 01:08:55 +08:00
Kingsley
125513fa5c
[model] support intern-VL 2.5-3 series (#7258)
* add internvl and rebase

* fix for internvl2&3

* remove lines

* fix video_inputs & lint

* nit

* add constants

* remove lines

* fix

* fix error

* pass ci

* pass ci

* skip internvl & nit
2025-04-17 00:31:30 +08:00
ENg-122
8543400584
[misc] improve entrypoint (#7345)
* 纯粹优化下入口代码,因为看到if else太多了

* Update cli.py

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-16 21:48:23 +08:00
leo-pony
e1fdd6e2f8
[infer] support vllm-ascend (#7739) 2025-04-16 20:06:47 +08:00
codingma
d07983dceb
[assets] wechat (#7740) 2025-04-16 18:02:01 +08:00
hoshi-hiyouga
9b94211045
[api] fix chat messages (#7732) 2025-04-15 16:39:08 +08:00
hoshi-hiyouga
0fe5631f9b
[deps] upgrade vllm (#7728) 2025-04-15 14:57:40 +08:00
Joe Schoonover
b5d667cebf
[docker] patch docker-rocm (#7725)
* Update Dockerfile

* Fix typo

* Fix syntax for /bin/sh conditional

* Add build args to docker-compose

* Change shell to /bin/bash

This is required for "==" syntax in conditional string comparison
2025-04-15 13:36:39 +08:00
hoshi-hiyouga
ac8c6fdd3a
[assets] update model readme (#7724) 2025-04-15 00:41:09 +08:00
Kingsley
df8752e8ee
[model] Support Kimi_VL thinking/instruct (#7719)
* add kimi_vl

* patch config

* check version

* Update mm_plugin.py

* Update mm_plugin.py

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-15 00:21:58 +08:00
hoshi-hiyouga
3a13d2cdb1
[misc] fix env vars (#7715) 2025-04-14 16:04:04 +08:00
hoshi-hiyouga
3ef36d0057
[misc] upgrade cli (#7714) 2025-04-14 15:41:22 +08:00
hoshi-hiyouga
1fd4d14fbb
[deps] upgrade transformers (#7704) 2025-04-13 18:11:34 +08:00
Yuxuan Zhang
481ecbf9c5
[model] add GLM-4-0414 (#7695)
* Update README_zh.md

* update
2025-04-13 17:10:45 +08:00
hoshi-hiyouga
60a84f664b
[deps] fix uv conflicts (#7686)
* fix #7678

* Update setup.py

* Update tests.yml

* Update publish.yml

* Update Makefile
2025-04-11 18:02:24 +08:00
hoshi-hiyouga
11bcafd06a
[assets] update wechat (#7674) 2025-04-10 20:10:46 +08:00
Eric Tang
6c53471de2
[data] support for specifying a dataset in cloud storage (#7567)
* add support for loading datasets from s3/gcs

* add comments to readme

* run linter and address comments

* add option to pass in kwargs to ray init (i.e. runtime env)

* address comment

* revert mixed up changes
2025-04-10 11:31:35 +08:00
Eric Tang
39c1e29ed7
[ray] allow for specifying ray.init kwargs (i.e. runtime_env) (#7647)
* ray init kwargs

* Update trainer_utils.py

* fix ray args

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-10 11:31:05 +08:00
Dain Kim
ee840b4e01
[bugfix] enable_gemma_liger_kernel (#7660)
- The `enable_liger_kernel` function for the Gemma model series was not executed due to the existing `if` statement in the code.
- Changed the line to an `elif` statement so that the `apply_liger_kernel` function is executed properly.

resolved: #7628
2025-04-10 11:27:30 +08:00
jilongW
3bdc7e1e6c
[misc] fix cuda warn on intel GPU (#7655) 2025-04-09 21:37:54 +08:00
hoshi-hiyouga
34fdabe005
[data] add coig-p dataset (#7657) 2025-04-09 21:18:25 +08:00
hoshi-hiyouga
24cb890432
[assets] update readme (#7654) 2025-04-09 18:27:38 +08:00
hoshi-hiyouga
39876b85fc
[assets] update readme (#7644) 2025-04-09 01:06:06 +08:00
Kingsley
7d8bee96fc
[data] Fix bugs of use_audio_in_video in Qwen2.5 Omni (#7638)
* cache _mm_inputs

* nit

* support for use_audio_in_video

* remove cache

* fix data

* Update mllm_video_audio_demo.json
2025-04-08 18:40:10 +08:00
Shawn Tao
8f5f4cc559
[trainer] fix key error (#7635) 2025-04-08 18:39:50 +08:00
Adarsh Shirawalmath
8ee26642f3
[sglang] support transformers 4.51.0 (#7639) 2025-04-08 18:39:23 +08:00
hoshi-hiyouga
5817cda37e
[misc] fix packing and eval plot (#7623) 2025-04-07 18:20:57 +08:00
hoshi-hiyouga
7e0cdb1a76
[assets] update readme (#7612) 2025-04-06 13:58:49 +08:00
hoshi-hiyouga
6c200fd218
[model] add llama4 (#7611) 2025-04-06 13:42:31 +08:00
hoshi-hiyouga
61b24c3827
[assets] update wechat (#7594) 2025-04-03 17:45:26 +08:00
Kingsley
32cb086be1
[data] fix qwen2.5 omni plugin (#7578)
* specific entry

* Update mm_plugin.py

* fix fps cal

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-04-02 23:58:39 +08:00
Kingsley
80f8d037d0
[data] fix qwen2.5 omni plugin (#7573)
* align key with qwen2vl

* nit && change scripts
2025-04-02 21:28:52 +08:00
gechengze
11997593be
[trainer] fix batch processing in PPO trainer (#7576) 2025-04-02 21:17:48 +08:00
hoshi-hiyouga
903db09822
[infer] vllm video/audio inference (#7566) 2025-04-02 02:27:04 +08:00
hoshi-hiyouga
aaf2e6ba2a
[model] fix kv cache (#7564) 2025-04-01 23:07:46 +08:00
Yu Shi Jie
9deece1d50
[model] fix use_cache patching for gemma3 multimodal (#7500) 2025-04-01 16:06:48 +08:00
Ritesh Goru
f06a74ad4e
[data] specify position_ids in PackedSupervisedDatasetProcessor for neat_packing (#7318)
* use position_ids for neat_packing with fa2

* revert fa2 changes
2025-04-01 16:03:13 +08:00
taoharry
6faa6fb53d
[webui] fix launch with proxy (#7332) 2025-04-01 15:52:56 +08:00
Billy Cao
5d1cc863a4
[data] shard the dataset to allow multiprocessing when streaming is enabled (#7530)
* Shard the dataset when streaming to allow multiprocessing

* Allow user to not set dataset_shards to ensure backward compatibility
2025-04-01 15:36:23 +08:00
Hao
6d6e0f44fc
[trainer] new kto mismatch pair creation strategy (#7509) 2025-04-01 15:21:53 +08:00
hoshi-hiyouga
2d421c57bf
[data] fix qwen2.5 omni collator (#7553) 2025-04-01 00:15:12 +08:00
Kingsley
185c76f6ad
[model] add Qwen2.5-Omni model (#7537)
* preserve image_sizes

* preserve image_sizes

* init plugin

* support audio-text2text lora

* nit

* support image/video-text2text, audio-text2text

* remove args

* remove lines

* add docs && nit

* remove some comments

* fix && add merge part script

* add license
2025-03-31 20:39:35 +08:00
hoshi-hiyouga
468eea6f6d
[deps] pin pydantic to 2.10.6 (#7546) 2025-03-31 14:42:28 +08:00
hoshi-hiyouga
49436e93e6
[assets] update wechat (#7523) 2025-03-28 17:44:36 +08:00
Kingsley
b00cb2ed42
[data] fix pixtral plugin (#7505)
* preserve `image_sizes`

* add comments
2025-03-27 17:06:40 +08:00
Xu-pixel
f547334604
[3rdparty] support swanlab lark notification (#7481) 2025-03-27 01:52:01 +08:00
Kdump
01166841cf
[trainer] fix wsd scheduler (#7304)
* [trainer] Warmup_stable_decay supports setting the number of stable and decay steps according to the warmup_ratio ratio

* Update trainer_utils.py

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-03-26 15:25:02 +08:00
hoshi-hiyouga
59e12bffe8
[model] add qwen2vl 32b & upgrade peft (#7469)
* add qwen2vl 32b

* fix ci

* upgrade peft to 0.15

* fix ci

* fix ci
2025-03-25 12:15:58 +08:00
GuoCoder
b6d8749bf3
[model] fix lora on quant models (#7456)
Co-authored-by: root <root@ai>
2025-03-25 11:59:46 +08:00
Xiaosu Zhu
bc9ada9db7
[misc] update liger-kernel's monkey patch (#7453)
* Update liger_kernel.py

* Update setup.py
2025-03-25 11:58:52 +08:00
AbdelKarim ELJANDOUBI
b6dc7e01e2
[misc] enable liger kernel for gemma3 text and paligemma (#7466)
* add gemma3 text

* add paligemma (1,2 and 2 mix)
2025-03-25 09:27:43 +08:00
Kenny Lam
59a56f7226
[misc] enable liger kernel for gemma3 (#7462) 2025-03-24 19:09:59 +08:00
hoshi-hiyouga
9abee9cd1a
[assets] update wechat (#7455) 2025-03-24 14:53:10 +08:00
hoshi-hiyouga
833edc7c73
[assets] fix gemma3 readme (#7449) 2025-03-24 10:31:25 +08:00
hoshi-hiyouga
42e090d38b
[trainer] fix vlm loss for transformers 4.49 (#7448) 2025-03-24 10:24:05 +08:00
rumichi
747e02d60d
[docker] upgrade to torch 2.6 (#7442) 2025-03-23 21:18:08 +08:00
hoshi-hiyouga
c841e92116
[misc] fix ci (#7441)
* fix ci

* improve ci
2025-03-23 21:09:35 +08:00
hoshi-hiyouga
fbf49e2500
[misc] fix license (#7440) 2025-03-23 19:31:56 +08:00
SnowFox4004
7d4dc25c23
[scripts] support compute score on vllm's predictions (#7419)
* enable manual bleu&rouge eval by adding `scripts/eval_bleu_rouge.py`

* added libraries check

* update: 使用datasets库的多进程加速处理

* update:
- 使用 fire.Fire
- 修改代码格式

* Update eval_bleu_rouge.py: correctly uses fire

Deleted the code of using sys.argv

* Update eval_bleu_rouge.py

---------

Co-authored-by: SnowFox4004 <manba@out>
Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-03-23 19:21:01 +08:00
hoshi-hiyouga
b1b78daf06
[deps] upgrade transformers to 4.50.0 (#7437)
* upgrade transformers

* fix hf cache

* fix dpo trainer
2025-03-23 17:44:27 +08:00
hoshi-hiyouga
dfbe1391e9
[deps] upgrade vllm to 0.8 (#7436) 2025-03-23 14:32:22 +08:00
Guo, Quan
ebc989ad4a
[misc] fix sglang deps (#7432)
* feat: Add transformer version requirement for sglang

* feat: add srt to sglang which is required for running sglang

Other options are srt_hip, srt_xpu, srt_npu, srt_hpu, srt_cpu, for different computation architectures.
2025-03-23 14:07:10 +08:00
Eric Tang
d8a5571be7
[3rdparty] fix redundant process group destroy for ray (#7395)
* fix redundant process group destroy for ray

* Update tuner.py

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
2025-03-21 10:56:47 +08:00
hoshi-hiyouga
555b71a1cb
[version] fix minicpmo (#7378) 2025-03-20 16:59:31 +08:00
hoshi-hiyouga
4a5d0f0ba7
[assets] update wechat (#7361) 2025-03-18 21:31:09 +08:00
hoshi-hiyouga
c518146e62
[misc] set dev version (#7351) 2025-03-18 00:10:53 +08:00
hoshi-hiyouga
1d2131e5cb
[data] fix template (#7349) 2025-03-17 23:45:20 +08:00
hoshi-hiyouga
48a6584fb1
[assets] update videos (#7340)
* Update README.md

* Update README_zh.md
2025-03-17 15:48:02 +08:00
Hertz
a71e685021
[model] support hunyuan 7b (#7317)
* [Model]supported tencent-hunyuan model

* [Model]supported tencent-hunyuan model(fix)

* [Model]supported tencent-hunyuan model(fix)
2025-03-15 20:55:24 +08:00
Qiaolin Yu
30038d9ce7
[inference] support sglang backend (#7278)
* Mimic SGLang offline Engine

* Add more tests and args

* Pass all current tests

* Clean Code

* fix sample_params

* clean code

* Fix Stream Chat

* change sglang from engine mode to server mode

* fix

* Fix Review Issues

* Use SGLang Built-In Utilities

* Fix test SGLang

* Some Doc Issue

* fix sglang engine

* add readme

---------

Co-authored-by: Jin Pan <jpan236@wisc.edu>
Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
2025-03-15 04:37:58 +08:00
hoshi-hiyouga
ef5f1c1def
[data] gemma3 plugin pan and scan (#7294)
* gemma3 pan and scan

* add test case

* fix test
2025-03-13 23:29:23 +08:00
Victor Nogueira
3dff4ecca8
[dataset] fix ultrachat_200k dataset (#7259)
The `HuggingFaceH4/ultrachat_200k` dataset doesn't contain the default "train" split. The correct split is "train_sft".
2025-03-13 20:20:18 +08:00
hoshi-hiyouga
0dbce72fb8
[assets] update wechat (#7288) 2025-03-13 18:48:59 +08:00
hoshi-hiyouga
e9b427d535
[assets] update video (#7287) 2025-03-13 18:45:47 +08:00
Ritesh Goru
d7d79f7e06
[data] efficient 4d_attention_mask creation in neat_packing (#7272) 2025-03-13 03:31:12 +08:00
hoshi-hiyouga
9ccfb97a2c
[misc] update format (#7277) 2025-03-13 02:53:08 +08:00
hoshi-hiyouga
165d3ed084
[model] support gemma3 (#7273) 2025-03-13 01:35:23 +08:00
hoshi-hiyouga
142fd7e755
[misc] upgrade deps (#7257) 2025-03-12 00:33:47 +08:00
hoshi-hiyouga
7c1640ed5f
[misc] upgrade format to py39 (#7256) 2025-03-12 00:08:41 +08:00
hoshi-hiyouga
cdafa8a15e
[ci] update workflow (#7255) 2025-03-11 22:57:49 +08:00
hoshi-hiyouga
b256ca86f0
[core] release v0.9.2 (#7254) 2025-03-11 22:42:23 +08:00
hoshi-hiyouga
7a7071e504 Merge pull request #7242 from hiyouga/hiyouga/release
[release] release v0.9.2

Former-commit-id: 6b25268990bf225d84e29d4067595cf720fa12d8
2025-03-11 15:28:45 +08:00
hoshi-hiyouga
847ae972d0 Merge pull request #7247 from hiyouga/hiyouga/commit
[misc] support print commit info

Former-commit-id: 0f7ec4f8529a5d7ea2153b881335821038307bb7
2025-03-11 15:28:04 +08:00
hoshi-hiyouga
1c634d9c53 Merge pull request #7244 from hiyouga/hiyouga/token
[data] avoid exit after saving preprocessed data

Former-commit-id: dcbf01b0035062fa14187e5bdbb925080d349501
2025-03-11 15:17:15 +08:00
hiyouga
99b71768a0 support commit info
Former-commit-id: af752b1c271739e6614773e6898566240d0c7043
2025-03-11 15:13:59 +08:00
hiyouga
37b844d929 remove exit in preprocess
Former-commit-id: 1a800f9993d28d80d4587a08c20f5a69722436b5
2025-03-11 15:08:25 +08:00
hiyouga
f5810a6e47 release v0.9.2
Former-commit-id: aaad96359398c50bfe4a864859039a99b9f3a3a7
2025-03-11 14:49:13 +08:00
hoshi-hiyouga
317d0855d2 [infer] fix vllm args (#7235)
Former-commit-id: ef7af457fc44b1e8cad0c78717848617f98364f0
2025-03-11 01:15:35 +08:00
Ze-Yi LIN
0a43bc1960 [tracking] add swanlab_logdir param (#7219)
* feat: add swanlab_logdir param

* fix

Former-commit-id: a1e76af3d9cf64a6c016bb2333fc815fd4be73cf
2025-03-11 00:53:07 +08:00
hoshi-hiyouga
5a29f49fb1 [config] update args (#7231)
Former-commit-id: ed8b12e3cbdaa85f5bde619081b86717a1f3c5fa
2025-03-10 23:04:43 +08:00
hoshi-hiyouga
4e68828e46 [config] fix export max len (#7230)
Former-commit-id: 728c2f68190129e88ac375b453c60ed0d6bebbd8
2025-03-10 16:46:08 +08:00
hoshi-hiyouga
9a0044ef5e [assets] update wechat (#7229)
Former-commit-id: ae4cbe8fbc9b7e3ea122440be49c8cba52e03248
2025-03-10 15:39:06 +08:00
hoshi-hiyouga
d412301d08 [data] update mm demo data (#7211)
Former-commit-id: 1774882f5a73760e104e08dfa76fe592b1d876a1
2025-03-07 20:07:15 +08:00
hoshi-hiyouga
5a0fd22c05 [assets] update readme (#7209)
Former-commit-id: cdf8fc647819523eca8139ba62a510c3078b694d
2025-03-07 17:27:49 +08:00
hoshi-hiyouga
df63f05b47 [data] fix loader (#7207)
* fix dataloader

* add test case

* fix type

* fix ci

* fix ci

* fix ci

* disable overwrite cache in ci

Former-commit-id: 8c3f9f6747110107cbbb3695637482e45084dbc1
2025-03-07 17:20:46 +08:00
hoshi-hiyouga
98ea0e8109 [misc] fix ds config (#7205)
Former-commit-id: db113f690eb818894e3bc2bfc69cdfd27045d808
2025-03-07 15:21:28 +08:00
ZhangChuanhui
33b4c33279 [data] fix function formatter (#7201)
Co-authored-by: zhangchuanhui <zhangchal@digitalchina.com>
Former-commit-id: 194e3bddb25fa0bcc6d8349ce682b537a07a9a6a
2025-03-07 15:17:23 +08:00
hoshi-hiyouga
113cc3d920 [misc] fix cli (#7204)
Former-commit-id: bd1722355944a3618f44a4ac3e8177c34b97dc75
2025-03-07 15:01:18 +08:00
hoshi-hiyouga
b6c0e8608e [script] fix vllm version (#7193)
Former-commit-id: 313355759dc906d3612364dc6c8f6344afdedb97
2025-03-06 17:14:17 +08:00
hoshi-hiyouga
eba31ae313 [webui] support escape html (#7190)
Former-commit-id: abb23f767351098a926202ea4edc94d9e9a4681c
2025-03-06 16:52:21 +08:00
hoshi-hiyouga
e7556b591e [deps] upgrade vllm (#7183)
Former-commit-id: d739fddb10f51f422c12b1e7d5d7208309bf6c91
2025-03-06 15:25:08 +08:00
hoshi-hiyouga
2b21c749c1 [data] fix mm template (#7181)
Former-commit-id: be66df1f0211cd2d90eac3ab407dced653c9e443
2025-03-06 15:18:32 +08:00
hoshi-hiyouga
002f58ef8e [model] add QwQ 32b (#7179)
Former-commit-id: 64a6fb9b5056166265abc5acbddffb64cd8b5256
2025-03-06 11:58:36 +08:00
Ze-Yi LIN
c67d2b9327 [trainer] fix swanlab callback (#7176)
Former-commit-id: 8ad03258e16309158368384e2a0a707845536133
2025-03-06 00:33:37 +08:00
hoshi-hiyouga
6e58115f98 [trainer] update config (#7174)
Former-commit-id: b4b89b4ff3bc03aa388569e253d62580755a77a5
2025-03-05 23:32:54 +08:00
sirui.li
8dddffa340 [data] fix qwen2audio plugin (#7166)
* Update pairwise.py

[data]Repair multimodal model dpo training

* Update pairwise.py

[data]repair multimodal model dpo training using deepcopy

* Update pairwise.py

* Update mm_plugin.py

Former-commit-id: dff4130969bac9cb1abe66fd5dfada8c757c716f
2025-03-05 18:03:36 +08:00
hoshi-hiyouga
e1d574a784 [assets] update wechat (#7161)
Former-commit-id: 0c403ea15ba9e9878de3ea117c353b5a75192637
2025-03-05 14:11:10 +08:00
hoshi-hiyouga
caef0a8937 [data] use bicubic resampler (#7143)
Former-commit-id: bc298c60b7d3fdc4d116a79b535d7e9b11f4aa65
2025-03-04 00:17:06 +08:00
hoshi-hiyouga
392533e139 [webui] fix webui (#7142)
Former-commit-id: 17ba2d5082bcd6b4cdd5e50286776d256cc934a4
2025-03-04 00:01:49 +08:00
rabbit
299cd03785 [data] bailing template (#7117)
* add bailing template

* add bailing template

* add bailing template

---------

Co-authored-by: chengshiwen.csw@antgroup.com <chengshiwen.csw@antgroup.com>
Former-commit-id: 049ddf48afaa9f12d3e46d7ec63858607329e853
2025-03-03 15:33:22 +08:00
hoshi-hiyouga
ee1b580328 [inference] fix hf_engine (#7120)
Former-commit-id: 1036311826a61fed2346a261c8a060c355778318
2025-03-01 05:22:49 +08:00
hoshi-hiyouga
54a090079c [assets] update wechat (#7106)
Former-commit-id: d1863bbbaa7748e74eab34fc5a56de1102933530
2025-02-28 12:01:04 +08:00
Ze-Yi LIN
210cdb9557 [webui] display swanlab exp link (#7089)
* webui add swanlab link

* change callback name

* update

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 891c4875039e8e3b7d0de025ee61c4ff003ff0c4
2025-02-27 19:40:54 +08:00
leo-pony
e86cb8a4fa [npu] update cann base image and torch 2.4 (#7061)
* Update base npu container image version:The Python version required for Hugging Face Transformers is >= python3.10

* Fix the bug: arg type of INSTALL_DEEPSPEED shoud been string now.

* Update Ascend CANN, CANN-Kernel and corresponding torch and torch-npu version

* Upgrade torch-npu needs packages' version: torch==2.1.0 and torch-npu==2.4.0.post2

Former-commit-id: acc52e0fe75d59c2581ef45346ebfbffe45f762b
2025-02-25 23:32:01 +08:00
hoshi-hiyouga
f4aa0a146c [misc] fix project toml (#7067)
Former-commit-id: 96fd510e6a03eae7a1f41772e1d6b784df6d5d2e
2025-02-25 23:22:48 +08:00
JieShen
96636c3729 [script] add seed args (#7058)
* add seed args

* add seed args

* update seed

Former-commit-id: e8266fe5635470e84f9d39f43e53cc49f962c2e9
2025-02-25 19:44:57 +08:00
Kingsley
81947f1d2c [model] add paligemma2-mix series (#7060)
Former-commit-id: 19861d5170bdcdf8c1c5d72289b29bff4b0d4c2c
2025-02-25 18:51:16 +08:00
hoshi-hiyouga
dca5fe14c2 [data] fix mllama (#7053)
* fix mllama

* fix test

Former-commit-id: 76314e6ad1ecaa44fcae4375dd0abf4ebaf1f924
2025-02-24 22:05:38 +08:00
hoshi-hiyouga
ca78ba964d [model] add models (#7054)
* add qwen25vl awq models

* add moonlight

Former-commit-id: ec1a1bc1184d13188029e19c1d4e7de68707aaf6
2025-02-24 22:05:13 +08:00
hoshi-hiyouga
9359ee18ad [assets] update readme (#7051)
Former-commit-id: fe6dd92c84cff34326f6f0ff0b648e43c372fe96
2025-02-24 20:45:06 +08:00
hoshi-hiyouga
15f3087b96 [assets] update wechat (#7019)
Former-commit-id: 1481af5dc9bc99807ae0ee5a438bf0a279cafb66
2025-02-20 20:32:33 +08:00
Zhangchi Feng
1fcedf9af6 [data] fix MiniCPMV plugin (#6998)
* fix template

* fix bug in messages processing

Former-commit-id: cde479e47a51beb60ab555cdee083c1cdba0ead6
2025-02-19 19:36:04 +08:00
hoshi-hiyouga
b0bbacaacb [webui] update css (#6985)
Former-commit-id: 302ecb00fef56d1ccc9203cb46f242841fefab47
2025-02-18 18:27:57 +08:00
hoshi-hiyouga
beb1a9f9d9 [data] add r1 distill dataset (#6983)
Former-commit-id: 2591a3fa8b37fed8011fb66b266ef15e18404756
2025-02-18 17:25:09 +08:00
hoshi-hiyouga
3fbd4848e8 [version] support transformers 449 (#6982)
* support transformers 449

* fix mm plugin

Former-commit-id: b00b290c07beb560a5af857ce64f4ce424831a2c
2025-02-18 17:05:40 +08:00
hoshi-hiyouga
184c5d0882 [misc] fix script (#6977)
Former-commit-id: cc8c7e762b9c873ef79529152465bbed9231053c
2025-02-18 17:00:46 +08:00
hoshi-hiyouga
1f4a0b11ba [data] update vlm args (#6976)
Former-commit-id: 3da2cc2710c9b13ab450815a92fff14b03251984
2025-02-18 02:12:51 +08:00
hoshi-hiyouga
b1d31ff0f9 [data] add min resolution option (#6975)
Former-commit-id: 7faecc0301709326efa21e7a3fdb75fe0a9635c2
2025-02-18 01:40:46 +08:00
hoshi-hiyouga
a8c9d5663d [data] fix predict dataset (#6972)
Former-commit-id: bdb581c4a82d02458766e73c87b7a92ea31796ec
2025-02-17 20:29:40 +08:00
hoshi-hiyouga
475a355b82 [assets] update wechat (#6963)
Former-commit-id: ad0c6c891651c2779d07d89dc2e345aa211f5c51
2025-02-17 15:23:17 +08:00
Zhangchi Feng
3dc938268c [data] fix minicpmo template (#6946)
Former-commit-id: 2faf8aeff897765df44707d5a42157dfdd6b9038
2025-02-15 00:37:41 +08:00
Eric Tang
e55ec42d3c [ray] specify ray storage path (#6920)
Former-commit-id: 6edd4992d700fec56800a638f1cac0f87990c581
2025-02-14 21:55:41 +08:00
hoshi-hiyouga
2baf8bf03d [misc] fix lora regex (#6944)
* fix lora regex

* fix

Former-commit-id: 1ada3ae5a3a14057341540c6d6ba985adf95f348
2025-02-14 21:38:43 +08:00
hoshi-hiyouga
13e1b7ee2b [misc] fix grad ckpt (#6931)
Former-commit-id: c31c63b41109e616997757ec2da6e0ab89ed3b6e
2025-02-13 23:27:51 +08:00
hoshi-hiyouga
cd493b91de [model] add liger kernel to qwen2_5 vl (#6930)
* add liger kernel to qwen2_5 vl

* fix patch

* fix patch

Former-commit-id: 797043d29cb85a8f90fabf48976908037f07000e
2025-02-13 23:05:54 +08:00
Billy Cao
48173b606c [trainer] fix gen_kwarg to eval during training (#5451)
* Correctly pass gen_kwarg to eval during model runs

* fix

* fix

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 11eac71c13cd432322b69ae74a3b8fa17af31bc4
2025-02-13 02:35:06 +08:00
SrWYG
0ad9f7f058 [data] evaluate on each dataset (#5522)
* [Update] loader.py , evaluate will run separate evaluations on each dataset.

`If you pass a dictionary with names of datasets as keys and datasets as values, evaluate will run separate evaluations on each dataset. This can be useful to monitor how training affects other datasets or simply to get a more fine-grained evaluation`

seq2seqtrainner support eval_dataset as Dict.

* fix format

* fix

* fix

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 1e35967ae159038a66f3203dd0e6ec51eea9208f
2025-02-13 02:19:03 +08:00
Noah
1adb46875f [data] improve error handling (#6128)
* sync from upstream

* update

* update

* fix

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 4c7bfebcf1ed90800f5b0de4cf67b3036cb9dc13
2025-02-13 01:39:41 +08:00
hoshi-hiyouga
9b852ebe25 [misc] update readme (#6918)
Former-commit-id: 8956c93d9b05ee929fde2da0eb2365684c01f563
2025-02-13 01:01:41 +08:00
hoshi-hiyouga
07aa7b71a3 [misc] update readme (#6917)
Former-commit-id: 499ea45d1f1ea7704ee82f58c35af123a6c2632b
2025-02-13 00:58:10 +08:00
hoshi-hiyouga
1679930e00 [breaking change] refactor data pipeline (#6901)
* refactor data

* rename file

Former-commit-id: 617c8ab467d32be5f7d5c94fa89c0e3d7d1963bc
2025-02-13 00:39:20 +08:00
Eric Tang
d50e04b805 [misc] support for launching LLaMA-Factory with uv run (#6907)
* yay

* uv with ray temporary commit

* remove ray specific code for now

* cleanup

Former-commit-id: f8a206125d924230740f9f98c72bf70fd77bdc32
2025-02-13 00:38:44 +08:00
Eric Tang
e515fe62de [example] fix path to ray example (#6906)
Former-commit-id: ee5fe216dc73a458431e1b689787a8ddabf8de17
2025-02-13 00:29:32 +08:00
hoshi-hiyouga
036fb0d561 [misc] fix grad ckpt func (#6916)
Former-commit-id: e34c3c06da706f80c74c20800f19110e9ad6b82a
2025-02-13 00:17:18 +08:00
marko1616
bae934dea3 [trainer] fix llama3.2 vision kto train (#6904)
Former-commit-id: b7fd1e9c00c77a4c2a0f2f347767d22bd47213f1
2025-02-12 19:09:14 +08:00
hoshi-hiyouga
2e2f6bea07 [data] feat: auto template (#6905)
* support auto template

* add unittest

Former-commit-id: 2f8b6847f5e199d770e91346dfe205c4b9f1fbb7
2025-02-12 00:22:53 +08:00
hoshi-hiyouga
1b02183da9 [misc] update readme (#6903)
Former-commit-id: 18179a3823b6222973e7c8157d21ed88fdb8c550
2025-02-11 22:51:26 +08:00
hoshi-hiyouga
197aa3baf4 [data] fix ollama template (#6902)
* fix ollama template

* add meta info

* use half precision

Former-commit-id: e1a7c1242cd1e0a1ca9ee7d04377a53872488126
2025-02-11 22:43:09 +08:00
hoshi-hiyouga
c6be9e242c [misc] support export ollama modelfile (#6899)
* support export ollama modelfile

* update config

* add system and num ctx

Former-commit-id: 9184a6e0ed7ff5f632c848f861bfa448c4cd06fc
2025-02-11 19:52:25 +08:00
hoshi-hiyouga
2e954d8fd2 [data] refactor template (#6896)
Former-commit-id: d1b8aa3835f6e3b2e63cf06e6cadbe760d46f9aa
2025-02-11 17:59:25 +08:00
codingma
fafa3add84 support ollama modelfile export (#4686)
Former-commit-id: 7f354b80bc9d1336e8bea5374925a7c2ec7a315c
2025-02-11 17:52:24 +08:00
hoshi-hiyouga
593acca556 [data] refactor mm plugin (#6895)
* refactor plugin

* lint

Former-commit-id: aca63bfcca02ecd95b57cd8949a50e26a913f716
2025-02-11 16:34:49 +08:00
HJ
188f22d8a7 [data] fix qwen_2_5_vl video processing (#6868)
* fix qwen_2_5_vl video processing

* Update mm_plugin.py

* Update mm_plugin.py

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 9153a7bd832cdae84b63a4d7d1f2b12239e84b61
2025-02-11 16:14:50 +08:00
hoshi-hiyouga
703bb9cc18 [assets] update wechat (#6892)
Former-commit-id: fc5d47401f61a5c95d7a4ab7f696450cfa7b70e3
2025-02-11 13:56:26 +08:00
Zhangchi Feng
5433b318bb [da'ta] fix minicpmv plugin (#6890)
* fix template name

* tiny fix

* support minicpm-o-2.6

* support inference of minicpmv

* update readme

* support dpo of minicpmv

* update init audio

* update init audio

* [model]fix image process in minicpmo

* fix no mm inputs

Former-commit-id: 764627645abcd353f9130d5dd8c584810b0e0b1b
2025-02-11 13:30:44 +08:00
HJ
fe4f4e9758 [data] fix: sharegpt converter (#6879)
* fix-sharegpt-format

* fix

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 0fb44cb3a5499c8da79e73004adc9d16f792b4b3
2025-02-10 21:59:12 +08:00
hoshi-hiyouga
1bb3d17d9e [data] fix mllama collator (#6874)
Former-commit-id: b68199db274a53d5916179e1aaf9722fd94fa2dc
2025-02-09 22:42:25 +08:00
hoshi-hiyouga
b93333685b [test] align test cases (#6865)
* align test cases

* fix function formatter

Former-commit-id: f6f3f8d0fc79de6bbad0bf892fc2f6c98c27eb8e
2025-02-09 01:03:49 +08:00
hoshi-hiyouga
fcd0f0480d [dataset] add openthought (#6866)
Former-commit-id: 1356f9d8400efaccf677d0b36aaf32a146a09833
2025-02-09 00:53:01 +08:00
hoshi-hiyouga
ff6658ad27 [deps] upgrade vllm (#6857)
Former-commit-id: 5f38bcaba921dbdee27b4be4709fcec06fa37c9e
2025-02-08 15:02:28 +08:00
hoshi-hiyouga
28037c7834 fix qwen2vl plugin (#6855)
Former-commit-id: 40048ab77a8b25a91a844800f0f1e880b84548cd
2025-02-08 10:59:10 +08:00
hoshi-hiyouga
f70208e1c0 [misc] allow extra args (#6831)
Former-commit-id: 74ade3a176cad753971aaad681fea6ff8df40914
2025-02-06 12:38:08 +08:00
hoshi-hiyouga
7aa9767dc2 [assets] update wechat (#6830)
Former-commit-id: 6dad5369681beff089832f3eb2bc329f57a79a08
2025-02-06 12:02:05 +08:00
Zhangchi Feng
01915eaf40 [model] support audio (#6701)
* support qwen2_audio

* improve code

* lint

* fix

* fix

* fix

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 24c78429489809873a1269a735ea5421340b32a2
2025-02-05 04:59:09 +08:00
Yueqi Song
e665e1fed5 [data] allow thought in function call (#6797)
* Update template.py

* Update template.py

* use formatter

* fix regex

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: a5e943f7bcea6e5840da8570055bf3079a49ae8c
2025-02-05 02:26:23 +08:00
hoshi-hiyouga
1fee69f874 [misc] update license year & fix llama pro (#6814)
* fix llamapro script

* change year

Former-commit-id: e2dc5b952aa22835d5220ba624f44676138b65ac
2025-02-05 01:53:33 +08:00
Yueqi Song
8504bde893 [data] fix qwen tool template (#6796)
* Update tool_utils.py

* fix unittest

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: dd6b7d203eedbf09458c64654e8d97fec85f08d7
2025-02-05 00:02:00 +08:00
Zhangchi Feng
85f22d01bf [data] fix minicpmv plugin (#6801)
* fix template name

* tiny fix

* support minicpm-o-2.6

* support inference of minicpmv

* update readme

* support dpo of minicpmv

* update init audio

* update init audio

* [model]fix image process in minicpmo

Former-commit-id: ab9bd068efee861452407cdda08ef014d5ce23d5
2025-02-04 21:20:15 +08:00
hoshi-hiyouga
822d5d362c [assets] update wechat (#6810)
Former-commit-id: 069a477d1633d65270b5e9c3fbb263735cef8cea
2025-02-04 21:17:40 +08:00
neavo
32163e7ce0 [readme] update flash attention installation instruction on win platform (#6788)
* Update README_zh.md

* Update README.md

Former-commit-id: a417bcf8d9d70057d12f9152e4091c090133e025
2025-02-01 12:43:29 +08:00
hoshi-hiyouga
454140d912 [misc] update workflows (#6787)
Former-commit-id: b5fda21288183a5a5eb68cc267fda4270159595b
2025-02-01 04:54:42 +08:00
hoshi-hiyouga
445d643ef3 [model] add mistral small models (#6786)
Former-commit-id: 94803d8133fbbadff6d224cb6695feb5434fd4fd
2025-02-01 04:31:38 +08:00
hoshi-hiyouga
e8c1979b79 [model] add qwen2.5 vl models (#6779)
Former-commit-id: 999c7c8fe0caf6b837a1bdc2c6a24fafec327cd8
2025-01-31 03:00:29 +08:00
hoshi-hiyouga
f6779b0e0c [breaking] support transformers 4.48 (#6628)
Former-commit-id: 15357cdad953bba1f2d294819f56b9746ed1b891
2025-01-31 01:36:33 +08:00
hoshi-hiyouga
245de012ca [webui] improve webui & reasoning mode (#6778)
Former-commit-id: 45e68b9f092879dda55023ebbcd8cf4660e3045a
2025-01-31 00:09:21 +08:00
codingma
f143360ee6 [assets] update wechat (#6771)
Former-commit-id: 4fb6059f486e96287764114e1563fd4235b9f1d8
2025-01-29 12:31:24 +08:00
qvlehao
f5350b103b [model] add deepseek-R1 & show think process (#6767)
Former-commit-id: 28417f862a1947a24663150ca55f421198b6d8eb
2025-01-29 12:16:26 +08:00
yinpu
aa7c07caf0 fix: avoid redundant normalization in DPO's SFT loss calculation (#6722)
Former-commit-id: 0f45982bac6b65533a94054ea5f792cb0f9e5a1f
2025-01-21 13:38:02 +08:00
engchina
324f07613a [webui] support ja (#6698)
* add support for japanese language

* add support for japanese language

---------

Co-authored-by: engchina <atjapan2015@gmail.com>
Former-commit-id: de9bc3fefa4fcb5db7d04589b16282a078c62cb2
2025-01-20 19:46:38 +08:00
hoshi-hiyouga
0c59483368 [assets] update wechat (#6710)
Former-commit-id: 3962645ac0f7e9f2dbc503e5fbc9434dd959316c
2025-01-20 16:29:24 +08:00
hoshi-hiyouga
1efe525df7 [model] support yarn (#6693)
Former-commit-id: 1f47b6186c267de86cbdbd47ba2adbf1f9db7f39
2025-01-18 13:56:09 +08:00
hoshi-hiyouga
ee0b3b1e1a [assets] update wechat (#6692)
Former-commit-id: 17b470630df08786e958192287edc8199280a4b2
2025-01-18 12:35:03 +08:00
hoshi-hiyouga
f87c788154 [misc] update mm plugin (#6691)
Former-commit-id: c0caa7afc60ed3015fe6c263ba3566202ba934f1
2025-01-17 23:04:26 +08:00
hoshi-hiyouga
bbf334f823 disable valset by default (#6690)
Former-commit-id: 77bbf659053e1b205974eb6df69998fee0305d26
2025-01-17 21:09:30 +08:00
hoshi-hiyouga
770433fa33 [webui] upgrade to gradio 5 (#6688)
Former-commit-id: 4d0f662dbe227ab0da11a1e109f7a2c5ab8f70b9
2025-01-17 20:15:42 +08:00
hoshi-hiyouga
788accb601 fix qwen2 moe (#6684)
Former-commit-id: 7bf09abf1c4d971cda33daed933c75f391e79294
2025-01-17 13:46:09 +08:00
Zhangchi Feng
555f17c1ee [data] Fix minicpmv/o dpo training (#6657)
* fix template name

* tiny fix

* support minicpm-o-2.6

* support inference of minicpmv

* update readme

* support dpo of minicpmv

Former-commit-id: 027942789bf3a28b2506a5730c05c8392ef5c885
2025-01-15 17:30:37 +08:00
steveepreston
8895cf1152 Update val_size english description (#6653)
* Update `val_size` Description in locales.py

* Update `val_size` Description in data_args.py

* Remove extra space in data_args.py

Former-commit-id: 76675b654e243c14b260adbfe04f619e4f2bf177
2025-01-15 16:00:20 +08:00
hoshi-hiyouga
320e40d873 update readme (#6648)
Former-commit-id: 563be2286a756fcd5d41b351beb8e1aa4e95842b
2025-01-15 11:06:19 +08:00
hoshi-hiyouga
9ef85f8fc4 [optim] clean apollo (#6645)
* clean apollo code

* update readme

Former-commit-id: 7a04021d0461caea2c7b82169839340b7f51f463
2025-01-15 01:42:50 +08:00
zhuHQ
763f9b9df0 [optim] add support to APOLLO (#6617)
Former-commit-id: d9189f9f0b23ff6929044919208e0e813ca95b1c
2025-01-15 00:24:56 +08:00
Zhangchi Feng
57043fb4e6 update readme of MiniCPM-o (#6642)
* fix template name

* tiny fix

* support minicpm-o-2.6

* support inference of minicpmv

* update readme

Former-commit-id: 9b7ba093c7e017ea18a4562550d5d2e82c4a0161
2025-01-14 21:22:35 +08:00
hoshi-hiyouga
91433d639c lint (#6641)
Former-commit-id: 1278c3e92eeb297e883aab89e2384c1df1d0e910
2025-01-14 18:40:07 +08:00
Haian Huang(深度眸)
864ee06243 Support InternLM3 Dense 8B Model (#6640)
* support internlm3

* update

* update

* update

* add hint

Former-commit-id: deacc00b1226ca3d53bf7bb1231cf276eaa8296b
2025-01-14 18:07:27 +08:00
Xiaosu Zhu
a52496cc09 Fix tokenizer max length (#6632)
Former-commit-id: 58d029f3212dba1808e63cc8875022f6d741bd63
2025-01-14 17:35:54 +08:00
Zhangchi Feng
ad119afc58 Support Inference of MiniCPM-V-2.6 and MiniCPM-o-2.6 (#6631)
* fix template name

* tiny fix

* support minicpm-o-2.6

* support inference of minicpmv

Former-commit-id: 158a127d340d5e4ca23263ffad042f861fd77deb
2025-01-14 17:34:58 +08:00
hoshi-hiyouga
8f73c75c16 [model] fix mllama any image (#6637)
* fix mllama any image

* reorder classes

Former-commit-id: 98189c8e4d70bf5f8ee83852a023ed27dfc96900
2025-01-14 16:47:58 +08:00
hoshi-hiyouga
5e699458e5 pin vllm version to 0.6.5 (#6629)
Former-commit-id: 1c7663d3049e00a9148c3e3c58204deca7a08c8d
2025-01-14 02:44:02 +08:00
Zhangchi Feng
201a495154 Support new features of MiniCPM-V (#6626)
* fix template name

* tiny fix

* support minicpm-o-2.6

Former-commit-id: c3fda5046d835ba4542d525b8d89cd12838e9f4c
2025-01-14 00:26:19 +08:00
hoshi-hiyouga
d8cba9464f [inference] fix stop token for object detection (#6624)
* fix stop token

* update minicpm data pipeline

* fix npu qlora examples

Former-commit-id: e3e2c8c689c54ebb2af264de808502e5a8ba0f2b
2025-01-13 21:34:20 +08:00
codingma
089c7d5e51 add nf4 qlora support on Ascend NPU (#6601)
* add nf4 qlora support on Ascend NPU

* add transformers version check

* add python>=3.10 requirement description for npu

* tiny fix

---------

Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn>
Former-commit-id: 03de5ac912336190d6b3583f70b6340ab9cf9cdf
2025-01-13 19:43:36 +08:00
Zhangchi Feng
15bba15725 Fix template name of MiniCPM-V (#6620)
* fix template name

* tiny fix

Former-commit-id: 3077f20339158564009270edf79c8ef1b10e8b4a
2025-01-13 16:46:48 +08:00
hoshi-hiyouga
0b47c2a293 Merge pull request #6598 from BUAADreamer/minicpmv
[model] Support MiniCPM-V

Former-commit-id: 6eec50c74dcbcc325ad6258228e19c19b4a03538
2025-01-13 15:24:02 +08:00
fzc8578
313ce9a576 remove tests
Former-commit-id: a019cece8009b0ba8a6b5a309ed5abfe6cb88a75
2025-01-13 15:08:35 +08:00
fzc8578
ee87d318b8 fix tests
Former-commit-id: c2fa4cc7b114ac1a376882022e4b6ef75d288dca
2025-01-13 15:01:39 +08:00
fzc8578
4741eec2d1 fix style
Former-commit-id: 0cc7260a93bf7c65451e376245aa143f9237d7d8
2025-01-13 14:19:38 +08:00
fzc8578
d2afe0c63c fix system prompt and tests
Former-commit-id: cfaa8e4890ad99ec1fb90d9550503d734b5c30b7
2025-01-13 14:18:06 +08:00
fzc8578
bdded9d41a add some
Former-commit-id: 01e9cfd406dc21f387b4f2baa1d61195a841ccb5
2025-01-11 15:03:20 +08:00
fzc8578
8c79fe6a5a add cpm_o test
Former-commit-id: 10073319b4215be900744a28a61bd442e70143cc
2025-01-11 11:55:30 +08:00
fzc8578
63bb2b7235 add cpm_o test
Former-commit-id: c506f763dff1c1d2c85ac8fe6beb9f40ca4fcde9
2025-01-11 11:49:03 +08:00
fzc8578
e7f928adc4 fix format
Former-commit-id: 7b44f3127ef7e91a6bedca0311feb14974914ddf
2025-01-11 01:27:40 +08:00
fzc8578
62c12a133e add some
Former-commit-id: a650e114e907278ece188922467c2514de544eeb
2025-01-11 01:10:24 +08:00
fzc8578
08e8499a98 adapt to new mllm_param
Former-commit-id: 291384dea8a5c10f0358a30d124eaf85557548eb
2025-01-11 00:16:34 +08:00
Zhangchi Feng
d5b18ee4a6 Merge branch 'main' into minicpmv
Former-commit-id: ed0895a9c13b0ea8a5cace6b060f01d9771816ad
2025-01-11 00:01:36 +08:00
hoshi-hiyouga
93cc1f167b Merge pull request #6600 from hiyouga/hiyouga/refactor_mllm_param
[model] refactor mllm param logic

Former-commit-id: 382e932228d1bcfcdee0a25ee3f1977226f1c433
2025-01-10 23:53:37 +08:00
hiyouga
c89d17ab63 refactor mllm param logic
Former-commit-id: f6f630a1c96514053176abb12e35a06242e62abd
2025-01-10 15:45:48 +00:00
fzc8578
9213e48fa2 add minicpmv2.6
Former-commit-id: e45329e7456b647d5684b1f9428641ad18af92d1
2025-01-10 23:45:44 +08:00
fzc8578
0fb50f9c88 add some
Former-commit-id: 771cc802941cf1953b32e5102c817c6a3090b5ce
2025-01-10 23:29:06 +08:00
fzc8578
bcbe37ff52 add some
Former-commit-id: ae1f528df31194fe37a123ba1e5a4cd263a61602
2025-01-10 21:25:32 +08:00
fzc8578
994049380d fix some
Former-commit-id: 15bbcdf8d3265f4154d3937719da5e54a5963355
2025-01-10 20:55:52 +08:00
fzc8578
cc6a6f698f fix version
Former-commit-id: d09032049c1f24336a1899908bf47a98e77b3211
2025-01-10 20:31:04 +08:00
fzc8578
7138b43873 fix some
Former-commit-id: 2ee8ba2f390551af1b865cfa813f5c8b7bbb41c5
2025-01-10 20:27:06 +08:00
fzc8578
aeb4f82ef2 tiny fix
Former-commit-id: 84026be06e34239a828a0cc8b1706084afcfa4ea
2025-01-10 20:15:39 +08:00
Zhangchi Feng
f51ac40f0a Merge branch 'main' into minicpmv
Former-commit-id: fc045d7dd871985d621430b5662cba882188a59c
2025-01-10 20:12:07 +08:00
fzc8578
165fe8e219 add some
Former-commit-id: 096a6cb67a7dfd14a6e339d96baab78c12d36a87
2025-01-10 20:01:22 +08:00
hoshi-hiyouga
4243c618f0 Merge pull request #6597 from hiyouga/hiyouga/upd_wechat
[assets] update wechat

Former-commit-id: b308ddf0971606f0f8f39e26f5711852abad3e79
2025-01-10 18:41:47 +08:00
hiyouga
368d22f79a update wechat
Former-commit-id: 70ed03b288c1853f262e47b06e8601eaf49ccc1b
2025-01-10 10:40:25 +00:00
hoshi-hiyouga
b3561ae552 Merge pull request #6588 from hiyouga/hiyouga/upd_issue_temp
[gh] update issue template

Former-commit-id: 5ffd8ad192bb3932fbe230757d4bf1c907ca3aa4
2025-01-10 03:03:48 +08:00
hiyouga
b395540826 update issue template
Former-commit-id: aa8d0a223b0345e1f665b6703678c0ce526ff950
2025-01-09 18:58:53 +00:00
hoshi-hiyouga
a1b5644889 Merge pull request #6585 from hiyouga/hiyouga/add_phi4
[model] add phi4 model

Former-commit-id: 8b209cb49d9cc6058ce61c97bf2216f6371c5f7c
2025-01-10 02:39:17 +08:00
hiyouga
b471def13d improve template, add phi4 model
Former-commit-id: ae16ea755d581a5a288fb55f12481215f369b255
2025-01-09 18:27:54 +00:00
hoshi-hiyouga
b777fed171 Merge pull request #6564 from stephen-nju/fix_ray
Fix ray

Former-commit-id: 6b34b69fa688c4622489d3d5f33d847fb6b95528
2025-01-08 18:14:18 +08:00
hoshi-hiyouga
618ceda6e9 Merge pull request #6565 from hiyouga/hiyouga/improve_log
[misc] imporve log

Former-commit-id: 18431527bac8da57d9a2fc014695e5891f7a3068
2025-01-08 18:08:21 +08:00
zhubin
014a7ea042 fix –get ray args when args not a dict
Former-commit-id: 9c4c84828b77acf48caf60726e4e7ef3e972118d
2025-01-08 10:06:02 +00:00
hiyouga
da542fad18 imporve log
Former-commit-id: 47e17dd689840ca9b3c5f34448e5f80265336cca
2025-01-08 09:56:10 +00:00
hoshi-hiyouga
984b202f83 Merge pull request #6542 from erictang000/et/ray-integration
Ray Train integration with LLaMA-Factory

Former-commit-id: d23a98825bcb569bc51e21a3c2236eccd2f6d2fd
2025-01-08 11:46:03 +08:00
hiyouga
0c1ad5f3fb fix llamaboard with ray
Former-commit-id: c46675d5e56d175c27d705ef0068fb47dc89a872
2025-01-07 09:59:24 +00:00
hiyouga
b4174021d6 refactor ray integration, support save ckpt
Former-commit-id: d8cac6f54663e6cffeddf2c65e3da454e7b86a75
2025-01-07 09:39:10 +00:00
Eric Tang
bba52e258e run style check
Former-commit-id: 1e8e7be0a535e55888f58bbe2c38bc1c382e9012
2025-01-07 08:55:44 +00:00
Kourosh Hakhamaneshi
1217240918 drafting ray integration
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>

Former-commit-id: 163ddb680b6f84a4424a887a3b8a5d668044e87c
2025-01-07 08:55:44 +00:00
hoshi-hiyouga
a0bcac80c0 Merge pull request #6547 from hiyouga/hiyouga/fix_pixtral_dpo
[trainer] fix pixtral dpo

Former-commit-id: c973f32849b979a3ebb80caa01029b43fbb620ac
2025-01-07 14:38:55 +08:00
hiyouga
8c57169eb7 fix #6546
Former-commit-id: 870f23d7eaff1e32a73fee4eb972163c85ba7b67
2025-01-07 06:30:44 +00:00
fzc8578
b9eeaa9706 add some
Former-commit-id: 785cc70ff205f5962c3ca67f453589e4a471ba8c
2025-01-06 19:32:39 +08:00
hoshi-hiyouga
621d73e87c Merge pull request #6528 from hiyouga/hiyouga/upd_wechat
[assets] update wechat

Former-commit-id: b832ed9a60a5fd0bc7d9f975bb881a71e7d35245
2025-01-04 16:01:21 +08:00
hiyouga
a02a140840 update wechat
Former-commit-id: cd1433650653810f7934c65cb1de91052eb73dcf
2025-01-04 07:59:57 +00:00
Zhangchi Feng
a0188a430f Merge branch 'hiyouga:main' into minicpmv
Former-commit-id: ab87bd6b1398b379b1a7a95f01a6539743b9db2d
2025-01-04 11:20:33 +08:00
fzc8578
b5ef5059ee add some
Former-commit-id: 79c2d7090cbf364063ea3608814ab18aa27fdc87
2025-01-04 11:11:15 +08:00
hoshi-hiyouga
084d356c2c Merge pull request #6524 from hiyouga/hiyouga/upd_scripts
[misc] update scripts

Former-commit-id: e6d603ac374c04df354361f9617173afa8c1edae
2025-01-03 23:52:26 +08:00
hiyouga
20a9565e36 update scripts
Former-commit-id: dd44c65d7f60cb6f5d0e0d8ee5f4e7643defb89b
2025-01-03 10:50:32 +00:00
hoshi-hiyouga
85317bcbaf Merge pull request #6515 from hiyouga/hiyouga/misc
[misc] update model name

Former-commit-id: 51ef90ce0ace4a45f9c01ba7e674adf5e3c92baa
2025-01-02 20:20:02 +08:00
hiyouga
528fb4f799 update model name
Former-commit-id: 4b8add728729d8e2ce4c9a3dc6748357291d8e8b
2025-01-02 12:19:21 +00:00
hoshi-hiyouga
aa7ec44367 Merge pull request #6514 from hiyouga/hiyouga/add_project
[readme] add project

Former-commit-id: a766cad5d49f226eb61a550bc3d157870c1068cc
2025-01-02 20:16:15 +08:00
hoshi-hiyouga
b2ecb80729 Merge pull request #6513 from hiyouga/hiyouga/add_gpt2
[model] add gpt2 model

Former-commit-id: 29ddc6b77862f740570a00d3b8ea548ee1a2ce03
2025-01-02 20:15:55 +08:00
hiyouga
9a3afbd5d1 add project
Former-commit-id: b3e1137fbbdfa4cc081903983fea36acff7afd75
2025-01-02 12:15:41 +00:00
hiyouga
37c60c7d14 add gpt2 model
Former-commit-id: 67442bd497c75b0c5990d94a880e0e25474ae2fa
2025-01-02 12:07:38 +00:00
hoshi-hiyouga
b921dde749 Merge pull request #6512 from hiyouga/hiyouga/fix_gen_logic
[trainer] fix generate logic

Former-commit-id: 72d86ecc9e327933a0a2c893b8ffd2740c99be6b
2025-01-02 19:36:54 +08:00
hoshi-hiyouga
d195329185 Merge pull request #6462 from shibingli/main
Add ARG HTTP_PROXY in Dockerfile to support HTTP proxy during image building

Former-commit-id: 8741e5b3e87a392a3c9d50455e4916c3a938fb24
2025-01-02 19:34:17 +08:00
hiyouga
da8721a70e fix #6499
Former-commit-id: 1800f8c72dfa618c71c84a3a18ecdef4d82754f7
2025-01-02 11:28:54 +00:00
hoshi-hiyouga
f318dc9464 Merge pull request #6493 from hiyouga/hiyouga/upd_wechat
[assets] update wechat

Former-commit-id: f8e80d566f7666b6af00360df97065698a1d3a9f
2024-12-30 21:55:03 +08:00
hiyouga
01bbe66f41 update wechat
Former-commit-id: a400d896a18e317acdbd3c79282c81b50cc2c54d
2024-12-30 13:54:22 +00:00
hoshi-hiyouga
bb664d2fc5 Merge pull request #6492 from hiyouga/hiyouga/add_deepseek3
[model] add deepseek3 model

Former-commit-id: 2382a5f0317d768ba8f4931977f5caed6057b3c0
2024-12-30 21:50:13 +08:00
hiyouga
d0e729cd33 add deepseek3 model
Former-commit-id: e67b9dcc3ad0c003bc3afd7601ecd2adfbf9666b
2024-12-30 13:39:20 +00:00
hoshi-hiyouga
1178cb0e33 Merge pull request #5507 from piamo/main
Add deepseek-v2.5 template

Former-commit-id: 91467ed313802ac3950c2e11a7d0997a36bcbddd
2024-12-30 21:08:25 +08:00
hoshi-hiyouga
089f824cd1 Merge pull request #6483 from hiyouga/hiyouga/fix_paligemma_infer
[model] update vllm & fix paligemma dtype

Former-commit-id: 40805b0cc0cff478703f68067a330ba307bb5809
2024-12-30 16:34:32 +08:00
hiyouga
813f5919a3 fix #6482
Former-commit-id: 6f5bb3b8e5b6eb7fdfd7b0ca8eba789ab741a7b6
2024-12-30 06:03:07 +00:00
hoshi-hiyouga
951d845af2 Merge pull request #6465 from hiyouga/hiyouga/fix_eval_loss
[trainer] fix eval loss

Former-commit-id: b55890291b0049dd90ef4d1d0bf0ba1efb1e4f0a
2024-12-28 01:02:56 +08:00
hiyouga
3bcb4633ca fix #6448
Former-commit-id: 27198679829fb766c7eef468ae4311fdced695a2
2024-12-27 16:54:39 +00:00
shibingli@yeah.net
c76c33ddb1 Add ARG HTTP_PROXY in Dockerfile to support HTTP proxy during image building.
Former-commit-id: f1d76786e094562f6f095a0b56c9c6cd32e2fa5e
2024-12-27 18:31:14 +08:00
shibingli@yeah.net
a37ef0eaae Add ARG HTTP_PROXY in Dockerfile to support HTTP proxy during image building.This commit introduces an ARG parameter named HTTP_PROXY in the Dockerfile. This addition allows for the configuration of an HTTP proxy, facilitating image building in environments with network restrictions.
Former-commit-id: a3a49b1ea477313c979a1649ee6a7f843fe36469
2024-12-27 18:17:17 +08:00
hoshi-hiyouga
377dfe5665 Merge pull request #6457 from youkaichao/module-run
[misc] enable module run

Former-commit-id: f68074d87bcc915a49a8765b3ebb32d935aa5445
2024-12-26 23:41:37 +08:00
youkaichao
f6d5dd6f10 Update cli.py
Former-commit-id: c39d81cd1d108d832746e100ac890b2d4ecaa60e
2024-12-26 23:22:09 +08:00
hoshi-hiyouga
a36f9d923e Merge pull request #6443 from hiyouga/hiyouga/add_qvq
[modle] add qvq

Former-commit-id: cd56f88ff2c5c3edc381f3807f466621cee86b67
2024-12-25 15:53:19 +08:00
hiyouga
c83b74ab9e add qvq #6439
Former-commit-id: ee0e400f417f648cd15cf48144df76e4809cc615
2024-12-25 07:52:41 +00:00
hoshi-hiyouga
c5780f5eaa Merge pull request #6430 from hiyouga/hiyouga/upd_wechat
[assets] update wechat

Former-commit-id: cbd494ddaf692faf83d4825fe4b4595430b111f5
2024-12-24 16:13:20 +08:00
hiyouga
4cd1d05429 update wechat
Former-commit-id: 83202c9027222b83c949d1fe1bff1317f5715015
2024-12-24 08:12:53 +00:00
hoshi-hiyouga
459219a260 Merge pull request #6426 from hiyouga/hiyouga/update_readme
[assets] update readme

Former-commit-id: b9f73fc5caf5753bd5b96de5383eaf80cd958e3d
2024-12-23 22:17:19 +08:00
hiyouga
353259f03f update readme
Former-commit-id: 8fd38d273e5bc3b28a4741b230010fece87e7070
2024-12-23 14:08:59 +00:00
hoshi-hiyouga
8265d6a228 Merge pull request #5922 from Tuyohai/main
support granite3 models

Former-commit-id: c23a4d0658323434c386716c25855711202e37a9
2024-12-23 16:46:02 +08:00
hoshi-hiyouga
c0418062c0 Merge pull request #6418 from hiyouga/hiyouga/add_report
[trainer] add custom args to experimental logger

Former-commit-id: d58746eca203d97ec57abbc312ecf4c00b5d5535
2024-12-22 05:47:55 +08:00
hiyouga
47c2d91933 support report custom args
Former-commit-id: 5111cac6f8e7b77ef1ca1ff967734cfe1d6785f4
2024-12-21 21:42:45 +00:00
hiyouga
f07bad7144 fix paligemma infer
Former-commit-id: 84cd1188ac03c165e1a626db297936c2458627d6
2024-12-21 20:24:32 +00:00
hoshi-hiyouga
9d437a5f4f Merge pull request #6416 from Zeyi-Lin/main
docs: use swanlab
Former-commit-id: a2ad0738a22f71af453a7f266c350ff7662bf67c
2024-12-22 04:08:26 +08:00
ZeYi Lin
1c1d6bea43 docs: use swanlab
Former-commit-id: 744ef8c2688efad82028e22683e6c9d874af6823
2024-12-21 20:59:25 +08:00
hoshi-hiyouga
547f76e56e Merge pull request #6401 from Zeyi-Lin/hiyouga/swanlab
feat: add swanlab for experiment tracking and visualization.
Former-commit-id: 947e22a4a30d8eb7b612da53bbf538ead7dd27b7
2024-12-21 14:09:33 +08:00
ZeYi Lin
67d4757c35 fix: project blank
Former-commit-id: 82e5d75014ffe5fbe762711adecf59c94ab29f59
2024-12-20 18:26:02 +08:00
ZeYi Lin
cc703b58f5 fix: by hiyouga suggestion
Former-commit-id: 3a7ea2048a41eafc41fdca944e142f5a0f35a5b3
2024-12-20 16:43:03 +08:00
ZeYi Lin
8f786ee938 feat: ui improve
Former-commit-id: 5f6dafd70e962b8fe9a294d555133002135f80df
2024-12-20 11:03:02 +08:00
ZeYi Lin
03dba638e6 fix: text
Former-commit-id: 0a52962db365e7456c858a8e58c19313f19d1e09
2024-12-19 21:26:02 +08:00
ZeYi Lin
dd22454fc5 fix: bugs
Former-commit-id: d0eb64d5e3472a166c9adac4cb4ba06bdd663e46
2024-12-19 21:08:16 +08:00
hoshi-hiyouga
904f18b4a2 Merge pull request #6395 from hiyouga/hiyouga/fix_genkwargs
[generate] fix generate kwargs

Former-commit-id: c6e3c14a93490df6e7f8099e09d62d602a667542
2024-12-19 20:24:17 +08:00
ZeYi Lin
b512a06c3d docs: config framework
Former-commit-id: 7eb49e5ffaea59d8a2756ae7ff55bd57b9077f4b
2024-12-19 20:22:36 +08:00
ZeYi Lin
c31933ef9e fix: string
Former-commit-id: 330691962960fdd2053236e43a919e8f15e2bf27
2024-12-19 20:18:59 +08:00
hiyouga
8524dcaa4a fix #6391
Former-commit-id: d4c1fda1ad19e73484d8d51d81e490cdb8781955
2024-12-19 12:16:38 +00:00
ZeYi Lin
53103f55b6 feat: optimize frontend
Former-commit-id: 8c2df41b937f491f7ebf593b20c65a19738c7642
2024-12-19 19:04:19 +08:00
ZeYi Lin
cc5cde734b feat: swanlab params
Former-commit-id: d5cf87990e5bea920ecd1561def09fa17cf328b1
2024-12-19 18:47:27 +08:00
hoshi-hiyouga
af9ef037dd Merge pull request #6388 from hiyouga/hiyouga/shuffle_control
[trainer] support disable shuffling

Former-commit-id: ffbb4dbdb09ba799af1800c78b2e9d669bccd24b
2024-12-19 17:00:12 +08:00
hiyouga
95d3c2620b support disable shuffling
Former-commit-id: c7cedc7569973a2879c689637b2923e8b26f1a81
2024-12-19 08:53:21 +00:00
hiyouga
1a48340680 add swanlab
Former-commit-id: 96f8f103e58a8ff307b0ce36c967de04f452434a
2024-12-19 07:12:31 +00:00
hoshi-hiyouga
d6ce1045f7 Merge pull request #6384 from hiyouga/hiyouga/fix_webui
[webui] fix webui args

Former-commit-id: 6ccd64ecd9089d8694decde3186836bd8e5df511
2024-12-19 14:57:52 +08:00
hiyouga
92a0d08e27 fix webui
Former-commit-id: 369cca8110e6923ad9978b6b93928a3bcb5c6f30
2024-12-19 06:48:03 +00:00
hoshi-hiyouga
910884065e Merge pull request #6379 from hiyouga/hiyouga/add_paligemma2
[model] add paligemma2

Former-commit-id: 933647e6806428a608c2f0fd90b8ea1ea84cdd89
2024-12-18 17:03:11 +08:00
hiyouga
433d116080 add paligemma2
Former-commit-id: d3509050dc4d3105a6e62acc9a1ba481269279a2
2024-12-18 08:57:26 +00:00
hoshi-hiyouga
d43080b534 Merge pull request #6313 from ge-xing/main
support telechat2 model

Former-commit-id: 015f2137887bb9f27fcb0d6cc67ef729aad4031e
2024-12-18 16:16:17 +08:00
hoshi-hiyouga
5f0dd86c15 Merge pull request #6369 from hiyouga/hiyouga/template
[template] support qwen2 tool template

Former-commit-id: af336275021cd6aee3fe9f67b9ac9bcd1276de7c
2024-12-18 04:23:49 +08:00
hiyouga
a421113466 support qwen tool format
Former-commit-id: 98795854e3fda7b0c0bc209b3e2496b0036e154e
2024-12-17 20:12:06 +00:00
hiyouga
acd62fddb8 change default replace jinja to false
Former-commit-id: bcc413cf64cbee068e2f19475ce7919c65284489
2024-12-17 19:27:10 +00:00
hoshi-hiyouga
d8f6569be1 Merge pull request #5473 from AlongWY/mistral
Support Mistral format tools

Former-commit-id: 2fad3792d98f4181ae23e861c3d050fe1bcd8e4e
2024-12-18 03:23:24 +08:00
ylfeng
857d23b324 Support Mistral format tools
Former-commit-id: 115924af47496daa747a018952b6a32ccbd9cecb
2024-12-17 19:13:26 +00:00
hoshi-hiyouga
ad00c793ce Merge pull request #6368 from hiyouga/hiyouga/fix_llama_template
[template] fix llama3 tool template

Former-commit-id: 8974a0a185daf7744b4d3a0b2776f9bd72e24426
2024-12-18 01:10:48 +08:00
hiyouga
f6a2bfc0e8 fix llama3 tool template
Former-commit-id: df5655f61cb847dc2d9eb7b34266b20343ff90d6
2024-12-17 17:05:10 +00:00
hoshi-hiyouga
1cc24ed206 Merge pull request #6367 from hiyouga/hiyouga/add_model
[model&template] add llama3.3 & support llama3 tool prompt

Former-commit-id: e12c80ace8b59a9556ee40f5b810f233f9b8174a
2024-12-18 00:13:28 +08:00
hiyouga
a935933bed support llama3 tool prompt
Former-commit-id: b24ae55ebf548db904a9fe1876192024d8a96108
2024-12-17 15:52:37 +00:00
hoshi-hiyouga
09419dfbab Merge pull request #5819 from yafshar/remote_code
Add trust_remote_code Parameter and Set Default to False

Former-commit-id: 2a832e489b7d88dba3cc8b07ca582cb22ec9a9f1
2024-12-17 21:10:24 +08:00
Yaser Afshar
76ebd62ac1 Add missing key to init_kwargs
Former-commit-id: 1c8ad22a5f167bf4e1c845e273583e5cb3a0214e
2024-12-17 12:34:05 +00:00
Yaser Afshar
fe4546a7bb Add trust_remote_code parameter and remove True
- Introduced a new model parameter `trust_remote_code`
- Set the default value of `trust_remote_code` to `False`
  to enhance security


Former-commit-id: 09437763267bc7081159a6878cee9652a2b1ddac
2024-12-17 12:25:12 +00:00
zhaohu xing
cfb4c42ae4 support telechat2 model
Former-commit-id: 04f19ed0f36e691d89ccb7ac19bae70c59640aaa
2024-12-17 12:15:33 +00:00
hoshi-hiyouga
fc18db6290 Merge pull request #6364 from hiyouga/hiyouga/control_reenterent_gc
[model] support non-reenterent-gc

Former-commit-id: a665ad6178516faf8aaa628d3b2c672ad831d7b7
2024-12-17 19:58:36 +08:00
hiyouga
64bac4bc7e support non-reenterent-gc & fix #6358
Former-commit-id: f319da6937964c5068864f7815efbf3847bd4ad8
2024-12-17 11:41:59 +00:00
hoshi-hiyouga
002c7d2867 Merge pull request #6363 from hiyouga/hiyouga/control_skip_eos
[infer] support control eos

Former-commit-id: 69738283071567eeecb492ac38ce1df3b994d975
2024-12-17 19:35:40 +08:00
hiyouga
a94a1eac67 support control eos, fix #6345
Former-commit-id: eda76de32bab103c650f246327d214539ae6f291
2024-12-17 10:42:05 +00:00
hoshi-hiyouga
a8a990a9a7 Merge pull request #6362 from hiyouga/hiyouga/mllm_packing
[model] generalized packing

Former-commit-id: 9708a39179d7872ff2039086fcadb021265974cc
2024-12-17 18:41:48 +08:00
hiyouga
bff1b94583 generalized packing & fix #6343
Former-commit-id: 2d107d3aefd5af61163056634c8b91fe3cb3e77c
2024-12-17 10:26:19 +00:00
hoshi-hiyouga
4caf043cf8 Merge pull request #6359 from hiyouga/hiyouga/fix_qwen2vl_infer
[model] fix qwen2vl infern

Former-commit-id: 81815f053f9eef23fa4906cc47496806cfc1735c
2024-12-17 18:15:23 +08:00
hiyouga
50ca43c3fb fix #6348
Former-commit-id: 142191e4664cb1b920aff2f51d1bac6180f2c24b
2024-12-17 10:06:46 +00:00
hoshi-hiyouga
0f49e9cb07 Merge pull request #6334 from hiyouga/hiyouga/add_examples
[assets] update wechat and examples

Former-commit-id: e2fbd07096877f76d6bdd1b0c4b2d42aa10c346f
2024-12-15 01:37:01 +08:00
hiyouga
ba901bc000 update assets
Former-commit-id: 7059055e89cc3f8557581d5d5b728a82ab5b0899
2024-12-14 17:36:03 +00:00
hiyouga
6f1e450739 fix mrope
Former-commit-id: 2811814fc42fb214b3e8be1055f9f57ffd0ffb12
2024-12-12 15:08:17 +00:00
hoshi-hiyouga
93d1cba06e Merge pull request #6253 from hiyouga/hiyouga/qwen2vl_mm_proj
[model] support qwen2vl train proj only

Former-commit-id: bcb4fb353ed810477b7813c6904b33c51efb7f81
2024-12-05 20:25:33 +08:00
hiyouga
cf8cad8e7e support qwen2vl train proj only
Former-commit-id: 99c62660c67fd2567c094bb49ec7d108e5670730
2024-12-05 10:37:42 +00:00
hoshi-hiyouga
255260cfcb Merge pull request #6251 from hiyouga/hiyouga/vllm_qwen2vl_infer
[infer] support qwen2vl vllm infer

Former-commit-id: 561a8e56d95e31dc9a36da4b369af219d7319688
2024-12-05 18:26:19 +08:00
hiyouga
88b06a0c7f support qwen2vl vllm infer
Former-commit-id: 207f8b069ca35a28de4588b4962e7254f451c52c
2024-12-05 10:17:26 +00:00
hoshi-hiyouga
7f8c59144e Merge pull request #6246 from hiyouga/hiyouga/update_examples
[examples] update examples

Former-commit-id: 967a6c12a72b97104bd262b0f2ed945a8b0cd81d
2024-12-05 16:49:30 +08:00
hiyouga
90fb5605c1 update examples
Former-commit-id: e5584dc7ba356264034c14ff7d8efcd3d50fa9a3
2024-12-05 08:48:25 +00:00
hoshi-hiyouga
9f9ad6435d Merge pull request #6242 from hiyouga/hiyouga/fix_script
[script] fix scripts

Former-commit-id: c42890bb2b287ac1fccb369a63a6495e7008b245
2024-12-05 11:54:46 +08:00
hiyouga
819f487c8f fix scripts
Former-commit-id: eb3e147d198a3ecb02c65f7733cec7cd9d3814a3
2024-12-05 03:47:32 +00:00
hoshi-hiyouga
9bbeba6323 Merge pull request #6160 from village-way/pr_dataloader
fix:tokenized_path not None and load_from_disk return Dataset Trigger…
Former-commit-id: cf298468309cd923d830dcaf7a1aa837519faf1e
2024-12-04 22:18:19 +08:00
hoshi-hiyouga
92940817e7 lint
Former-commit-id: 6a5074e46695378b76d58aac8ad7768b6b034b9c
2024-12-04 22:08:27 +08:00
hoshi-hiyouga
68614f6bc1 Merge pull request #6238 from hiyouga/hiyouga/vllm_batchinfer
[infer] feat: support batch infer in vllm

Former-commit-id: 8328bd8fbbb0699bde8269ba13d78e400668dca7
2024-12-04 21:59:13 +08:00
hiyouga
235cdcacee support batch infer in vllm
Former-commit-id: 1324d158f954d777f1fbf09f46149c372704b388
2024-12-04 13:50:00 +00:00
hoshi-hiyouga
b2c67a989a Merge pull request #6190 from JieShenAI/main
add vllm_infer script

Former-commit-id: dc7835500297322c85ba1d69fb12e743a5cd7bfd
2024-12-04 21:19:23 +08:00
hoshi-hiyouga
ed4c4bab49 Merge pull request #6170 from hykilpikonna/main
[+] Show the hostname in webui title

Former-commit-id: 263cb82bdb3dfb0c213018f25022686a3dab617e
2024-12-04 18:07:29 +08:00
hoshi-hiyouga
1804e8a491 Merge pull request #6233 from hiyouga/hiyouga/vlm_zero3
[data] fix vlm zero3 training

Former-commit-id: 187402203bb0aeada3c97f65fa9d178ff490c261
2024-12-04 17:51:10 +08:00
hiyouga
0ef1dc4dd5 fix vlm zero3 training
Former-commit-id: dbb9e5b70efab37ed057b2d5822b9d0d23e99fb1
2024-12-04 09:40:39 +00:00
hoshi-hiyouga
b34c3bb796 Merge pull request #6224 from hiyouga/hiyouga-patch-1
[assets] chore: update wechat

Former-commit-id: 7965e9840c18c71028c1a3a04c404e9fae196c0d
2024-12-03 21:25:38 +08:00
hoshi-hiyouga
aa5535c622 update wechat
Former-commit-id: 722a396b69ce340609175b0bc1cf118e5593a749
2024-12-03 20:48:48 +08:00
JieShen
d4bf81b36a add async call api
Former-commit-id: 4c61368600a6648ec20753a41536ad3c7986703b
2024-12-01 22:18:05 +08:00
JieShen
99265c7d2f add vllm_infer script
Former-commit-id: 961e8c2d2e5505de14702cf8609d54b4f3a23b1e
2024-11-29 14:22:20 +08:00
Azalea
0efa34c9ef [U] Compute hostname differently
Former-commit-id: 6554cdeedb8ab669ce500be404dab8d42a90779b
2024-11-28 22:23:41 -05:00
hoshi-hiyouga
f4729904f2 Merge pull request #6175 from hiyouga/hiyouga/add_qwq
[model] add QwQ

Former-commit-id: f2b2a37f0819bb344998a9059c02b97ca5a5ae74
2024-11-28 17:01:53 +08:00
hiyouga
1c3d86cd65 add qwq
Former-commit-id: 68a612115aebba51695d22be4397c16c86f3b40a
2024-11-28 08:50:57 +00:00
Azalea
f5e6e25a1b [+] Show the hostname
Former-commit-id: dfb953b1adb79ed9f886ecac6851a559617aaa5a
2024-11-28 12:25:02 +08:00
wangdepeng
ae09c6c214 fix:tokenized_path not None and load_from_disk return Dataset Trigger stuck
Former-commit-id: 4424d4de8aca0e4d3b92672584978f3cc3fc33da
2024-11-27 16:44:42 +08:00
hoshi-hiyouga
265a5821de Merge pull request #6156 from hiyouga/hiyouga/add_o1
[data&model] add marco-o1, skywork-o1 and openo1

Former-commit-id: 86f41513c04424f8f4ccfeca78d28a4cc7ba8728
2024-11-27 14:36:01 +08:00
hiyouga
9822cb7bac fix dataset
Former-commit-id: 046b6fb118e3ea75062c6a759720a1759639e93c
2024-11-27 06:27:44 +00:00
hiyouga
d51d96d594 add skywork o1
Former-commit-id: ec9ff8caa2637965d41937cce7de4e4d51d054eb
2024-11-27 05:51:59 +00:00
hiyouga
09a3a59c88 Merge remote-tracking branch 'origin/main' into hiyouga/add_o1
Former-commit-id: b7c7f3066f7c33fc6e52d9d1d57b831966e53c7f
2024-11-27 05:36:41 +00:00
hoshi-hiyouga
dfa4e927dd Merge pull request #6157 from hiyouga/hiyouga/fix_ci
[ci] pin tokenizers version

Former-commit-id: 14d0d92bf38ac09f0b7f7f9484345310e32fbbe6
2024-11-27 13:33:04 +08:00
hiyouga
61320965aa pin tokenizers version
Former-commit-id: b7d4cf2caf2d02f7d16bab3f0ec8bf0108b7be75
2024-11-27 05:24:58 +00:00
hiyouga
ab3782b0fa add marco-o1 and openo1 dataset
Former-commit-id: 17afb7d4103499a9a090a6624896cfa123e9e1d6
2024-11-27 04:20:23 +00:00
hoshi-hiyouga
6cd90efb82 Merge pull request #6152 from hiyouga/hiyouga/add_num_proc_in_data_load
[data] add num_proc in load_dataset

Former-commit-id: b26c490ac3a0a8a6342f940eb6ccb7b8b6d78f93
2024-11-27 00:16:15 +08:00
hoshi-hiyouga
08ca40876a Merge pull request #6151 from hiyouga/hiyouga/fix_mllama
[model] fix mllama cross mask

Former-commit-id: 88f087c8b9cb22fa4f4e4f867ea3d71dd8606a98
2024-11-27 00:07:54 +08:00
hiyouga
358708ee97 fix #6149
Former-commit-id: 362d579ce83e63007e6f89f264d06d2698671cc6
2024-11-26 16:03:02 +00:00
hiyouga
006022cadd fix mllama cross_mask
Former-commit-id: 598c22e43f3f10a335933339cc612744c4835eb0
2024-11-26 15:56:58 +00:00
hoshi-hiyouga
e0325b1123 Merge pull request #6141 from hiyouga/hiyouga-patch-1
[misc] chore: lint

Former-commit-id: 00031b1a66ade1c2665ce7a069a756cccbcb07f1
2024-11-25 23:02:11 +08:00
hoshi-hiyouga
118ffe50e3 lint
Former-commit-id: da9e4ddd26ebd6e7eb266aa0bef7505465a6b119
2024-11-25 22:55:56 +08:00
hoshi-hiyouga
a6aeb98af6 Merge pull request #6140 from hiyouga/hiyouga/fix_mllama
[data] fix mllama plugin

Former-commit-id: 3924a3d6e9d761dd51eca92afed7f299be71e42d
2024-11-25 22:32:07 +08:00
hoshi-hiyouga
c0ffe68745 fix #6139
Former-commit-id: d87e16cf5c46dadbfcda7b8ac8edfef6a012f97f
2024-11-25 22:22:06 +08:00
hoshi-hiyouga
1a8c26a7d9 Merge pull request #6138 from hiyouga/hiyouga/update_data
[data] update dataset info

Former-commit-id: 3a1402a4ed1fb958cd38903d016b9a87dc85d4cd
2024-11-25 21:47:23 +08:00
hoshi-hiyouga
4f1d5b6396 update dataset
Former-commit-id: 5214d3ea06ac73f1179ca9574d7c7030c92b5ee1
2024-11-25 21:47:04 +08:00
hoshi-hiyouga
697657271f Merge pull request #6137 from hiyouga/hiyouga/fix_mllama
[model] fix mllama hidden_size

Former-commit-id: 2b7157dc1dfe154146012270e046f311d3b4e4df
2024-11-25 20:17:33 +08:00
hoshi-hiyouga
a489f10986 fix visual patch
Former-commit-id: 75b586c31acf47d1bd28e04566ffd1d954e45596
2024-11-25 20:06:06 +08:00
hoshi-hiyouga
f48d07cd6c fix #6136
Former-commit-id: 0516e556a71a22b8767b17734adb94eb127e7e6f
2024-11-25 19:43:42 +08:00
hoshi-hiyouga
f1a1fb675b Merge pull request #6127 from hiyouga/hiyouga/dev_version
[misc] set dev version

Former-commit-id: 44125da5a57a51d41e67522d32d9c15910d6ae9a
2024-11-25 01:42:29 +08:00
hiyouga
f8f3638bff set dev version
Former-commit-id: b0ccc2ee86b74548c55e15da525bb9f22db8188a
2024-11-25 01:36:49 +08:00
hoshi-hiyouga
1176cd6779 Merge pull request #6124 from hiyouga/hiyouga/release
[release] release v0.9.1

Former-commit-id: 18daf10eda815e29ffd7bc0f2423f0c6d12b7b31
2024-11-25 00:20:02 +08:00
hoshi-hiyouga
4165c4414d Merge pull request #6126 from hiyouga/hiyouga/fix_vllm
[inference] fix vllm

Former-commit-id: 07059a7ca4bc9d79465639b1c22d8ccde5e81244
2024-11-25 00:19:54 +08:00
hoshi-hiyouga
7f74e54bee Merge pull request #6010 from XYZliang/fix-#4316
Increase shm_size to 16GB in docker-compose.yml

Former-commit-id: 8e9f4617f293077b959acc553d26a93c91c2fe6f
2024-11-25 00:16:42 +08:00
hoshi-hiyouga
3f3eeedca0 Merge pull request #6125 from hiyouga/hiyouga/fix_cli
[cli] remove shell=True in cli

Former-commit-id: 57953c8ff64ee91a8525abb0aa1d4a597ffe6ab3
2024-11-25 00:07:35 +08:00
hiyouga
65699c29d4 fix vllm
Former-commit-id: 13ee1f5cec815590c5d290f0aca264e6d16ddd5d
2024-11-25 00:07:24 +08:00
hiyouga
a04538e70b fix cli
Former-commit-id: 8792d78c82e83f319c584079d7ebfa2dccbb346a
2024-11-24 23:56:21 +08:00
hiyouga
708116a5f3 release v0.9.1
Former-commit-id: d622f8fdec744ca98035913eac13e1340949a72a
2024-11-24 23:48:41 +08:00
hoshi-hiyouga
5a7ff02806 Merge pull request #6123 from hiyouga/hiyouga/fix_qwen2vl_vllm
[inference] fix qwen2vl vllm infer

Former-commit-id: 0ce173e2a41f070051cbb7d50180a2f3b7cae89d
2024-11-24 23:42:11 +08:00
hiyouga
dcc67ac1a5 fix qwen2vl vllm infer
Former-commit-id: fa50fc470e46010214f0e509ef75a6c167caac7f
2024-11-24 23:27:24 +08:00
hoshi-hiyouga
7ed5a712f8 Merge pull request #6121 from hiyouga/hiyouga/readme
[readme] update readme

Former-commit-id: f2bfa80d55e661e2263cfffd2a16109442d47e78
2024-11-24 03:28:09 +08:00
hiyouga
7eaafe08bc update readme
Former-commit-id: a89ad72d039d03836f98625eaf438f332368a823
2024-11-23 19:27:18 +00:00
hoshi-hiyouga
503327b5bb Merge pull request #6120 from hiyouga/hiyouga/fix_ci
[test] fix ci

Former-commit-id: 5f310d92791c1a7ef0b1373b098323eacf653857
2024-11-24 03:21:11 +08:00
hiyouga
4bba121f43 fix ci
Former-commit-id: b52c38350d6092e8158484ca01da19ed016236fc
2024-11-23 19:13:32 +00:00
hoshi-hiyouga
8dff6f630c Merge pull request #5555 from marko1616/feat/llama3.2vl
Support llama3.2 vision

Former-commit-id: e68ef89600e85b1f067ca6cc70459e9a7ac77b8a
2024-11-24 02:49:07 +08:00
hiyouga
253752ccca add forbidden modules
Former-commit-id: df477370dc67315effac1a8f48068c4e9c4067a5
2024-11-23 18:34:15 +00:00
hiyouga
e99031daa4 fix inputs
Former-commit-id: 446441fdb020b5a102480251cb8536dd8b3f8f99
2024-11-23 18:26:02 +00:00
marko1616
23fc0c863e Linter.
Former-commit-id: b1e43e56db4d898c0d6d27b703b82a1eb9af70c2
2024-11-23 16:09:04 +00:00
marko1616
3295519099 Tiny fix.
Former-commit-id: 8372c5e3771c42f225d7bd80a758af920f80e893
2024-11-23 16:09:01 +00:00
marko1616
20faaf3418 Support llama3.2vl.
Former-commit-id: 3f2c056253c651e8e614c787e2045f4232e82666
2024-11-23 16:07:35 +00:00
hoshi-hiyouga
24419dd3f1 Merge commit from fork
[patch] Patch remote OS command injection vulnerability

Former-commit-id: b3aa80d54a67da45e9e237e349486fb9c162b2ac
2024-11-21 22:39:44 +08:00
hoshi-hiyouga
1eaaa85980 do not split save_cmd ret value
Former-commit-id: d20b97e7e9514e68c33d0428512fd21b548c1131
2024-11-21 22:30:23 +08:00
superboy-zjc
e272f87849 [patch] Patch remote OS command injection vulnerability
Former-commit-id: aa6a174d6822340022433c5ba38182b4932adecb
2024-11-21 01:52:12 -05:00
hoshi-hiyouga
4d49dc0559 Merge pull request #6098 from hiyouga/hiyouga-patch-2
update wechat

Former-commit-id: c8f199881aa954025f9b022f0f6b4fa7136466ad
2024-11-21 14:26:03 +08:00
hoshi-hiyouga
527ea7297b update wechat
Former-commit-id: acf491fc3a4e3d82608299dbd72271ea65045338
2024-11-21 14:25:33 +08:00
hoshi-hiyouga
302e4e22bf Merge pull request #6078 from wtmlon/support-efficient-tokens-calculation
support effective tokens calculation on sft/dpo

Former-commit-id: bd639a137e6f46e1a0005cc91572f5f1ec894f74
2024-11-20 13:43:15 +08:00
hoshi-hiyouga
2ea2bc7c71 Merge pull request #6083 from hiyouga/hiyouga-patch
[asset] update wechat

Former-commit-id: fdcc78b639596ecae135d2ae726ff35a40b6f113
2024-11-20 11:46:54 +08:00
hiyouga
505edd4da0 update wechat
Former-commit-id: 2f959c73b59302f3b7cc8a07eae06326d95e7e1d
2024-11-20 10:57:30 +08:00
Ting
e27a0c3d53 code refactor
Former-commit-id: 40627c601efc9f144a227dded8c6b40babff4e8b
2024-11-19 20:33:18 +08:00
Ting
32656bc50d update
Former-commit-id: f566ecc8d1f04615351acbe4f8480b75b2daed42
2024-11-19 19:12:10 +08:00
Ting
bf2b8df540 update
Former-commit-id: ef6e14550dd76810285cee9c268590d1d9423e54
2024-11-19 19:10:07 +08:00
Ting
7ad5b5c088 support efficient tokens calculation on sft/dpo
Former-commit-id: b9f00286d8a017ed9fd2876986da3b4d7034ef07
2024-11-19 17:15:47 +08:00
hoshi-hiyouga
a2a9936e1f Merge pull request #6065 from hiyouga/hiyouga-patch-1
[misc] fix dep package version

Former-commit-id: 9c0f6556eeeef4f24b589c15aebfd68fd6f998c6
2024-11-18 21:13:59 +08:00
hoshi-hiyouga
618a8e6c9f fix #6061
Former-commit-id: 4ac5b97011225b1fd5fa741c1335948d721489ac
2024-11-18 20:56:44 +08:00
hoshi-hiyouga
acd70faf17 Merge pull request #6052 from hiyouga/hiyouga-patch-1
[trainer] fix DPO metrics

Former-commit-id: 45f32916ce3e0f1d242b91bbf9dbce2c0200f82d
2024-11-16 16:20:12 +08:00
hoshi-hiyouga
9815d1712c fix #6050
Former-commit-id: dc828218726704ff0453a2d13535663ac6ad7833
2024-11-16 16:11:16 +08:00
hoshi-hiyouga
e3a0640659 Merge pull request #6046 from hiyouga/hiyouga/add_code_model
[model] add qwen-coder and opencoder

Former-commit-id: 6c0847899d8b4f36bc362500f6ecb1c9cc14d7ea
2024-11-15 21:58:03 +08:00
hiyouga
d4e0010027 add qwen-coder and opencoder
Former-commit-id: 431ac4892cdddba802a02b285031a797e278d0eb
2024-11-15 21:48:38 +08:00
codingma
d6b9a2024b Merge pull request #6022 from codemayq/main
update wechat

Former-commit-id: 8e5aad3ffa129070a705bd7709f690d7cb6a1978
2024-11-14 10:03:46 +08:00
codemayq
625ae6f456 update wechat
Former-commit-id: fc1aa8f45c46205ad23e827c493a55ca9f0f06c9
2024-11-14 10:02:06 +08:00
XYZliang
1c1e48a570 Increase shm_size to 16GB in docker-compose.yml to optimize shared memory allocation for large-scale model fine-tuning tasks.
This pull request increases the shm_size parameter in docker-compose.yml to 16GB. The goal is to enhance the LLaMA-Factory framework’s performance for large model fine-tuning tasks by providing sufficient shared memory for efficient data loading and parallel processing.

This PR also addresses the issues discussed in [this comment](https://github.com/hiyouga/LLaMA-Factory/issues/4316#issuecomment-2466270708) regarding Shared Memory Limit error.


Former-commit-id: 64414905a3728abf3c51968177ffc42cfc653310
2024-11-13 10:13:59 +08:00
hoshi-hiyouga
8ae2056b59 Merge pull request #5990 from hiyouga/hiyouga/dev_vllm
[generate] fix vllm config args

Former-commit-id: 3eebae892be74e6d9d4e7d1f6f1fae00080957f9
2024-11-11 14:10:35 +08:00
hoshi-hiyouga
9c394f11ef fix #5988
Former-commit-id: 8d70edf39bce7cb7be272f0bd2820306adf093ad
2024-11-11 13:57:14 +08:00
hoshi-hiyouga
662093b38c Merge pull request #5984 from hiyouga/hiyouga/wechat
[readme] update wechat

Former-commit-id: 2176224f4b672f623624e906e983dfd892f9f903
2024-11-10 22:08:55 +08:00
hiyouga
e928f7fc4c update wechat
Former-commit-id: f2a44e1a2ad9c7029100dc76dd3abca47de734c4
2024-11-10 22:08:10 +08:00
hoshi-hiyouga
82344629af Merge pull request #5982 from hiyouga/hiyouga/vllm_args
[args] add vllm config

Former-commit-id: 1ca6b1582fe5743434cba855e4e7fbec3810ab1f
2024-11-10 21:37:18 +08:00
hiyouga
0d18cca0db add vllm config
Former-commit-id: 58ab4579dc81a1dcea2bf5938ba3f3116cecfc76
2024-11-10 21:28:18 +08:00
hoshi-hiyouga
0386fa6a4f Merge pull request #5973 from JJJJerry/fix_vllm_generate
fix VllmEngine: 将inputs参数替换为prompt

Former-commit-id: 40a2fcc02dad2f1633c117d457651b221b8c5ae0
2024-11-10 21:04:38 +08:00
hoshi-hiyouga
d7476aa55b Update vllm_engine.py
Former-commit-id: a543bc478dfb3472d5d81e2f81922d5ab3b90373
2024-11-10 20:57:00 +08:00
JJJJerry
d996bea1c7 fix VllmEngine: 将inputs参数替换为prompt
Former-commit-id: 1d04078bb5d460f0cb3d26798bd2f0e43c8a0467
2024-11-09 11:45:59 +08:00
hoshi-hiyouga
1e00de38cb Merge pull request #5971 from hiyouga/hiyouga/fix_webui
[webui] fix extra args

Former-commit-id: adc5849ce75cc8eda800c73c59b1f44d3108e992
2024-11-09 00:25:24 +08:00
hiyouga
d7e35ddcaa fix extra args
Former-commit-id: eb294fed1319e97657b54b9aa479d87734c711dc
2024-11-09 00:24:27 +08:00
hoshi-hiyouga
162f7028fc Merge pull request #5970 from hiyouga/hiyouga/fix_beam
[generation] fix vllm v0.6.3

Former-commit-id: 39e330196d8e2774ac43d6f37ccabc0a07efd970
2024-11-08 23:58:15 +08:00
hiyouga
97f4451912 fix #5966
Former-commit-id: 8f3a32286ebcfb3234e3981db2292dd165b1568d
2024-11-08 23:49:16 +08:00
hoshi-hiyouga
265875fffd Merge pull request #5929 from hiyouga/hiyouga/dev_wechat
[readme] update wechat

Former-commit-id: 707ff5a3703ead7b1d374d928f92ed8a128573f0
2024-11-04 16:44:31 +08:00
hiyouga
bf2959c175 update wechat
Former-commit-id: 882635cac3419193c78202fa5fb854c97acea9ed
2024-11-04 08:43:21 +00:00
hoshi-hiyouga
2e6dd72539 Merge pull request #5927 from hiyouga/hiyouga/dev_fixmmchat
[fix] chat engines

Former-commit-id: bcbd1bebb0c2c1f9bfbe920c62008383cb044dba
2024-11-04 16:36:23 +08:00
hiyouga
1598e5d355 add image input type
Former-commit-id: ffa39ba3db0dbfd375cdf20b9f3cbecd359be1a1
2024-11-04 08:27:20 +00:00
hiyouga
2360d63ebc fix chat engines
Former-commit-id: 8c88065c38d0e7dd60e06e27c7f921f7931471ee
2024-11-04 08:18:12 +00:00
hoshi-hiyouga
d68af5b04a Merge pull request #5926 from hiyouga/hiyouga/dev_deps
[version] update datasets version

Former-commit-id: 22ee197a40566cec092f957dd81458bf00caf9fa
2024-11-04 16:04:00 +08:00
hiyouga
3730fc046f update datasets version
Former-commit-id: c5fae465ec8cbc30f9e91e6c32b88e74c805874a
2024-11-04 07:52:26 +00:00
steven
7f7ee0a660 support granite3 models
Former-commit-id: 6eefb4d7d25879db42cefae8332ca9db88bff851
2024-11-04 10:35:03 +08:00
hoshi-hiyouga
e3fb3c313c Merge pull request #5914 from hiyouga/hiyouga/dev_read
[misc] update readme

Former-commit-id: 04c10d2e80b7f7e516eba67fea420498a1238bb5
2024-11-02 21:44:10 +08:00
hoshi-hiyouga
9d463b611c Merge pull request #5475 from menibrief/main
Fix phi-3-small issues 

Former-commit-id: 9a42c5f76f4fff3203ea0ceac08ea5043e1519d6
2024-11-02 21:31:34 +08:00
hiyouga
feb547aa99 fix phi3 template
Former-commit-id: 2e843d989e946725e2dc096d6540531eaaf5b782
2024-11-02 21:31:23 +08:00
hiyouga
f05685c7cf update readme
Former-commit-id: e7ed5091e1f8fb35e458f368558ceac71c6983b4
2024-11-02 21:28:04 +08:00
hoshi-hiyouga
8c2b7aa1ab update template
Former-commit-id: 478cbb1aa72f218df37b5a4686db2248ad2605dd
2024-11-02 21:21:22 +08:00
hoshi-hiyouga
d99e164cad Merge branch 'main' into main
Former-commit-id: 5f14910910154ba569435e7e68acbd6c30f79e80
2024-11-02 21:20:27 +08:00
hoshi-hiyouga
7dbb338df7 Merge pull request #5913 from hiyouga/hiyouga/dev_metrics
[train] support gather DPO metrics, fix return output

Former-commit-id: 344ff76d26a42c859f31cd03765b1b613ffe6bfa
2024-11-02 21:13:43 +08:00
hiyouga
604f4005c9 fix webchat
Former-commit-id: ba10d54bf93c54ab8f691ea53bff850e3595a1a6
2024-11-02 21:04:18 +08:00
hiyouga
c2766af6f4 fix dpo metrics
Former-commit-id: 4270f7dfb9a12471c91f6c03dce7ca6fd88566e1
2024-11-02 20:59:01 +08:00
hoshi-hiyouga
e7b11e4fdb Merge pull request #5880 from sd3ntato/make-image-parametric
make base image parametric.

Former-commit-id: 07e5088851b3a175ad9cfc83268159eac4334031
2024-11-02 20:26:14 +08:00
hoshi-hiyouga
5ad86fc71d Update Dockerfile
Former-commit-id: 5e8a619d1d20048ad912a1f6d9ccdae5740811bc
2024-11-02 20:20:26 +08:00
hoshi-hiyouga
6f79974e8b Merge pull request #5910 from Cuiyn/index
Support Index series models.

Former-commit-id: c58cc22d06eb1a466ad92601ceb74c9bae6abb51
2024-11-02 20:16:54 +08:00
Cuiyn
51177c933a fix: rename to Index-1.9B-Charater-Chat and Index-1.9B-Chat-32K
Former-commit-id: ecca9db66ba1f0fe903a9e02eca317c0bbb28a5f
2024-11-02 20:04:14 +08:00
hoshi-hiyouga
0f53217bbc Merge pull request #5912 from hiyouga/hiyouga/dev_logging
[misc] support rank0 logger

Former-commit-id: 83535bbe8bf50d9653265437d379fcdd8c82b989
2024-11-02 18:48:41 +08:00
hiyouga
e83cb17f97 support rank0 logger
Former-commit-id: c38aa29336f286266553da4909a7267d7ef21f37
2024-11-02 18:31:04 +08:00
Cuiyn
7806bde8ad Add support for Index
Former-commit-id: a15a69ab4417c6f3273c874cf7ee2c34a5a64141
2024-11-02 13:45:27 +08:00
hoshi-hiyouga
4b2c47fcae Merge pull request #5909 from hiyouga/hiyouga/dev2
[data] support auto convert for single image, add image_dir argument

Former-commit-id: bd08b8c441c47076faa03cc1efde21b22f14f058
2024-11-02 13:43:04 +08:00
hoshi-hiyouga
33e8bfc3ae Merge pull request #5907 from hiyouga/hiyouga/dev
[data] fix template replace behavior

Former-commit-id: 8408339d8388a610a4e5fe303086d7536d1e72d5
2024-11-02 13:42:53 +08:00
hiyouga
ac677205c9 fix #5904
Former-commit-id: bfe1abd7afe4595135b568783753d064cb6e0b28
2024-11-02 13:08:15 +08:00
hiyouga
7fa46a24df fix #5883
Former-commit-id: 24da9f59b0bf4874506bbf1ec214f3d5ca43d943
2024-11-02 13:06:34 +08:00
hoshi-hiyouga
7555c54c9f Merge pull request #5906 from hiyouga/dev
[test] update tests

Former-commit-id: 3ef7d590b13301e1c5531ec5942f4a65dc44d47e
2024-11-02 12:50:43 +08:00
hiyouga
3f7c874594 update tests
Former-commit-id: 93d3b8f43faf4a81b809d2f7d897e39bdb5475c3
2024-11-02 12:41:44 +08:00
hoshi-hiyouga
25093c2d82 Merge pull request #5895 from hiyouga/dev
[inference] support multiple images

Former-commit-id: 0a55e60693ab15d92fbe3d7d536408e26228ab82
2024-11-01 16:52:55 +08:00
hiyouga
2eba98e152 add examples
Former-commit-id: e824b715ad4bf885241b245b12d75563adab2e26
2024-11-01 08:41:54 +00:00
hiyouga
8ecc12ee2a support multiimage inference
Former-commit-id: e80a4819274d46ac9e85db7469dc59d7c4e323c7
2024-11-01 07:25:20 +00:00
Valerio Mariani
1ab3ea21ce make base image parametric.
default `BASE_IMAGE` is nvcr.io/nvidia/pytorch:24.02-py3 for retro-compatibility


Former-commit-id: d5b2def7c029d6f808a97cb062340810e0cd075d
2024-10-30 21:53:32 +01:00
hoshi-hiyouga
9108df2b97 Merge pull request #5873 from hiyouga/dev
[misc] update readme

Former-commit-id: 641d0dab08d96a93c34657742213d8994d9ed476
2024-10-30 17:14:44 +08:00
hiyouga
7487bd7b1f update readme
Former-commit-id: 2417b70a620ec3bba7581c1a444e09c2440a58a0
2024-10-30 09:14:01 +00:00
hoshi-hiyouga
efda735f32 Merge pull request #5871 from hiyouga/dev
[loss&ui] fix incorrect loss of vlms, add extra args to ui

Former-commit-id: b2d4b9a7a870aba92ed6e74b7805d606ddc0edbc
2024-10-30 17:13:17 +08:00
hiyouga
584ce3a105 fix incorrect loss value for vlms
Former-commit-id: 30567a1487727473950104718e626ff660f10cbb
2024-10-30 08:56:46 +00:00
hiyouga
1b02915d19 tiny fix
Former-commit-id: 0c22da4f1cc710b471f6d511d50ce878521173ca
2024-10-30 08:56:29 +00:00
hiyouga
aba4268607 support extra args in llamaboard
Former-commit-id: 86e5affc0d5f5682a20b28d27f80e0015b36fdd9
2024-10-30 08:55:54 +00:00
hoshi-hiyouga
5142faca8f Merge pull request #5581 from Kuangdd01/pixtral-patch
[WIP] Support Pixtral-12B

Former-commit-id: 9009a467e621a17ad9fa25bb30fb9ac9ee15df97
2024-10-29 22:29:10 +08:00
hoshi-hiyouga
15786539d7 fix bug
Former-commit-id: bb0afda8fbb7d3556c1742bccf0b33ee3bf0f0b6
2024-10-29 22:19:04 +08:00
hoshi-hiyouga
49054329d0 Update mm_plugin.py
Former-commit-id: 049c554aee25cf1e29bee88dfb21381b3a4a2947
2024-10-29 22:16:22 +08:00
hoshi-hiyouga
54961946ac Update template.py
Former-commit-id: c3239ba6b24481b092e86ce94a6337fba18c25c0
2024-10-29 22:11:21 +08:00
hoshi-hiyouga
2179b91acb Update visual.py
Former-commit-id: 0baa7735f64cbef9bd90e1db485c120b4c1c88bd
2024-10-29 22:10:29 +08:00
hoshi-hiyouga
fb8f35558a Update collator.py
Former-commit-id: f745c4b28f532c7084d4b8522c972e735729ecee
2024-10-29 22:03:42 +08:00
hoshi-hiyouga
90cd3538de Update hf_engine.py
Former-commit-id: 6e212fdab5f48c955db250ecfc197b89f8856e4b
2024-10-29 22:00:59 +08:00
hoshi-hiyouga
eca50b89a2 Update README_zh.md
Former-commit-id: 8fa20bf4272666e0ed9bcbfee8e4fe66801ef10c
2024-10-29 21:58:03 +08:00
hoshi-hiyouga
2876b429bc Update README.md
Former-commit-id: 1b57df074ab4deb29749086ccb10b459eebf5143
2024-10-29 21:57:28 +08:00
hoshi-hiyouga
acfff4319a Merge pull request #5801 from NLPJCL/main
使用了 LLaMA Factory 的项目:RAG-Retrieval 使用LLaMA-Factory作为生成方法做Reranker任务的微调框架。

Former-commit-id: 4ff6e564f8a03abda7a853744d14abe7451991c8
2024-10-29 21:20:16 +08:00
hoshi-hiyouga
b86b869187 Update README_zh.md
Former-commit-id: 08d9a03c30b7aebf74bef7f59e6aea229af2aeb3
2024-10-29 21:19:17 +08:00
hoshi-hiyouga
233556d1c7 Update README.md
Former-commit-id: a76478c127bc98749079fbc7e5aacd6e60648f37
2024-10-29 21:18:15 +08:00
hoshi-hiyouga
4f10d3e28c Merge pull request #5857 from hiyouga/dev
[train] fix saving processor

Former-commit-id: a7c79d8f6a22b93dc52f3b6ba7145cb27d54f30c
2024-10-29 21:12:04 +08:00
hiyouga
13c7e873e0 fix #5749
Former-commit-id: 23dbe9a09999fe0f9eb2902a40e33b36db4ca584
2024-10-29 13:02:13 +00:00
Kingsley
3053a806e9 Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 67f59579d79e97689a4b3cba7101a423c30dab2b
2024-10-29 21:01:25 +08:00
hoshi-hiyouga
6cd0d7da29 Merge pull request #5852 from hiyouga/dev
[misc] several important updates

Former-commit-id: 935adaeed948ef0d6df407bc432ae93ad46d0d97
2024-10-29 20:30:02 +08:00
hiyouga
d183966a5d fix pissa
Former-commit-id: 51e5f962474739bbf396782afdaa68743636fe90
2024-10-29 12:18:45 +00:00
hiyouga
825ea1c72d fix #5747
Former-commit-id: ae045c884f8ac2aa0ea27592e0757b7bca2dba13
2024-10-29 10:47:04 +00:00
hiyouga
0d8aa6e6ef use pre-commit
Former-commit-id: 21db8ed2f4a0eba203754a92ce0741538e8ee709
2024-10-29 09:07:46 +00:00
hiyouga
163cf2ba5c update requires
Former-commit-id: 77666bd2278a3cfe5b567f4fe285b0f93871d166
2024-10-29 16:10:07 +08:00
hiyouga
6989b8c341 update wechat
Former-commit-id: 8723922923383b7f3eb56f5d6d54f4a02b589a5a
2024-10-29 15:46:10 +08:00
grok
c24d477bdb Update README_zh.md
Former-commit-id: 6fcabb334920c3145c7820fee4cd84809585f50f
2024-10-23 23:50:56 +08:00
grok
3e3969784f Update README.md
update english readme

Former-commit-id: 7627ef09088ecbc234c08c0cb4743cbaee576b76
2024-10-23 23:49:47 +08:00
grok
823d7f5c81 Update README_zh.md
Former-commit-id: 18a7f3ff76aa8aae66dd18db49ed3cd13345d5c9
2024-10-23 23:36:14 +08:00
hoshi-hiyouga
f03b20b267 fix #5797
Former-commit-id: b4c7dd3ac5615ccb52d7627db635d33336e51951
2024-10-23 20:49:44 +08:00
KUANGDD
9d1f079ca5 rm comment
Former-commit-id: c1d17b0f013f40b48322cb13979fe3726dc124a6
2024-10-23 15:50:59 +08:00
KUANGDD
b9c6fcfe98 rm useless code
Former-commit-id: f5c1cdfaab939fb970393452081950a4b6e3604d
2024-10-23 15:38:11 +08:00
KUANGDD
9079967ecf Merge branch 'pixtral-patch' of https://github.com/Kuangdd01/LLaMA-Factory-X into pixtral-patch
Former-commit-id: eb35e76d502cff9316e8c7bdb312502d9272bdf0
2024-10-23 15:32:50 +08:00
KUANGDD
006b708b57 rm import torch
Former-commit-id: a8571844569416b59d7e9c5fcc4f9a4809d8700c
2024-10-23 15:32:33 +08:00
Kingsley
a7a5a5671f Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 0d3106e9fad565fbe56b8de57dd6ea373944eb99
2024-10-23 15:30:03 +08:00
KUANGDD
00545ebbe5 Merge branch 'pixtral-patch' of https://github.com/Kuangdd01/LLaMA-Factory-X into pixtral-patch
Former-commit-id: 341a79fb96c65b35985d2982988431fd0eea5277
2024-10-23 15:28:19 +08:00
KUANGDD
62cbcb646a modify style & little change
Former-commit-id: 9d6143e36a12e0f295139d057aeb1843535435cf
2024-10-23 15:24:07 +08:00
hoshi-hiyouga
bdb77bc85a fix test
Former-commit-id: 74a79cc0599b047a691c427d16344a824b21e0f3
2024-10-22 12:35:36 +08:00
hoshi-hiyouga
b7b30fc961 fix #5768
Former-commit-id: d155b7008c7c99a91fd8d12cf910318318138920
2024-10-22 11:06:22 +08:00
hiyouga
63f0f9cf5d update wechat
Former-commit-id: ed9b99b80d9c23cfca8964ccfce280775ae55fcb
2024-10-17 21:08:28 +08:00
hoshi-hiyouga
8fb211ad0e Update misc.py
Former-commit-id: 769fbb6349006effa261f40fc055f670fae3e98d
2024-10-17 19:48:51 +08:00
hoshi-hiyouga
af50c03879 Update loader.py
Former-commit-id: 93b9067dfc44d3a8570c39831539a8aa3e27e2db
2024-10-17 19:48:12 +08:00
hoshi-hiyouga
6fbf77aa54 Update README_zh.md
Former-commit-id: 110e4c548dac4a1838d069d312d9f27af90cb1e3
2024-10-17 19:47:33 +08:00
hoshi-hiyouga
79433fb6a6 Update README.md
Former-commit-id: 1fea87183561559f140f8de9b869e893ff8a3378
2024-10-17 19:46:36 +08:00
BUAADreamer
16d4149c25 tiny fix [skip ci]
Former-commit-id: 1724a58b478d7960ed07e864620249091b242e34
2024-10-16 15:55:30 +08:00
KUANGDD
a24f94a36c remove useless codes
Former-commit-id: 9b2642a2b53d3392e95061ed0f2c8dc10580c9e8
2024-10-16 01:14:51 +08:00
KUANGDD
9c4941a1ea fix bug for webui infer
Former-commit-id: 7ea29bbfe03550ac59ff9cb01a4bc41c95ac3adf
2024-10-16 01:09:33 +08:00
Kingsley
bcb40fddc0 Merge branch 'pixtral-patch' of https://github.com/Kuangdd01/LLaMA-Factory-X into pixtral-patch
Former-commit-id: 3d51caa053823a5ca793b818c7f464662e5b5f39
2024-10-15 17:09:56 +08:00
Kingsley
ae869639dd add extra test for pixtral mm_input
Former-commit-id: 0fc949783dec2d038dc3d1bf52051c256b69ac20
2024-10-15 17:09:24 +08:00
BUAADreamer
66ee9f0489 tiny fix [skip ci]
Former-commit-id: 58b97197b8aea2820c1b7eb338753dba6b22f3d7
2024-10-15 13:53:33 +08:00
Kingsley
9a9716c228 Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 8f3bff456be302d4394892566af7c0e10fe6d4d6
2024-10-15 13:41:10 +08:00
BUAADreamer
a3f37777c1 fix some
Former-commit-id: 25641af04c98e902ff024c8fa7b4c2c36ed797de
2024-10-15 13:30:41 +08:00
KUANGDD
5e440a467d plugin test & check
Former-commit-id: 2df2be1c47aded0132b5cc86acd3926dca585bc1
2024-10-15 12:12:46 +08:00
hiyouga
7ba5488569 fix #5705
Former-commit-id: 3df39f37e1b7988720f36729830889a4c05399b1
2024-10-15 10:10:16 +08:00
KUANGDD
df722bf18e required transformers version
Former-commit-id: 9f44598b92e72cf8dd923eb229f4637ab9287948
2024-10-14 21:11:09 +08:00
Kingsley
2c5f912e16 remove bs condition
Former-commit-id: 962b9730a7a2940a0d4e5c76d1fe41d0fef76547
2024-10-14 16:55:59 +08:00
Kingsley
8ea1c5c69e Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 95330893c5cd290430a0a2a4e4afa87afab2eb88
2024-10-13 17:42:02 +08:00
hiyouga
92de726102 fix #5668
Former-commit-id: 40ceba500bab7452b8671a9fbcd14bbf4a8f6f37
2024-10-12 01:24:43 +08:00
hiyouga
e90a1199da tiny fix
Former-commit-id: 3af57795dda5d236200bad4aa3f2e29ae8930fe2
2024-10-11 23:51:54 +08:00
hoshi-hiyouga
012f4fef6b Merge pull request #5665 from johnnynunez/main
vllm 0.6.3

Former-commit-id: 228dd1739e98a8ea0270c40edff1f30591c30059
2024-10-11 23:45:58 +08:00
hoshi-hiyouga
e7e8d006cc Merge pull request #5642 from huniu20/main
[hub support] add modelers hub support

Former-commit-id: bc80ea9a51400dea8680087edde3489eb7df9a0a
2024-10-11 23:45:17 +08:00
huniu20
5a3280ebee bugs fixed
Former-commit-id: 843b5d85e98b312e5d41ce62ec10e199011beb8c
2024-10-11 19:56:13 +08:00
Johnny
27be1e2122 Update parser.py
Former-commit-id: e5849cdcce109e15547edcf9a692e7c13d625e5a
2024-10-11 12:29:33 +02:00
Johnny
39929bda5a Update setup.py
Former-commit-id: cb56673675a9d2ba359dd6d9a561084b9bad7bfd
2024-10-11 12:29:09 +02:00
huniu20
e8e98bb125 add om_hub_token argument
Former-commit-id: 7b91be33c9cd8473453716f0c4c6dec924304efc
2024-10-10 17:16:46 +08:00
huniu20
132c1f1b0f 1. add model and dataset info to support webui
Former-commit-id: 0f669f221a31622ec7a53d0baab5da6a7891f9b6
2024-10-10 16:46:34 +08:00
huniu20
26e897e861 1. add modelers hub support
Former-commit-id: 24ebe187e360753666b768685a0dcc78054bb702
2024-10-09 17:21:37 +08:00
Kingsley
5523a6fd2c Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 93a441a6b746e9a933dad8c45553fb5b68bf2b34
2024-10-08 21:04:08 +08:00
hiyouga
4464a6ff5b tiny fix
Former-commit-id: 451d271718a8026056d0f7d7b8ab333391d24ad4
2024-10-08 17:48:56 +08:00
hoshi-hiyouga
a95fe78ae2 Merge pull request #5546 from chengchengpei/cpei/refactor
1, log exceptions in details; 2, check processor is None before calling it

Former-commit-id: f8a2cc61054cec215d658159dc2d6fbacf6624e9
2024-10-08 17:46:54 +08:00
hoshi-hiyouga
c639e52c6b Merge branch 'main' into cpei/refactor
Former-commit-id: 2c6262c3cd57906806e53aecd4e5a4423399c1e0
2024-10-08 17:31:17 +08:00
hoshi-hiyouga
d650e461f9 Merge pull request #5615 from johnnynunez/patch-1
Update setup.py (Compatible with Jetson)

Former-commit-id: 89ba4513ae5786c396df9653c3bc8dfdc5e716af
2024-10-07 16:50:34 +08:00
hoshi-hiyouga
b855d3421e Update parser.py
Former-commit-id: 1ce0b42b1e30cb5419c91702a499f23d52db43ee
2024-10-07 16:27:23 +08:00
hoshi-hiyouga
ef87942a42 Update setup.py
Former-commit-id: c2e947de28841c1125991c4ebd60c13f763bf027
2024-10-07 16:26:50 +08:00
Johnny
059c2ffbea Update parser.py
Former-commit-id: 4e638777ebcbf7dea22011361fb341bafe6ba9d9
2024-10-07 10:17:45 +02:00
Johnny
93f14bf121 Update setup.py
Former-commit-id: 6b78d02175c3e03f7304aed64b9fa21e0a71dd0d
2024-10-07 10:16:53 +02:00
codemayq
20cf39ef63 Merge remote-tracking branch 'origin/main'
Former-commit-id: 283017ec52b35b4158b512c12badb13897e20a0a
2024-10-07 12:06:46 +08:00
codemayq
139811bd80 update wechat
Former-commit-id: c9edc4b4e93171c0b99656e7384d95a99c272dd0
2024-10-07 12:06:02 +08:00
hiyouga
74653597f1 update readme
Former-commit-id: 1a7483c1a5fb49dba660f21beb45784ebd829c92
2024-10-07 11:31:18 +08:00
Johnny
9a6045eee6 Update parser.py
Former-commit-id: 6c1aef55604649a956fe928d89280626923815b8
2024-10-06 20:34:19 +02:00
Johnny
332614579c Update setup.py
Former-commit-id: e57f607cb4a6a59b695483b760a0b7e3b762695a
2024-10-06 08:53:55 +02:00
hiyouga
56132983cf fix #5611
Former-commit-id: a45f3f5461e2936b9e119eda2ef4d8c7a4131740
2024-10-06 10:34:55 +08:00
hiyouga
2b3173e5d2 fix #5611
Former-commit-id: eb2db2af8ec061205d7370baa8f15bdaf34ed31c
2024-10-06 10:33:11 +08:00
hiyouga
4bae540cd6 update wechat
Former-commit-id: a9a9ba85740b3d34b2e467ea66bc6eae7561e4ba
2024-10-06 10:13:05 +08:00
hiyouga
e51a6f6367 update wechat
Former-commit-id: 020ef628f9beab3feac82dd65fd8057a0e731bbb
2024-10-01 08:20:56 +08:00
Kingsley
f3ac97a749 Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: e53f47c0b3de491d4d9b31c995f9cea100f98896
2024-10-01 00:52:31 +08:00
Kingsley
dd2d1c3154 unfactor md
Former-commit-id: c668568bc73914ba071a4121c4fec1ee7f2ab76c
2024-09-30 23:36:16 +08:00
hiyouga
4df090ff48 fix #5542
Former-commit-id: fe7ffccdb9a45b31e20ab7e88282a75b45504a97
2024-09-30 23:28:55 +08:00
Kingsley
6729ed2c7e sync with former
Former-commit-id: 9ddb84052e3cc72e21a92b8103caa179a35859c4
2024-09-30 20:27:05 +08:00
Kingsley
ececd68f9a register model fix
Former-commit-id: 15d555c8c523ac2252d55614773073c57db0e025
2024-09-30 20:04:47 +08:00
Kingsley
94ce8f561f fix some errors due to inconsistency of model cards
Former-commit-id: 2166b9bc6ba35760ff85b63620af9fa0213a4c78
2024-09-30 19:58:34 +08:00
Kingsley
4f85098088 Merge branch 'hiyouga:main' into pixtral-patch
Former-commit-id: 9ac0fde3f29cfd98e08c53a0e52bf472240ae2e7
2024-09-30 19:33:29 +08:00
hiyouga
3720618c63 add patch processor func
Former-commit-id: 45841bb646afa9d0bc2ea4b6b7b107daa67d90f0
2024-09-30 17:07:43 +08:00
hiyouga
b664bcf307 lint
Former-commit-id: cee3dc484be4bdf31ffe1d8b9c60604b84ed6a00
2024-09-30 17:00:33 +08:00
hoshi-hiyouga
a3f99f123a Merge pull request #5585 from shing100/main
Support EXAONE3.0 Model

Former-commit-id: ef84aaceec87f9fd0f3b5fc0305f1f1e39c1cd60
2024-09-30 16:56:08 +08:00
hoshi-hiyouga
85ed108fa6 Update constants.py
Former-commit-id: 4d7bb692348717d89bd5c682890e98bce5118743
2024-09-30 16:47:52 +08:00
hoshi-hiyouga
54e749d1cf Update template.py
Former-commit-id: 02957fc9c3cd04ef5140f093642b94e74ce86b61
2024-09-30 16:39:48 +08:00
Zhangchi Feng
69e801d456 Merge branch 'main' into pixtral-patch
Former-commit-id: 26f45829b453ff1a0c76f6c1ddaba893d48f821e
2024-09-30 12:37:03 +08:00
shing100
b596102bd5 fix chat template Exaone3.0
Former-commit-id: 2964b20eb59687e24a901926c0da1547d7c046ca
2024-09-30 09:44:21 +09:00
Geun, Lim
5f1209bee6 Update README_zh.md
Former-commit-id: 0dfe9f763b09e00457700111e5d7d0d8b9a81e32
2024-09-30 09:25:02 +09:00
Geun, Lim
73b684c7b0 Update README.md
Former-commit-id: d06440e0e71f02f852a7eac5ea6961c8da2a80f4
2024-09-30 09:24:44 +09:00
shing100
b5eb939ce3 update docs Support model Exaone3.0
Former-commit-id: 826675ff14ddfd291e93c91373df9da43d1388a6
2024-09-30 09:19:27 +09:00
shing100
0a633f8098 add Exaone3.0 template
Former-commit-id: 3a9569647f5dbb1dcd9ef6e5cfc39ec8f9b41e89
2024-09-30 09:18:25 +09:00
hoshi-hiyouga
8d20d6c95c Merge pull request #5574 from BUAADreamer/main
support llava-next(video)/video-llava

Former-commit-id: c7b334e698b776f83ee8e9c99c144d2a4dd6d6a0
2024-09-30 00:22:43 +08:00
hoshi-hiyouga
1f1b8e825d Update common.py
Former-commit-id: 2c17d91bb7ae58346c020c46cb7ffabad4deff4f
2024-09-29 23:58:09 +08:00
hoshi-hiyouga
f051bff1e6 Update README_zh.md
Former-commit-id: e472f355f2b0beba9329137ac625059bc36a671e
2024-09-29 23:56:32 +08:00
hoshi-hiyouga
853c95bb89 Update README.md
Former-commit-id: 63148e72710f1c03cf527f2c06830f725fd035f7
2024-09-29 23:55:55 +08:00
hoshi-hiyouga
4269b4b49a Update README.md
Former-commit-id: 2d37fa1255f289b076ff0fabec6d50077a86f6e4
2024-09-29 23:55:21 +08:00
hoshi-hiyouga
6e4d5d9b2a Update constants.py
Former-commit-id: b257b91cd0a71448af520baa8e864920333da848
2024-09-29 23:45:34 +08:00
hoshi-hiyouga
81cf3bff08 Update test_mm_plugin.py
Former-commit-id: 8b50ce516af715a16c53568fb3420d6441aca1ae
2024-09-29 22:59:47 +08:00
BUAADreamer
f1b16236a4 fix template
Former-commit-id: 01ca056965bb63c5e62ec53ffdb51a062bf64371
2024-09-29 22:56:36 +08:00
BUAADreamer
1c69eea995 fix template
Former-commit-id: 96bec6817a43c58e2d4b294dd52fee4cce10b02d
2024-09-29 22:55:45 +08:00
BUAADreamer
b37bb592ec fix constants
Former-commit-id: bec1cb8d55d01ac8b70b9bacd92a227b48cf8336
2024-09-29 22:40:43 +08:00
BUAADreamer
362788cb09 Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 671824d1a1f41ee025afaad1d654da0d70909376
2024-09-29 22:00:35 +08:00
BUAADreamer
87ab7fc01c fix constants
Former-commit-id: 485fc047169afd027ee65d05e3c5c08b371b6c4d
2024-09-29 22:00:01 +08:00
hoshi-hiyouga
15dbd4893e Update requirements.txt
Former-commit-id: 905b7c03ae074bd958afdab6d79e45b30cec5271
2024-09-29 21:51:23 +08:00
BUAADreamer
ddec40ac16 fix style
Former-commit-id: 23916d57c1d22653739dbf913d3e427fcb978a15
2024-09-29 21:39:37 +08:00
Zhangchi Feng
8e164f3594 Merge branch 'main' into main
Former-commit-id: 83abf86657ea38968e953e1dc4a2e8c34471b06a
2024-09-29 21:32:54 +08:00
BUAADreamer
1b71afb277 add more llava-next series template
Former-commit-id: 65a8923f5a7d20d34fabf4f81746fe9b7bc8c84a
2024-09-29 21:29:29 +08:00
BUAADreamer
1ca0ccb4a6 Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 87c8a7e75932d109fd677b5c58ca20206d734cea
2024-09-29 20:55:23 +08:00
BUAADreamer
8231359bbb fix readme_zh
Former-commit-id: 45b01df6a6103d36bbd16204327ac88ea0a02971
2024-09-29 20:55:18 +08:00
hoshi-hiyouga
ec793d16de Update mm_plugin.py
Former-commit-id: ffaea305fc405c9892aa0c9712d98185d9241e69
2024-09-29 20:54:04 +08:00
hoshi-hiyouga
ce0c73c032 Update mm_plugin.py
Former-commit-id: 0257a67cb266dcaee8bfb358d88ef2be2403a2f7
2024-09-29 20:53:34 +08:00
BUAADreamer
ee3fe4226d fix readme_zh
Former-commit-id: 1a757c5ab243c03e2f9c0dcd884e34d752885689
2024-09-29 20:46:47 +08:00
BUAADreamer
534dc58363 fix readme
Former-commit-id: bf0bcbc5ec4ca0182ade283ea9f37012f224f519
2024-09-29 20:45:02 +08:00
BUAADreamer
66213043ac tiny fix
Former-commit-id: 7397827aec55eecad1e70878453387fda0db62b5
2024-09-29 20:38:46 +08:00
BUAADreamer
8ee588248e fix style
Former-commit-id: 6ddea0f3d3ef568378470ce967a0e8d02eeac5dd
2024-09-29 20:30:57 +08:00
BUAADreamer
96d51325ad fix tests
Former-commit-id: 97d1536ee1f85b0a7a84fc6cb390fc502287a74c
2024-09-29 18:00:45 +08:00
BUAADreamer
1e2ea34419 fix some
Former-commit-id: d5c69400cd27cdf0667290f3863a3aab47143eb3
2024-09-29 17:55:40 +08:00
hoshi-hiyouga
e265082db8 update readme
Former-commit-id: a2bd6944cd85fdca83407c1cb354f61e57e2ac78
2024-09-29 05:02:44 +00:00
hoshi-hiyouga
786e013375 Merge pull request #5580 from amrear/main
made a small change to a warning about fa2 for gemma2 models.

Former-commit-id: 5ec161d6bdbb3ecc0ca0b10ea24ac7270618263d
2024-09-29 12:45:03 +08:00
BUAADreamer
615edf937e fix some params of visual regularize
Former-commit-id: 1d09d592d3beacca6a17bb3e5a9728150741e551
2024-09-29 12:38:25 +08:00
hoshi-hiyouga
5df765e376 Update attention.py
Former-commit-id: fe7057a8a3eb111cdaf8349b6ac077d898bf4935
2024-09-29 10:47:41 +08:00
Kingsley
a2452d0b1c Tiny fix
Former-commit-id: 8f13a3627d06a6f0a9b4e35443a415958d9ad1c9
2024-09-29 00:00:23 +08:00
Amirreza A
6ae0e27c8b made a small change to a warning about fa2 for gemma2 models.
Former-commit-id: 94ee105526d817e59bfd91f7bd4161d7cb2fd216
2024-09-28 19:03:36 +03:30
Kingsley
fd79cf8551 tiny fix
Former-commit-id: 3d3cc6705d4575f7f20bf4da2b7dab60b337006b
2024-09-28 22:50:53 +08:00
Kingsley
66e473d519 remove some unnecessary if conditions
Former-commit-id: de06e2678e2168586614242f65939c5772e78774
2024-09-28 02:14:06 +08:00
BUAADreamer
0e33902f61 fix some
Former-commit-id: 7f3f81009e3728fe25b9c063491ee71acc498c35
2024-09-28 01:15:33 +08:00
BUAADreamer
7ab42cb582 modify some style
Former-commit-id: 1b21793543f4a03252e81a86e06ec91fd2a51fa5
2024-09-28 01:07:38 +08:00
BUAADreamer
3501257780 add tests
Former-commit-id: f3be3d21e7efcb2f596ee96f5a97bb53438f2d89
2024-09-28 00:59:14 +08:00
BUAADreamer
5aa1e847d9 add llava-next/llava-next-video/video-llava
Former-commit-id: 6642cd501d55a1657678428ef2aa0c9b99b7e83f
2024-09-28 00:57:03 +08:00
Zhangchi Feng
c576b7ca32 Merge branch 'hiyouga:main' into main
Former-commit-id: 900631755b28692bb150a8cf39354af4e2e986c9
2024-09-27 18:14:39 +08:00
Kingsley
b76116bb6c add pixtral template
Former-commit-id: 7b3336dd97e06a11ec52433ef36980aefdbb45ba
2024-09-26 17:14:51 +08:00
Kingsley
35e44143fd Merge branches 'pixtral-patch' and 'pixtral-patch' of https://github.com/Kuangdd01/LLaMA-Factory-X into pixtral-patch
Former-commit-id: 5e64b0c37165a50296036a6e09e09193fb2ad644
2024-09-26 12:18:25 +08:00
Kingsley
c436d6ea0b add pixtral template
Former-commit-id: 86f5a9be548ef02ce334bba35a529c70e8b3ad7f
2024-09-26 12:11:58 +08:00
Chengcheng Pei
bc7197dcfc address comments
Former-commit-id: 6bfd8442671eec4c0fb63fd34667a44760fd84e2
2024-09-25 21:07:51 -07:00
hoshi-hiyouga
5b128e6b0e Merge pull request #5547 from marko1616/chore/llama3.2
Chore: Support llama3.2.
Former-commit-id: 6b62550af1acda93246e05b37061f2ad7db58e55
2024-09-26 11:38:34 +08:00
hoshi-hiyouga
a73988141b add modelscope models
Former-commit-id: 8e5d12c2c4b687dc0d2c5bc25a916ba9f6ce67c9
2024-09-26 11:22:48 +08:00
marko1616
b70da07977 Chore: Support llama3.2.
Former-commit-id: 885a0b77ab83bf001d7175e2ba440f7928fa4731
2024-09-25 16:08:44 -04:00
Chengcheng Pei
e80c98367e 1, log exceptions in details; 2, check processor is None before calling it.
Former-commit-id: 573e3183e644e8da61a409d96b9adcfacbfc3a7a
2024-09-25 12:59:48 -07:00
hiyouga
fb75821793 update wechat
Former-commit-id: 46e2c1ea9f0b897a8ebe215cead12ff86f24d984
2024-09-25 23:20:55 +08:00
hiyouga
33fc7bec85 fix ci
Former-commit-id: b8e616183cb0252da6efbeac3372b78098b2d6bd
2024-09-25 23:14:17 +08:00
hoshi-hiyouga
eb00df98be Merge pull request #5533 from StrangeBytesOrg/add-docker-args
Add additional install options to Dockerfiles

Former-commit-id: e7f6a9a925bece63dcdca7ce1129b6342c64a52a
2024-09-25 23:04:57 +08:00
hiyouga
f30e0a75c4 optionally replace jinja template
Former-commit-id: ba52103ba7f8f0c856691c4a9a706a6e19e73c1e
2024-09-25 23:02:02 +08:00
hiyouga
52a6667da6 update readme
Former-commit-id: 5eb871cbf492597bf69e5bf8840ec577dc8c0bae
2024-09-25 20:13:04 +08:00
hiyouga
3bcfd73898 update readme
Former-commit-id: 76487764706268a31a3964ac0cbf7799ce5fea30
2024-09-25 19:39:52 +08:00
hiyouga
4aa0493e26 update wechat
Former-commit-id: e4b830a65d20e1cb234c700200889ddd070b0a3b
2024-09-25 19:23:32 +08:00
StrangeBytesDev
d1e766898c Add additional install options to Dockerfiles
Former-commit-id: 237e302b5ccf029dec0c7f859c40f122bf92e1c5
2024-09-24 16:54:46 -07:00
huangpan.foo
fefe2aa0e4 Add deepseek-v2.5 template
Former-commit-id: ee059c393baecc4a4dfd44171d24cab45c73c962
2024-09-21 19:33:30 +08:00
hoshi-hiyouga
944ae8780c Merge pull request #5483 from whybeyoung/main
fix: 修复function call数据集如果 function_call 值的为不合法json,异常提示且中断训练。
Former-commit-id: af8dfb58fd4bd123a76fa8f393cf928995ec91b9
2024-09-19 17:01:52 +08:00
hoshi-hiyouga
1ccc2d198e flat string
Former-commit-id: f2301305637aebc026895a7d4837e5def2c23159
2024-09-19 16:43:42 +08:00
hoshi-hiyouga
e4d26efea9 lint
Former-commit-id: af7f547ecbcae11761aa934f8b25dd5ea8c35516
2024-09-19 16:21:43 +08:00
hoshi-hiyouga
89138b8ab8 fix bug
Former-commit-id: 98b464d2dd4ca303d24ae2bb31989f4458b18146
2024-09-19 16:21:21 +08:00
hoshi-hiyouga
545ca7db99 improve error message
Former-commit-id: 36611d5c098d444454f0e41a15664f14c2975547
2024-09-19 16:06:00 +08:00
ybyang
daa1309466 fix: 修复function call数据集如果 function_call 值的为不合法json,异常提示且中断训练。
Former-commit-id: 953e1a0fb226e63b797cab0007c53d3ebc6456bb
2024-09-19 15:00:10 +08:00
menibrief
4ed2b629a5 fix phi-small template
Former-commit-id: 9c1bbfac2173450c56ded2cf343e3a37ba369b7b
2024-09-18 23:52:30 +03:00
menibrief
c9cd388630 Update README.md
update readme to phi-small template

Former-commit-id: 5519a046a24c8403d094c758f044b00f94a7bbbd
2024-09-18 23:51:36 +03:00
hoshi-hiyouga
27da57b179 tiny fix
Former-commit-id: ed7d3739153fb9a100fa5c3d24bbdf2c797faed0
2024-09-19 02:20:24 +08:00
hoshi-hiyouga
f2dca55ae9 Update README_zh.md
Former-commit-id: 485d6f877268b67cab32b1d3b3fb7823491bd1d2
2024-09-19 02:17:59 +08:00
hoshi-hiyouga
47e4b3724b Update README.md
Former-commit-id: cb2cebcd72721286d763adb49dfade57aed9dc68
2024-09-19 02:16:16 +08:00
hoshi-hiyouga
2d19ba04e3 fix webui
Former-commit-id: f0b930d94a31ed46a605b3e8e3d989fdc344e61b
2024-09-19 02:13:39 +08:00
hoshi-hiyouga
56058e2e84 add qwen2.5 models
Former-commit-id: 92ef62f5025475606e533947b7d9c3cae9bfcdbf
2024-09-19 02:07:54 +08:00
hoshi-hiyouga
90610a9093 Merge pull request #5438 from aliencaocao/patch-1
Add qwen_vl to liger kernel supported list

Former-commit-id: 1a3e6545b2e1d2dab01d2a257130a47da62e747a
2024-09-16 13:40:02 +08:00
Billy Cao
38e955d4a9 Add qwen_vl to liger kernel supported list
Former-commit-id: 7a2958a44f3b99cddb91f7b67fa0dd1c26c1a991
2024-09-14 19:28:20 +08:00
hiyouga
2a5e52db51 Merge branch 'main' of https://github.com/hiyouga/LLaMA-Factory
Former-commit-id: e22ac05fd7a581a0615ef03f514a54f7d7674594
2024-09-14 13:42:47 +08:00
hiyouga
c4e7809ad5 update wechat
Former-commit-id: 9ea2df99e67bde9340f8a9a3e9e00e4e3fd5d841
2024-09-14 13:42:31 +08:00
hoshi-hiyouga
df9f30fdf8 Merge pull request #5427 from HardAndHeavy/update-rocm
Update the ROCm version to 6.2

Former-commit-id: a76617728a1fecefb959a2f25d1ffbff22a56dc1
2024-09-13 10:25:47 +08:00
HardAndHeavy
a39dc400ed update the ROCm version to 6.2
Former-commit-id: b1f9ccb29f6899406253cdde1f3546d6a7353669
2024-09-12 23:46:33 +03:00
hiyouga
5456ec5fe1 update ci
https://github.com/huggingface/transformers/pull/33436

Former-commit-id: ac06b78d615a4a7ab51f7a54be3c22435909cdd3
2024-09-11 20:44:42 +08:00
hiyouga
d2f8bcb890 set dev version
Former-commit-id: 0ded76578450f71dfe6570fbba7caaa65c004f03
2024-09-11 18:56:37 +08:00
hiyouga
acfe212a63 remove windows in ci
Former-commit-id: ba62d3257f6c3c0c4a08b421e0f7eba4b052902f
2024-09-11 18:14:39 +08:00
hiyouga
42b6e1c6c1 fix ci
Former-commit-id: ffac6541a98aa0f5abbb040f7df89952f7188d0c
2024-09-11 18:01:09 +08:00
hiyouga
009500bc6d fix #5411
Former-commit-id: c7e51ff187658eb472c2b234f75d8934c6f7c782
2024-09-11 17:36:42 +08:00
BUAADreamer
75585d01f0 try to past test
Former-commit-id: 0042a144d532aecd0159956d6a275eb9fbfa305d
2024-09-10 13:29:09 +08:00
BUAADreamer
0be477292b try to past test
Former-commit-id: e387216d49cf261c82d77df22424e6360dbcfc2a
2024-09-10 13:25:30 +08:00
Zhangchi Feng
4b6606832c Merge branch 'hiyouga:main' into main
Former-commit-id: 4643089a7dc6a88c391663131333f35b5da5015b
2024-09-10 13:20:24 +08:00
BUAADreamer
16c7326bc5 try to past test
Former-commit-id: 7b4ba0efb658422fd29dca63bac1e9cee8e82af8
2024-09-10 13:12:51 +08:00
BUAADreamer
677d57b7c7 try to past test
Former-commit-id: b0cff7d9096b4b54927ce665fde58b7f34b11439
2024-09-10 12:56:12 +08:00
BUAADreamer
5c53cf3244 resolve confilct
Former-commit-id: 96decf82b872a4ec06450b4440336d38475d1d02
2024-09-10 12:39:17 +08:00
BUAADreamer
f00f4ae9b6 support llava-next(video)
Former-commit-id: 31259e7e0caa9ff6449b4abcee0554e211167178
2024-09-10 12:31:53 +08:00
hiyouga
38505ae9e1 update accelerate ver for schedule_free optimizers
Former-commit-id: bdde35fd2e4a919c1d63ebfc9a0ea8ba0c97e14c
2024-09-09 22:51:08 +08:00
hiyouga
2bb1ee3292 fix mm plugin
Former-commit-id: 6dc2b00fa2bcbdbad71cb0d96e14d75a7db932e2
2024-09-09 22:41:28 +08:00
hiyouga
c52eeb70e7 fix qwen2vl preprocess
Former-commit-id: c93795ae14b1d5a0a3440d18f8197fd53cd013da
2024-09-09 22:33:33 +08:00
hiyouga
3aefdad4ec release v0.9.0 (real)
Former-commit-id: 90d6df622252c6fad985f68b97771c979357e2fc
2024-09-09 01:00:25 +08:00
hiyouga
561ae4d1af fix constants
Former-commit-id: 653fe70acbe44853fa0ad073a9b8391d75ef6c2a
2024-09-08 23:52:30 +08:00
hiyouga
fb9280a0a7 release v0.9.0
Former-commit-id: 54b5c4b8195d23bd9dcc1921af9910d5bdd181fd
2024-09-08 23:43:35 +08:00
hiyouga
0229263fbe tiny fix
Former-commit-id: c9b3870adb60a2aca8cfd82c1a8b8044319bacbc
2024-09-08 23:18:08 +08:00
hiyouga
ec6b85d8f9 update wechat
Former-commit-id: 60114179eb699a7d3906e085f917957c7056d320
2024-09-08 14:18:12 +08:00
hiyouga
dc64166d13 update scripts
Former-commit-id: f2aa02c070b1442bfb58a075f22af25386192bfa
2024-09-08 14:17:41 +08:00
hiyouga
78cf256067 support vllm 0.6.0
Former-commit-id: b6681d7198acf4acbebfe271dd22095e236bc430
2024-09-08 02:26:20 +08:00
hiyouga
f6f58ebef0 fix test case
Former-commit-id: b332908ab4aad392e39f0b8661d100f096d8a6ec
2024-09-08 01:50:51 +08:00
hiyouga
945841503e add test case
Former-commit-id: 52a06efaf8af26d16137ba9095f1fd81e8f61983
2024-09-08 01:40:49 +08:00
hiyouga
0daee7cb39 support activation offloading via unsloth gc
Former-commit-id: fb72a3adb0916232cc9ac9f0c725c02d07b9354c
2024-09-08 01:22:19 +08:00
hiyouga
7ccb86b215 add docstrings, refactor logger
Former-commit-id: 54c69059379d77dc9046c144cbe2d0253de3a4da
2024-09-08 00:56:56 +08:00
hoshi-hiyouga
857d5b9d0a Merge pull request #5388 from yzoaim/cal_mfu_update
update cal_mfu.py

Former-commit-id: 8eac1b929ff7e42f34d443030f9582692ec753db
2024-09-08 00:49:28 +08:00
hoshi-hiyouga
4d8b782268 fix
Former-commit-id: 842c5455b0e7c4b8d307af950304d4ed52bbb3e8
2024-09-08 00:41:45 +08:00
hoshi-hiyouga
4f28e0e5d2 Update cal_mfu.py
Former-commit-id: e71133cab14eed2c071cfd4ce044ae9905447427
2024-09-08 00:39:48 +08:00
-.-
ab1775cd95 update cal_mfu.py
Former-commit-id: 66ec36522c9bf8dfffc1065202362801875a104d
2024-09-07 23:21:35 +08:00
hoshi-hiyouga
4ee9efbd98 fix #5384
Former-commit-id: 36665f3001647b8411ba0e256d1e64eb157abfaf
2024-09-07 01:21:14 +08:00
hiyouga
995491594d tiny fix
Former-commit-id: 76f2e5950483c669a15a961f0554442b6eb5c4a6
2024-09-05 23:41:16 +08:00
hiyouga
52d3c42265 fix ci
Former-commit-id: eb5aa9adce7c01d453d45d2c901e530584e46eb6
2024-09-05 22:39:47 +08:00
hiyouga
5585713182 fix ci
Former-commit-id: 2f939b708f7f183f87aca67aa076db33a3c8a610
2024-09-05 22:27:48 +08:00
hiyouga
3aa6a3e45b add e2e tests
Former-commit-id: 94d5b1bd8f49dabeb9e3c53d634cfb3c06b0241d
2024-09-05 21:52:28 +08:00
hoshi-hiyouga
de277a8ab8 Merge pull request #5372 from LDLINGLINGLING/main
增加了对minicpm3.0的适配'

Former-commit-id: 12743562639ccc6eb0caf170e7123d9844e2b4a6
2024-09-05 21:35:42 +08:00
liudan
1797fe50a4 根据代码规范修改了代码
Former-commit-id: 3d3fbaaff98da327e10bdebb4aedbdf1ec9565e8
2024-09-05 20:17:55 +08:00
hoshi-hiyouga
f6014742fa fix #5366
Former-commit-id: e9bda48c6d7bde135df6456513708a997ada916c
2024-09-05 18:08:09 +08:00
hiyouga
dec6ff046b update data readme
Former-commit-id: 70e36ff2f4b500d987160f3a57d5fb3d4d2007d5
2024-09-05 04:44:49 +08:00
hiyouga
c4d7d76358 update data readme
Former-commit-id: 6055fe02deb3585b4330a7902bf8821dd41ea5cb
2024-09-05 04:25:27 +08:00
hiyouga
4fccc65579 support Yi-Coder models
Former-commit-id: 359ef8bb0ebb8ccf9651ac2b737c5a705dab6bad
2024-09-05 03:12:24 +08:00
hiyouga
666013d09d fix ci
Former-commit-id: 1173f7fc1dbdcf814650bfdf854ade5212fc4738
2024-09-05 03:02:59 +08:00
hiyouga
9f36534b49 fix ci
Former-commit-id: b6a3fdd056d77dbe692053bc22a8923e24ed2256
2024-09-05 02:49:22 +08:00
hiyouga
cc02fb6180 update ci
Former-commit-id: 315284f6272f2510f28b3267015aeb7336721bce
2024-09-05 02:26:10 +08:00
hoshi-hiyouga
ce77a89d8c Merge pull request #5365 from hiyouga/video_finetuning
Support Qwen2-VL Fine-Tuning on Video Datasets

Former-commit-id: 46b1765d0374bfc93d6a3af8669af1c2307814a7
2024-09-05 02:24:58 +08:00
hiyouga
ac33d2f4da tiny fix
Former-commit-id: c122b9f8657d1ca3032b1b6a6cf9cc61f11aaa82
2024-09-05 02:16:49 +08:00
hiyouga
9df7a26e6b video datasets
Former-commit-id: 8cafc7b055a854f483ad1c67f3d487ffd34b5f89
2024-09-05 02:04:17 +08:00
liudan
09cff03026 增加了对minicpm3.0的适配'
Former-commit-id: d7ba97be484bf781d6fe80252ea29eb505b261bb
2024-09-04 23:10:05 +08:00
hiyouga
60d770e4b1 fix test
Former-commit-id: c5e1736470c4c54de5a89ea1c58154b7fed2405d
2024-09-04 22:38:26 +08:00
hiyouga
d5ea05cfff update get template
Former-commit-id: dabad5570bf4a6b1044c963d8f27717030f373ef
2024-09-04 22:36:20 +08:00
hoshi-hiyouga
1dfd1aaf82 Merge pull request #5323 from naem1023/feat/add-dataset-map-batch-size-argument
Add batch size of map function in the preprocessed dataset

Former-commit-id: 8f441c2b3a5bb84dec2c037a541084c0201726c6
2024-09-04 22:09:36 +08:00
hoshi-hiyouga
8ac74c8ccb fix #5228
Former-commit-id: 44d6947e554cd61cff23c297248fff32a5f554da
2024-09-04 19:10:30 +08:00
hiyouga
53aeacae81 fix #5252
Former-commit-id: ebddce5d4a2ebb40ce71462f81701e274eb3c29f
2024-09-04 03:17:54 +08:00
hiyouga
af8c4b4e20 add vl_feedback dataset
Former-commit-id: 57497135bf0a956af9c6893177ee97504b9f34ac
2024-09-04 03:13:03 +08:00
hiyouga
a3d47818b7 fix #5344
Former-commit-id: d41d43a7c37cd10e34c9f399d1a346ffaee641c3
2024-09-04 03:06:06 +08:00
hoshi-hiyouga
a65b5061af Merge pull request #5346 from hiyouga/lazy_image
[exp] Lazyload for multimodal inputs

Former-commit-id: ce7ed6eb99f075e4a3337a86fd6a245bc98c479e
2024-09-04 03:00:53 +08:00
hiyouga
22deca0e9e lazy image load
Former-commit-id: 47ea97fb1ba77de2e8a561904aa8fdc27c3f5025
2024-09-04 02:27:08 +08:00
hiyouga
5ef58eb655 fix #5334
Former-commit-id: 59d2b31e968677263f005f57ae8a56fc758307a7
2024-09-03 19:09:42 +08:00
hiyouga
f837ae8cb5 fix #5338
Former-commit-id: 69d0acacc38dc90a97ce18447f865f525fff086a
2024-09-03 17:45:17 +08:00
hiyouga
982585e375 lint
Former-commit-id: 22959bcdd3b124a642e2acaadc050e36d0520f52
2024-09-03 00:46:25 +08:00
hiyouga
6e98872622 fix #5324
Former-commit-id: a61c8c4890962f3847b19eff31b170cd7f54316c
2024-09-02 23:56:21 +08:00
naem1023
46695e42cc feat: add batch size of map function in the preprocessed dataset
Former-commit-id: 209313eeeab8d1a7c320bd9aa90a5f4656082b7c
2024-09-02 13:52:47 +09:00
hoshi-hiyouga
5af92971bc fix trainer predict
Former-commit-id: 99fd9637bdc25f41fd1abc8a162f1069cb9060d4
2024-09-02 10:15:29 +08:00
hoshi-hiyouga
5c9972a2d5 remove .cpu()
Former-commit-id: a6c6750e8af5bc1ece1dfe6111d3e484fd19ee75
2024-09-02 10:10:53 +08:00
hiyouga
b2a5f49a24 fix mm inference
Former-commit-id: 60fc6b926ead923dbb487b595ed4aa4cbfd94805
2024-09-02 01:47:40 +08:00
hiyouga
f13e974930 tiny fix
Former-commit-id: 3a6f19f017539a2be31e348845a8ed8712275dcb
2024-09-02 01:33:22 +08:00
hiyouga
859823eb23 add image num check
Former-commit-id: ce8c5a264742161101da2094d0fc31c7fa7fb641
2024-09-02 01:31:36 +08:00
hiyouga
549adc888b add pokemon dataset
Former-commit-id: 194064fdae0226dd22522586c9d47c5866a71a8e
2024-09-02 01:02:25 +08:00
hiyouga
65425aeb63 update readme
Former-commit-id: a8f8a2ad8a8c026de528c9bcfb23b65d004bfc96
2024-09-01 23:32:39 +08:00
hiyouga
fd2a99ee5c update wechat
Former-commit-id: 753c5fb36c8b3f9a4488626b0a69396ffcfbbd37
2024-09-01 23:30:57 +08:00
hoshi-hiyouga
69fbecf1fb Merge pull request #5317 from ByronHsu/patch-1
Add liger kernel link

Former-commit-id: 6f9e455af481790aaf16af620ee36f76293e93d0
2024-09-01 23:30:12 +08:00
hiyouga
bfdcc6bacf add rlhf-v dataset
Former-commit-id: 8e49940746c1a6ff910f07dbefbec14af9d0f3c6
2024-09-01 22:57:41 +08:00
hiyouga
236f97b35c tiny fix
Former-commit-id: 55027282cdaa59a470ac89bfb3860504ba9075ff
2024-09-01 21:15:44 +08:00
hiyouga
413a206652 fix bug
Former-commit-id: 64cb947c60398dfdfc2877f898147b0240089ea3
2024-09-01 21:07:49 +08:00
hiyouga
cb776752f6 fix mixed mm inputs and rlhf-v
Former-commit-id: 9967ccb3aef3ca557ad6eafb78c6c99866857008
2024-09-01 20:52:47 +08:00
Byron Hsu
7c0d1a5ff1 Add liger kernel link
Former-commit-id: b8a9cb554efc4c2dedacb48833c5152d2cd2fec5
2024-08-30 17:16:16 -07:00
hiyouga
34dc36462c fix ci (temp)
Former-commit-id: b5063b41449d1f81d2031980d6480a285e359ebf
2024-08-31 02:03:56 +08:00
hiyouga
09a2ecebc4 add test mm plugin
Former-commit-id: a2a8c0b92c49fb1ee65de271aec651e011dcabc4
2024-08-31 01:53:38 +08:00
hiyouga
f31e7e0dfc remove visual_inputs, fix qlora
Former-commit-id: a025c3df61db154bef13033518903bbf846f4fc8
2024-08-31 00:24:51 +08:00
hiyouga
51a0016873 optimize predict vram
Former-commit-id: a244f143f48a01910ce1cd56c0855ef11d62a72a
2024-08-30 23:08:45 +08:00
hiyouga
c883542583 add examples
Former-commit-id: e08045a9468986edf1e84001e6043db0ee2e5265
2024-08-30 21:43:19 +08:00
hiyouga
92c398166d tiny fix
Former-commit-id: bee1bd43b946501690d70e4980205f9d82404296
2024-08-30 03:21:50 +08:00
hiyouga
913ee05e74 fix #5307
Former-commit-id: 8b588c7224e631a96c09f3460effc5dbfca6ec14
2024-08-30 02:45:40 +08:00
hiyouga
a83756b5e9 refactor mm training
Former-commit-id: 3382317e32f88ed377d3e7759bdeaf0f2559d22a
2024-08-30 02:14:31 +08:00
hoshi-hiyouga
98b0c7530c Merge pull request #5290 from simonJJJ/qwen2_vl
support qwen2-vl

Former-commit-id: 727e1848401d306274fb60ba78f66fed577b7b55
2024-08-30 02:10:36 +08:00
hoshi-hiyouga
5730243179 fix bug
Former-commit-id: a8f22d8895c07ce37e8cb34b7014f3e9bcdbf6a3
2024-08-30 02:05:26 +08:00
hiyouga
0e4ee9d9a3 update liger kernel
Former-commit-id: a7dd7d325e68c92c7470c1e9ef83a7c8abcbc616
2024-08-29 20:46:08 +08:00
hiyouga
f153ee13be fix #5292
Former-commit-id: aa1afdc75614868172bd2f9c052647b8f226d3f2
2024-08-29 20:37:47 +08:00
hiyouga
21d3976eea fix #5295
Former-commit-id: ad72f3e06593f124d661d61774def336511716e0
2024-08-29 20:30:18 +08:00
hiyouga
1494fa1f18 fix #5305
Former-commit-id: 364b757e306f7a154359a2bc8245a839f39c4fab
2024-08-29 20:16:01 +08:00
simonJJJ
d9fd8f26cc update
Former-commit-id: 734e019cc1c120c23305d6f6bc1fb5b8e0d21b30
2024-08-28 20:22:46 +08:00
simonJJJ
8a09b1e732 initial-commit
Former-commit-id: aeb85f200bd824748008dae6047c2607dfcdf174
2024-08-28 16:51:35 +08:00
hiyouga
efd60f0306 update wechat
Former-commit-id: 0f5a0f64f798eccd1fe76a74cf537002135e7e85
2024-08-27 12:55:23 +08:00
hiyouga
c2df70e925 add extra requires
Former-commit-id: d14edd350ddf268cfeea0f4e9e3c43f38516b848
2024-08-27 12:52:12 +08:00
hiyouga
7b5834b2dd tiny fix
Former-commit-id: f6ae4e75ddaeb4ac4a527f0141ac5b1afefde10e
2024-08-27 12:49:32 +08:00
hoshi-hiyouga
7cbfd64289 Merge pull request #5237 from marko1616/patch-1
Fix mllm api

Former-commit-id: dbe886ae5cf613f537d70c352cb758a524a14279
2024-08-27 12:24:43 +08:00
marko1616
388c3e4e47 ruff pass.
Former-commit-id: df8d5b6985bb209e841347ee51fc6787d9bcd069
2024-08-27 11:30:16 +08:00
marko1616
53a2b16c38 Update chat.py
Former-commit-id: 1545684c3f176a95554afa64f313f00b53a32a77
2024-08-27 11:27:56 +08:00
hiyouga
c765292093 support liger kernel
Former-commit-id: 72bc8f01111ad69b92a647b54b4af988515d9c34
2024-08-27 11:20:14 +08:00
marko1616
f3778f65f8 Force re check.
Former-commit-id: 3a285217107f3042a4d6b7a60eedcdd07f73627d
2024-08-23 14:43:18 +08:00
marko1616
95500687dd Update chat.py
Former-commit-id: 8eb20929217feed91097f60460802f6c6ba7b92b
2024-08-22 12:24:34 +08:00
marko1616
7f6d267e98 Update chat.py
Former-commit-id: a4f1de9d82743bfd35a6dbc1027242533b22ed5f
2024-08-22 12:14:34 +08:00
hoshi-hiyouga
e9800212fa Merge pull request #5230 from MengqingCao/image
[NPU] Update npu base image

Former-commit-id: 36039b0fe01c17ae30dba60e247d7ba8a1beb20a
2024-08-21 22:13:07 +08:00
hiyouga
f78735528d update wechat
Former-commit-id: 8907150c1ba56ef406838b2a0993f1f8fc6b95b5
2024-08-21 22:07:34 +08:00
MengqingCao
a620fa8be3 update npu base image
Former-commit-id: b3f4acd1b4636d15afdfde61d77af521fff39b19
2024-08-21 09:12:38 +00:00
hiyouga
daebca2368 tiny fix
Former-commit-id: c8b4c7fee5398654683b713ad5c03b5daf13218a
2024-08-20 00:10:52 +08:00
hoshi-hiyouga
a7604a95c1 Merge pull request #5156 from YeQiuO/main
fix Llama-template's system prompt bug

Former-commit-id: 15be2963477e7d3a9fe4330d7701d457dc49b583
2024-08-20 00:09:03 +08:00
hoshi-hiyouga
103132aa99 Update template.py
Former-commit-id: ec72eeca521ba4ec71f0c52de9eec49da2cf0feb
2024-08-20 00:03:33 +08:00
hoshi-hiyouga
033dd1f1dc Merge pull request #5163 from liu-zichen/fix_ppo_optim
fix lr not change

Former-commit-id: da335d42c30df2c2898516e290c0059250d57b63
2024-08-19 23:56:24 +08:00
hoshi-hiyouga
5e19a604a6 Merge pull request #5185 from chenhuiyu/feature/add-sailorllm-template
Add SailorLLM template

Former-commit-id: f59c9bef31429a0775e71b0ee01f84f0d33c3149
2024-08-19 23:51:49 +08:00
hoshi-hiyouga
5582674f06 Merge pull request #5188 from Zxilly/main
fix: report correct device count for intel xpu
Former-commit-id: d39f4a62d3c5a3bbbf39d1eb4b92439acedae18e
2024-08-19 23:51:39 +08:00
hoshi-hiyouga
57b51c8617 Merge pull request #5193 from Ricardo-L-C/main
_is_bf16_available judgment supports npu

Former-commit-id: 5d5bfc83e646ae41701ce208386b56297efd85f0
2024-08-19 23:40:59 +08:00
hoshi-hiyouga
a921505f59 Update template.py
Former-commit-id: 5f3300ec5de564df23c94ebd9662c86708f37ddb
2024-08-19 23:40:16 +08:00
hiyouga
fc1aefa4b1 update readme
Former-commit-id: 3804ddec9e4227c02f0e0d43b7dd240cf15716a8
2024-08-19 23:32:04 +08:00
Ricardo
a9312387bc _is_bf16_available judgment supports npu
Former-commit-id: 384ab8db84eef7d1f6a7643c15c565a7d4906a5c
2024-08-16 02:58:22 +00:00
Zxilly
41a8387195 fix: report correct device count for intel xpu
Former-commit-id: dc36fcc3de721bdd28edd4eed36677e59a7614be
2024-08-15 08:30:43 +00:00
Huiyu Chen
66a7f4f128 Add SailorLLM template
Former-commit-id: 2502833a7755d653e8492cb7f1215dc0105b6ee0
2024-08-15 15:10:14 +08:00
liu-zichen
8a7ab8ab21 fix lr not change
Former-commit-id: ddee718b31a5bf3cb39c5adf3f8e0be8fddf9dbb
2024-08-13 16:33:34 +08:00
codingma
753cb0f9b6 add tutorial and doc links
Former-commit-id: 625a0e32c47aeb72a6fe9c3536914996912e89d4
2024-08-13 16:13:10 +08:00
codingma
919472435f update wechat.jpg
Former-commit-id: 5b9d99ebc617f9830552e15897a347ff9d5bdeb7
2024-08-13 16:12:36 +08:00
“Wzw”
3e159a0a83 fix Llama-template's system prompt bug
Former-commit-id: bcbbf4506300fc132e68a39a9a6dfa5e61497c8b
2024-08-12 19:22:12 +08:00
hiyouga
684d621edc update readme
Former-commit-id: c93d55bfb084fd91436b99dba5a79aa16432e136
2024-08-10 10:17:35 +08:00
hiyouga
a0f1cc7445 update readme
Former-commit-id: 576a894f7734711a5b11ae764f42fa8d00427d4a
2024-08-09 20:46:02 +08:00
hiyouga
bea270042b add magpie ultra dataset
Former-commit-id: c75b5b83c4982a6da1512ad6f9cc4d98cc761094
2024-08-09 20:28:55 +08:00
hiyouga
a8add5c04b add qwen2 math models
Former-commit-id: dc770efb14bd6e18421511912fbb959a3cf9f78d
2024-08-09 20:20:35 +08:00
hiyouga
f8c11bd540 update examples
Former-commit-id: 0a690ada6f9f791e7d013eb89799975b12212ed0
2024-08-09 20:13:46 +08:00
hiyouga
5eacd17090 add adam_mini to readme
Former-commit-id: e2a28f51c635d64ff9de65a37087d89356bdedcc
2024-08-09 20:02:03 +08:00
hoshi-hiyouga
792da85866 Merge pull request #5095 from relic-yuexi/feat-optimizer
Feat optimizer

Former-commit-id: ef482394f0e2820ee8a245f8a6b050a32591b40a
2024-08-09 19:51:33 +08:00
hiyouga
25b9cfa163 update scripts
Former-commit-id: 86f7099fa3fadd9c5a2059361ab5a5e1dbf5b1a2
2024-08-09 19:16:23 +08:00
hiyouga
b5146facff follow #5115
Former-commit-id: c87023d539875cd8e622d40212a5627c9c182fb8
2024-08-09 18:03:00 +08:00
hoshi-hiyouga
397e4daa5d Merge pull request #5115 from YeQiuO/main
fix: `Train on the last turn only` truncate bug
Former-commit-id: 51542cb15fea785d445ecf80bbad0364ebc0cb77
2024-08-09 17:58:27 +08:00
hoshi-hiyouga
fae264f4b9 Merge pull request #5072 from relic-yuexi/main
fix the deepseekcoder template to avoid repeat problem

Former-commit-id: 984961c5507e009b1b41e338e796724578df7021
2024-08-09 16:35:21 +08:00
hoshi-hiyouga
54f57fb354 Update template.py
Former-commit-id: 4f62e1cb243d996d1764c3c86ca234847ad2c022
2024-08-09 16:27:42 +08:00
“Wzw”
13e5fff97a mask_history args verify valid
Former-commit-id: 2fa1e0b2add60142c178e5e21ebaad7132fa5b00
2024-08-08 10:12:01 +08:00
“Wzw”
0bd25c3a6b fix mask_history tiny bug
Former-commit-id: b5ca86cc07d38cf342e351aab16cce4319245792
2024-08-08 10:09:33 +08:00
codingma
0404b17718 Merge pull request #5109 from codemayq/fix-example
fix eval_dataset in example

Former-commit-id: 18e455c232d8c342d68195b118cceacd004ec368
2024-08-07 18:30:05 +08:00
codingma
421d4f91c2 update wechat.jpg
Former-commit-id: 9a48f7e9572a34d671ea22c8a68fce15bc9fb05d
2024-08-07 18:29:48 +08:00
codingma
17c73b44da fix eval_dataset in example
Former-commit-id: 823e7c122bd1ee223b8323aa264a5ead576b2fe3
2024-08-07 18:24:19 +08:00
moontidef
44f7c4dd56 feat: add support for adammini
Former-commit-id: 82bc15dc795f95768b81c25eaaabdc613da30cd8
2024-08-07 10:08:22 +08:00
moontidef
b0d32b2041 fix: rename optimzer to optimizer
Former-commit-id: 40908a36fae3393715f75156867c11e6373fabad
2024-08-07 10:05:01 +08:00
moontidef
1cc927b536 Merge branch 'hiyouga:main' into main
Former-commit-id: 55f32dfbf9fd94d6a4315d87caf034fbdfc3c914
2024-08-06 00:18:45 +08:00
moontidef
733cb9087b fix: fix the deepseekcoder template to avoid repeat problem
Former-commit-id: b82ecbedd0fecd85195217916cba3c21998bd10b
2024-08-05 23:55:45 +08:00
hiyouga
20013e130b fix #5048
Former-commit-id: b7ca6c8dc14f689d0df16684a6121cc0ec24f8ba
2024-08-05 23:48:19 +08:00
hoshi-hiyouga
e703d80536 Merge pull request #5037 from codemayq/feature-gemma-2-2b
support gemma-2-2b

Former-commit-id: c2921b996069f81278ff72049e36f3a422393ca2
2024-08-05 23:27:37 +08:00
codingma
7125b6cf70 support gemma-2-2b
Former-commit-id: dc09d454f285b8584d9017349a9cee3b44eadb72
2024-08-01 13:45:48 +08:00
codingma
a18c2b124e update wechat.jpg
Former-commit-id: 1c05b847b266ea4a5631407a2424f03726b5fc35
2024-08-01 09:51:47 +08:00
codingma
e5aea29108 update wechat_npu.jpg
Former-commit-id: 3885949a9d379916c5cf67c218797e9825e4be78
2024-07-30 13:45:47 +08:00
hoshi-hiyouga
e678c1ccb2 Merge pull request #5010 from Eruly/main
Add Korean web UI (llamafactory-cli webui)

Former-commit-id: cd420c193858547c72c8e08e7c051aa432d4e93d
2024-07-30 01:55:54 +08:00
hoshi-hiyouga
8fd71e1aa3 Merge pull request #4996 from LDLINGLINGLING/main
增加了MiniCPM在页面首页的支持列表,MiniCPM官方github也放了LLama_factory的友情链接

Former-commit-id: 06e17eb4623fa43954b83c6d33b454c2fbd08e46
2024-07-30 01:55:30 +08:00
hoshi-hiyouga
b33d668e17 Update README_zh.md
Former-commit-id: 3a49c76b65e458c0dc71fbdc810f7e50fe6293c9
2024-07-30 01:55:13 +08:00
hoshi-hiyouga
2f72383969 Update README.md
Former-commit-id: 9e409eadb0d43b90f2df6b458182b591831cf3e9
2024-07-30 01:53:19 +08:00
hoshi-hiyouga
f510c2d279 Update README.md
Former-commit-id: 8d5a41f2cdc15707ec6e0373b86463e962c31b7a
2024-07-30 01:52:35 +08:00
hoshi-hiyouga
f49ebf1af9 Merge pull request #4995 from codemayq/fix-pissa
fix pissa callback

Former-commit-id: daa62db06fb27e5fd736983265e23974c203c9e9
2024-07-30 01:47:25 +08:00
eruly
ccc0825008 Add Korean web UI (llamafactory-cli webui)
Former-commit-id: 371009e5220c2db7f07087b7cfc679829ba53f7d
2024-07-29 13:47:13 +00:00
liudan
3c3a5c09dc 增加了MiniCPM在页面首页的支持列表,MiniCPM官方github也放了LLama_factory的友情链接
Former-commit-id: b9ed9d45cc2bb82ab042c282ddb3e5e97b554541
2024-07-29 10:58:28 +08:00
codingma
8132725f2e fix pissa save
Former-commit-id: 2c1ca9f7425b84e158fef527fd6e13297c8253c6
2024-07-29 10:44:34 +08:00
hiyouga
884b0bbb4f tiny fix
Former-commit-id: 668654b5adae3f897d5291b81410226e1304eff9
2024-07-26 11:51:00 +08:00
hoshi-hiyouga
0ac7824822 Merge pull request #4892 from piamo/main
update deepseek template

Former-commit-id: 8a2846cfe1266bedde84da175805dac78439c20e
2024-07-26 11:49:34 +08:00
hoshi-hiyouga
29d9a9827a Merge pull request #4950 from liuwwang/main and fi
fix: Repair the issue where quantization failed after merging the adapter.
Former-commit-id: 9839c6d1f6fd69287afeb3b6528571cf2bedf91a
2024-07-26 11:48:56 +08:00
hoshi-hiyouga
e2720c11b1 Merge pull request #4970 from HardAndHeavy/add-rocm
Add ROCm support

Former-commit-id: b8896b9b8bf025fd150e8bdeecf3b4355dc958aa
2024-07-26 11:41:23 +08:00
hoshi-hiyouga
ab477e1650 Merge pull request #4961 from khazic/main
Added the reference address for TRL PPO details.

Former-commit-id: 3c424cf69a10846b92a5f969e333e401b691dcb3
2024-07-26 11:32:29 +08:00
hoshi-hiyouga
ca3dac9fb3 Update README_zh.md
Former-commit-id: 77e7bfee7967319da6b5cc72e88d9f6cafe065b2
2024-07-26 11:30:57 +08:00
hoshi-hiyouga
d4e84b9a11 Update README.md
Former-commit-id: 1186ad53d43dace9dec335331dbe246f1c5a729b
2024-07-26 11:29:28 +08:00
hoshi-hiyouga
f38decfbaf Update README.md
Former-commit-id: f97beca23a1c79df38769b8dd40c9b19d4e5ef5c
2024-07-26 11:29:09 +08:00
codemayq
4aaeba0f78 update wechat.jpg
Former-commit-id: 024c49d4e01dc79cfff191f1ecea5a49d3d61710
2024-07-26 10:01:10 +08:00
HardAndHeavy
27f42f6319 Add ROCm support
Former-commit-id: c8e18a669adc775f17555cbf06a5ceef6c0d6235
2024-07-25 21:29:28 +03:00
khazic
ed5c75bd64 Added the reference address for TRL PPO details.
Former-commit-id: ceba96f9ed121bb75b8e802d9b758871a94046f1
2024-07-25 09:03:21 +08:00
hiyouga
bc36e36658 fix #4959
Former-commit-id: 77cff78863918656662b41d259b68669b7cc2237
2024-07-24 23:44:00 +08:00
hiyouga
d984942c82 update webui
Former-commit-id: 30f8149d11d4e19c1fe87d06f53504b7eaf4c1cf
2024-07-24 21:11:51 +08:00
hoshi-hiyouga
422771589f Update README_zh.md
Former-commit-id: 71d3e60713e1e99dd82d50aba69458fafed73089
2024-07-24 21:08:42 +08:00
hoshi-hiyouga
4e429f2e05 Update README.md
Former-commit-id: 5626bdc56d5cfb71a6c7c9629e69810dcba22594
2024-07-24 21:07:14 +08:00
hiyouga
0aad78694a tiny fix
Former-commit-id: ace1d44857368dbbc868e4bba2d7ff17329921f5
2024-07-24 18:33:39 +08:00
hiyouga
d63beb7a24 fix #4928
Former-commit-id: 091010492b2afc8ad25359323aba760523a4c5af
2024-07-24 17:00:29 +08:00
hiyouga
019c6dad84 fix #4925
Former-commit-id: 935b22d93ed461e829cd1e6201de1fea697f4d1e
2024-07-24 16:56:58 +08:00
hiyouga
fae881b854 fix #4944
Former-commit-id: 1bbd49faaef438f49cb5340166cb13faee8fb854
2024-07-24 16:42:51 +08:00
hiyouga
91e54d458f add mistral nemo model
Former-commit-id: 1550fe7331370ad39e8ed69c1b060ead902a77e4
2024-07-24 16:25:53 +08:00
hiyouga
e0875f82b3 add llama3.1
Former-commit-id: 26533c0604ef765170f93986bc06f3066c5e28ee
2024-07-24 16:20:11 +08:00
Liuww
ed05486b98 fix: Repair the issue where quantization failed after merging the adapter.
Former-commit-id: f91a9a250afa0c2e1554b2c81c1860d7968dc816
2024-07-24 14:31:29 +08:00
hiyouga
d4440c07b6 Update wechat_npu.jpg
Former-commit-id: bb0a37dc067e4385290644f165e3634dcbd88894
2024-07-22 21:17:22 +08:00
hiyouga
1cddf80a97 tiny fix
Former-commit-id: 5665062ca0bfb166cd8f2e896e2b0970037373f6
2024-07-22 21:10:15 +08:00
hoshi-hiyouga
37c6a0c6dc fix #4917
Former-commit-id: 26082fc6c90e6a399ae5b44f2c3df8019afc7766
2024-07-22 11:28:31 +08:00
hiyouga
dbe26e7cdf tiny fix
Former-commit-id: c333e2f49d23243489fa16622f43f768bcfd45e2
2024-07-22 00:06:03 +08:00
hiyouga
8d06679a3f fix flashattn + packing
Former-commit-id: 4135e69406c09f3892276e4fee7e5757a52a42d6
2024-07-21 17:07:45 +08:00
hiyouga
81fd5097cc update wechat
Former-commit-id: ad71296a7cc04d0c72721de18c52d8d0c2d9ad83
2024-07-20 22:00:44 +08:00
huangpan.foo
ee4c3f32d1 update deepseek template
Former-commit-id: 44e48e2b82929888b0880c00519102da4eb38ca8
2024-07-19 15:02:54 +08:00
hiyouga
726e7046db set dev version
Former-commit-id: 88c7fc159999511e6e19fff3d37147a6a7064335
2024-07-19 02:01:46 +08:00
hiyouga
542658c986 update parser
Former-commit-id: 8f6995081cbdbb2424da586a443e5220a8990faa
2024-07-19 01:36:39 +08:00
hiyouga
f5cfea56bd release v0.8.3
Former-commit-id: bbd5a644230d633f507c72929e8819c07ae38bba
2024-07-19 01:21:18 +08:00
hiyouga
488f392c81 fix test
Former-commit-id: cdb0f34f10f5407e83766a8c5c9c5aff6af2a84e
2024-07-19 01:17:37 +08:00
hiyouga
d0891f05fa fix unittest
Former-commit-id: e80006795fe6344ea98b61f9a8db16356498c7cb
2024-07-19 01:10:30 +08:00
hiyouga
e1e01d7efd add unittest
Former-commit-id: 608de799a21f37319bf31c04c0aa50c4542ec757
2024-07-19 01:06:27 +08:00
hiyouga
34f16cc635 follow #4878 fix #4684
Former-commit-id: 779aae83d253de0a86201ff87543b5d695e28d23
2024-07-18 22:06:12 +08:00
hoshi-hiyouga
c8e77c11d1 Merge pull request #4878 from ly863/main
Train the last turing conversation.

Former-commit-id: 2516763d698db480f86e397f437fe9c89a7423e0
2024-07-18 22:03:41 +08:00
Shiyu Zhang
249adacc4d 仅仅训练最后一轮对话
Former-commit-id: 1e7b396ff2489055574fd3365425d26360d73897
2024-07-18 15:30:25 +08:00
hiyouga
3c7b10b1fa fix metrics #4786
Former-commit-id: beec77a0898a39d94f41c23920415f5b4873a23a
2024-07-17 00:47:00 +08:00
hiyouga
e90fae61f4 support batch_eval_metrics, fix #4826
Former-commit-id: d774b94f124923829b2eae428e25199d503ebfcb
2024-07-17 00:33:00 +08:00
hiyouga
ca40e42b3c tiny fix
Former-commit-id: bda302fbfbdb114dee7782d405732600d2d73279
2024-07-15 23:09:50 +08:00
hoshi-hiyouga
9d8e0f0837 Merge pull request #4822 from codemayq/test-ci
add github action check to ignore some test cases

Former-commit-id: f2aaebdbde45018e0d08db853ddb975bc2547e14
2024-07-15 23:07:55 +08:00
hoshi-hiyouga
d63c3be556 Update test_template.py
Former-commit-id: 10289eab158c2de13bdde2d5a7c644195e516201
2024-07-15 23:04:39 +08:00
hoshi-hiyouga
c790997fbc Update test_template.py
Former-commit-id: da990f76b881382b9ae6fcfef78dc7df8034947b
2024-07-15 23:00:27 +08:00
hoshi-hiyouga
b19e2f84b6 Merge pull request #4821 from codemayq/feature-eval-split
add "split" as suffix in eval task name

Former-commit-id: 38bc411d42108e7859ec6a031f63c5188246f18c
2024-07-15 22:59:44 +08:00
hoshi-hiyouga
df1f0a1258 Update llama3_lora_eval.yaml
Former-commit-id: 91ba083f37146da0ee321a75701ae79c527ecb51
2024-07-15 22:55:12 +08:00
hoshi-hiyouga
c0493daa60 Update test_template.py
Former-commit-id: 33420bab81cfc7db1dfd3cd4200b8681bf7de9e6
2024-07-15 22:55:05 +08:00
hoshi-hiyouga
f67ddc05d6 Update test_template.py
Former-commit-id: 52a4256ad9aa866f6e1bcbe2c663c0f8ecfdb604
2024-07-15 22:52:25 +08:00
hiyouga
84e6715423 fix #4820
Former-commit-id: fd8cc490084aba9b5155eaaaf26129efd2871fa3
2024-07-15 22:32:07 +08:00
hiyouga
ae0f4ba2d3 update wechat
Former-commit-id: b0aa321a4ad6f146b5d30de20c07feef59f9d0d0
2024-07-15 22:02:52 +08:00
codingma
7146b9457c add IN_GITHUB_ACTIONS
Former-commit-id: 32c3afdfa18dc9560009b324fdf4f2987fc739a9
2024-07-15 10:28:07 +08:00
codingma
76046dfda8 1. change the task name format
2. delete split param in data_args.py


Former-commit-id: 645211dc01b5d4db3ccd0e3dce03a53860eded26
2024-07-15 09:55:33 +08:00
hiyouga
22859b8734 allow computing rouge in training
Former-commit-id: 99ab7a8c1c966232faa11b6a42b9740d9a20ace3
2024-07-15 01:16:26 +08:00
hiyouga
14bc7b0551 fix up
Former-commit-id: 29ebcd75d55f70f2891632eba187b643cc3a9e51
2024-07-15 01:04:56 +08:00
hoshi-hiyouga
2b22a7da48 Merge pull request #4691 from codemayq/feature-suppot-eval-dataset
add eval dataset support

Former-commit-id: 15b399a82f45b08fc07d2957884fb7821eba9fd9
2024-07-15 01:00:34 +08:00
hoshi-hiyouga
788dc1c679 Update data_args.py
Former-commit-id: cba673f491c5d97aba62aea03f310bd54fb3fe28
2024-07-15 00:56:03 +08:00
hoshi-hiyouga
30a3c6e886 Update preprocess.py
Former-commit-id: df52fb05b1b08887288bbaab7c612b7ac27c2290
2024-07-15 00:55:36 +08:00
hoshi-hiyouga
eed7cbb453 Update parser.py
Former-commit-id: 84e4047f8a1f78256be65f3f7bddce358ed9e882
2024-07-15 00:55:21 +08:00
hoshi-hiyouga
5633c0ab1e Update data_utils.py
Former-commit-id: 97a0e291c79f145950b54a11d03d81ada4784d22
2024-07-15 00:54:34 +08:00
hoshi-hiyouga
2e9c9471da Update loader.py
Former-commit-id: a5b809516e7de1d6d5f4583089fee3028d0db01d
2024-07-15 00:50:06 +08:00
hiyouga
a9a652eb6f update test template
Former-commit-id: a4ae3ab4ab8e3c6ad9feba4c185e3b592eda3f09
2024-07-15 00:49:34 +08:00
hoshi-hiyouga
140b512426 Update parser.py
Former-commit-id: 3d39d74003c4ca36f9c9b77f622d366383b0af7e
2024-07-14 23:04:34 +08:00
hoshi-hiyouga
ddbd848e49 Update README.md
Former-commit-id: 9d64507bd5d47f096e81c90bfb347690afaaec2b
2024-07-14 21:27:04 +08:00
hiyouga
2564269826 add gemma test
Former-commit-id: f1d8d29bc3ba1b41a72a24834a16a3d125d56461
2024-07-14 18:01:45 +08:00
hiyouga
380c7741f5 fix test
Former-commit-id: 173921419dc24506527cf506bfbfc01541fd2b66
2024-07-14 15:44:30 +08:00
hiyouga
dfd2d912cd fix #4699
slow tokenizer for yi models


Former-commit-id: 88a20ba7972c533d650967a118d612471fe2b2e8
2024-07-14 15:34:22 +08:00
hiyouga
12e0e5d0d7 tiny fix
Former-commit-id: d3c01552e0f978f150902175f096f6e3bfb64363
2024-07-14 10:56:45 +08:00
hiyouga
0b26011181 fix gemma2 attention
Former-commit-id: 2f6af73da28c4f8321b625fd09ddec8bd4977b08
2024-07-13 23:33:45 +08:00
hiyouga
fb387ae1c3 update workflows
Former-commit-id: 7b19e99ed73faea99c35d49a611187ba1a5c8c73
2024-07-13 22:31:15 +08:00
hoshi-hiyouga
e83e36e475 Merge pull request #4781 from hzhaoy/fix-dockerfile-cuda
Fix cuda Dockerfile

Former-commit-id: 5da54deb50d50385197a5aa9743e6695c066088a
2024-07-13 22:25:32 +08:00
hiyouga
3baf1d1f7e fix #4792
Former-commit-id: 6b48308ef9be34d072f3e6bb2444e186a38c2779
2024-07-13 22:07:58 +08:00
hoshi-hiyouga
f616fd61bd Merge pull request #4804 from codemayq/fix-examples
tiny fix of examples

Former-commit-id: 32699a82a6dc3c0104c0884b763a623e521b9a5f
2024-07-13 20:49:13 +08:00
hoshi-hiyouga
f9a4d96194 Update llava1_5.yaml
Former-commit-id: f618b80fa2173003b7e960dd20cecbede3db41c9
2024-07-13 20:30:06 +08:00
codingma
1ccc6153c7 1. fix output_dir in llama3_lora_pretrain.yaml
2. add llava1_5.yaml for inference


Former-commit-id: 982a1cdd24dfa51535af3e49c7ea80fddc95b0ee
2024-07-13 13:16:22 +08:00
hzhaoy
955e01c038 tiny fix
Former-commit-id: 8bab99c5829a80752e461cf65a9124fdea609676
2024-07-12 00:28:44 +08:00
hzhaoy
93ba3bd5b0 fix #4780
Former-commit-id: 642c6d666f3bd00fcdea45c65a6394bcae9c2080
2024-07-12 00:25:48 +08:00
hzhaoy
b3e4793ded fix #4779
Former-commit-id: a8bf1abf0fd39f84748c94ac3ba39eaa53137529
2024-07-12 00:15:15 +08:00
codemayq
0fa59c9b4c update wechat_npu.jpg
Former-commit-id: 67040f149c0b3fbae443ba656ed0dcab0ebaf730
2024-07-11 20:03:39 +08:00
hoshi-hiyouga
f85187b4dd Merge pull request #4700 from marko1616/patch-1
Fix Windows command preview

Former-commit-id: 555194e15026c444b2bd1c09f521950cbff86c21
2024-07-10 13:51:50 +08:00
hoshi-hiyouga
2528487847 Merge pull request #4746 from yzoaim/fix
fix src/llamafactory/train/callbacks.py

Former-commit-id: 40c3b88b68b205e4124a9704d73500e3c404364d
2024-07-10 13:32:49 +08:00
hoshi-hiyouga
4edd7c3529 Update callbacks.py
Former-commit-id: 39cd89ce17220dc50c8331299ae5af230fe40cc9
2024-07-10 13:32:20 +08:00
-.-
973aac3203 fix src/llamafactory/train/callbacks.py
Former-commit-id: cff89a2e8907f3fe89406006105cb6494e2ee993
2024-07-10 12:05:51 +08:00
hiyouga
a9ce54d143 fix #4731
Former-commit-id: 51942acee84cdb20002f8fdccf6be8c7fe9bd0d3
2024-07-10 11:32:36 +08:00
hiyouga
d7130ec635 fix ppo trainer
Former-commit-id: fb0c40011689b3ae84cc3b258bf3c66af3e1e430
2024-07-10 11:05:45 +08:00
hiyouga
aa15ca1719 fix #4742
Former-commit-id: 2f09520c0d5039a5a8be310ab668272cb4dc1bd3
2024-07-09 23:24:24 +08:00
hiyouga
7e9d51fb95 Update wechat.jpg
Former-commit-id: 86b1594823f3e7d61c61981d53f353a9724ea9c4
2024-07-09 09:25:11 +08:00
hoshi-hiyouga
553e517f0f Merge pull request #4706 from T-Atlas/main
chore: Update vllm_engine.py to support vllm version >= 0.5.1
Former-commit-id: 563a27dab7e66d9454c6a09404c354d9fca06908
2024-07-07 15:50:38 +08:00
hoshi-hiyouga
7483e187c6 Update packages.py
Former-commit-id: f84b007ebbb9fa63f797b4bd1c487372877bbc65
2024-07-07 15:48:29 +08:00
Lian Junhong
7ca84e0a09 chore: Update vllm_engine.py to support vllm version >= 0.5.1
Former-commit-id: 322663bf90ce7b99ca5b0b43ff9dbd95eb36ff6b
2024-07-07 15:08:12 +08:00
hiyouga
f3c105f088 fix #4705
Former-commit-id: a15782cb9f3ee64ba1f5fc2a3da20ac6c6ef0aa0
2024-07-07 13:10:06 +08:00
marko1616
c8205c5163 Update utils.py
In windows mutiline command should like
command --arg1 xxx `
--arg2 xxx `

Former-commit-id: e0562521bbd7cf6b3b90f8c87e52690931f736bd
2024-07-06 20:40:13 +08:00
hiyouga
7fcffb860d add codegeex4, internlm2.5
Former-commit-id: 53b1002fb74123095e7466c75b941a31a7cfba4d
2024-07-06 16:16:47 +08:00
hiyouga
d97bb11821 update pissa example
Former-commit-id: c9bb0757ecfa90ba456e2ef7b38e64dbb809265d
2024-07-06 15:47:32 +08:00
codingma
74f0d02eb8 1. add custom eval dataset support
2. merge load dataset and split dataset function


Former-commit-id: 76f3bbcfc0e11aa41f8f5cbebc60b77b987f7901
2024-07-05 15:52:10 +08:00
hiyouga
8379a39776 fix processors
Former-commit-id: 9f33f1edf544807e498f60881f30b00149fe570f
2024-07-05 08:33:22 +08:00
hiyouga
9aa3403687 fix #4683
Former-commit-id: e43809bced009323b3bac9accdd3baa3a2836fdb
2024-07-05 00:58:05 +08:00
hiyouga
956e555310 fix #4674
Former-commit-id: ed232311e857865da2f493d3ead9a9ffa44953e9
2024-07-05 00:41:03 +08:00
hiyouga
c1262dbf94 Merge branch 'main' of https://github.com/hiyouga/LLaMA-Factory
Former-commit-id: 226a9e563f15ad125856db371871e6f4a3d3eef0
2024-07-04 14:23:37 +08:00
hiyouga
e17f12fcad fix #4677
Former-commit-id: 1e27e8c776acadf312804a6d9a243955427e9978
2024-07-04 14:22:07 +08:00
hoshi-hiyouga
d08456c0ce Merge pull request #4673 from hzhaoy/main
tiny fix

Former-commit-id: 07d96d497ca807cad1a6941ec27b019fc6769e06
2024-07-04 10:40:41 +08:00
hzhaoy
6d892dbc23 tiny fix
Former-commit-id: 738df477485de3633049651a9f1d498adf95a3d5
2024-07-04 10:20:28 +08:00
hiyouga
aa14a625e4 update tests
Former-commit-id: 636bb9c1e65e72c3a27049dacb3200234d1c2782
2024-07-04 04:00:12 +08:00
hiyouga
d7657d772d tiny fix
Former-commit-id: 0c699de39de06eac96af67e8dd4fc4c53335b17e
2024-07-04 03:47:05 +08:00
hiyouga
cbb93a2b47 tiny fix
Former-commit-id: 44747cebd28d0b800196f032e18d2f4ff51ee5b3
2024-07-04 03:02:23 +08:00
hiyouga
4987aa32ba fix data map for packing
Former-commit-id: b5d101e1bf435731e6b8e5aed8727ddfb021e4f0
2024-07-04 03:01:31 +08:00
hiyouga
c15210a312 update wechat
Former-commit-id: b03e4a74bab17d7fdce36c48123126f502c3f98b
2024-07-04 01:55:05 +08:00
hiyouga
7b3c1f29ff fix packing for eager/sdpa attn
Former-commit-id: 6fd6aa4530f81a2ed306eeb2a5167607288b62c6
2024-07-04 01:52:43 +08:00
hoshi-hiyouga
a38ff842d0 Merge pull request #4224 from chuan298/main
Implement efficient packing without cross-contamination attention

Former-commit-id: 87d9b2d00513c163335d3f2e2bb3cb3299cecdaa
2024-07-04 01:18:54 +08:00
hiyouga
bfdaadcc40 update packing
Former-commit-id: cce7083024bed4c7429ddc8288d1c9190fde29f5
2024-07-04 01:10:55 +08:00
hoshi-hiyouga
51c75985b8 Update packing.py
Former-commit-id: a36e8f2dd50e0f1c589457a7e785fdbc905d561d
2024-07-03 23:36:01 +08:00
hiyouga
13cec0cc2f update func name
Former-commit-id: c346f79f99db5296000e4d22a65e53c26e85b344
2024-07-03 23:29:33 +08:00
hiyouga
e671ed520b update arg name
Former-commit-id: 8a6a7b9c8a876da9c16e5ada7df461eb8cabee21
2024-07-03 23:23:24 +08:00
hiyouga
ff6fc666c1 update hparams
Former-commit-id: 575a02a23d9b41d00ca6291d8a40b5bdb3cbeeec
2024-07-03 23:18:58 +08:00
hiyouga
b254df2d34 update ui
Former-commit-id: 7f770f6895f1e2e0b8e4f0b49088bfae096f6d3c
2024-07-03 23:13:49 +08:00
hiyouga
28c8e083f4 test
Former-commit-id: a4a1ddbcb987422cd04125ff3f36f8c739061b5c
2024-07-03 23:05:39 +08:00
hiyouga
e5c89890b1 update scripts
Former-commit-id: 1e0c860c8c5ae8958d7105acafdac5d253a585f9
2024-07-03 20:07:44 +08:00
hiyouga
3595d98b4c fix #4609
unwrap_model_for_generation(reward_model) is necessary for zero3 training


Former-commit-id: 8845e94f917b503bbee0604d7290efea7260a30c
2024-07-03 19:45:51 +08:00
hiyouga
0d438e5cf4 update readme
Former-commit-id: 87346c094631b054ca975694416df324d2031c9a
2024-07-03 19:39:05 +08:00
hoshi-hiyouga
34bec52cc4 Merge pull request #4662 from wzh1994/wzh/readme
Add `LazyLLM` to `Projects using LLaMA Factory` in `README.md`

Former-commit-id: 3449c3531f09f0ad45afe765bd4bb8f5d338fe75
2024-07-03 15:51:02 +08:00
wangzhihong
84f8113bb1 Update README_zh.md
Former-commit-id: 6f8f53f879faf991c494ee9655a47f905fd11867
2024-07-03 14:59:09 +08:00
wangzhihong
3881f4eb58 add LazyLLM to Projects using LLaMA Factory in README.md
Former-commit-id: 22da47ba27dc9c15887d21d47c456fb26fc81f5b
2024-07-03 11:12:20 +08:00
hiyouga
104151d558 tiny fix
Former-commit-id: 8b1172b91085125a83a4150943873141c8bbd8bc
2024-07-03 02:31:50 +08:00
hiyouga
c9e9beee4e tiny fix
Former-commit-id: 71cdf8956e1640a1f3e5f6a4b86d28db70e72041
2024-07-02 23:06:13 +08:00
hiyouga
ea2d3f6c18 remove rlhf support for chatglm2&3
Former-commit-id: 821bb6660e57c29ebf6ac482e78dd2efb8d72437
2024-07-02 23:03:17 +08:00
hiyouga
4828bed837 upcast logits
Former-commit-id: c13ae2df19ed4cdc849bef55d04225e1a98c19b5
2024-07-02 22:32:05 +08:00
hiyouga
cc31014002 improve rlhf
Former-commit-id: c47ab6c07287fb260ea49b8b7af46bdd416f88f7
2024-07-02 22:23:08 +08:00
ancv
7f42932957 move efficient_packing from data_args to model_args
Former-commit-id: e8e13b09423dd08a31a3bde8f85833c6e5d43ee5
2024-07-02 18:37:55 +07:00
hiyouga
1e0a2f722b Update bug-report.yml
Former-commit-id: 9dcff3a5b5ae627832c0eac256ab234179ad3b98
2024-07-02 19:18:56 +08:00
hiyouga
591a4cf42a Update bug-report.yml
Former-commit-id: c81687963a16450b9176825198a06e59e1a0dce6
2024-07-02 19:16:12 +08:00
hoshi-hiyouga
773d857eb8 Merge pull request #4651 from hzhaoy/add-telechat-1b
Add TeleChat-1B

Former-commit-id: 4e4b3cc9057659bebe2bd8fb1629dde484996744
2024-07-02 17:56:43 +08:00
hzhaoy
28e787116b add TeleChat-1B
Former-commit-id: 57b7c00430bcfc83afd11547ceead041e8edfd8d
2024-07-02 17:49:04 +08:00
hiyouga
08296f4092 fix ppo callbacks
Former-commit-id: 4c296001c4b77b814e4bd6cb4049a279718cb775
2024-07-02 17:34:56 +08:00
hoshi-hiyouga
2452f57cd7 Merge branch 'main' into main
Former-commit-id: e8e6af26514272e29a50649b38182beb4db4ebfa
2024-07-01 21:01:09 +08:00
hiyouga
48a299f8ae Update wechat_npu.jpg
Former-commit-id: 33f2ddb8b68d11370a1e113330a4e10c39fba744
2024-07-01 16:28:54 +08:00
hiyouga
2cf03017a0 tiny fix
Former-commit-id: 73280b7dc7f8b3210bb08dfc3cf34760190f585a
2024-07-01 05:43:17 +08:00
hiyouga
de4de5b5ab tiny fix
Former-commit-id: 8c41a0aa6db8bf31200c83b14819d474927268a1
2024-07-01 03:55:20 +08:00
hiyouga
54e786346e add eval acc
Former-commit-id: 1856a08e87b150fa4bffcb0af703ed84d848e24b
2024-07-01 03:51:20 +08:00
hiyouga
a475d808f2 Update label_issue.yml
Former-commit-id: fc2c15d71321838aad05ff27323c0199840b3956
2024-07-01 01:29:09 +08:00
hiyouga
ca7b65439d fix #4402 #4617
Deprecate reserved_label_len arg


Former-commit-id: 1771251ce3f6887b301dac10f3de7a253c5e5884
2024-07-01 01:19:27 +08:00
hiyouga
768093c789 update readme
Former-commit-id: d4e2af1fa422caeb1a2daff7cb9af17073cab13c
2024-07-01 00:22:52 +08:00
hiyouga
bbc37b2880 fix #4398 #4592
Former-commit-id: d74244d56858d837044e5c9cea57a1b3c2ca0214
2024-06-30 21:28:51 +08:00
hiyouga
4b1ab6c83d update npu docker
Former-commit-id: 93e6fbb37ddb60ed356d0acc720463a8cd1a8baa
2024-06-30 21:05:31 +08:00
hiyouga
2b006beab1 loose gemma2 attention
Former-commit-id: 2f4b89ace15b7a4d2adf16eeba9feb7de9e25d43
2024-06-29 01:42:14 +08:00
hiyouga
c3792dae9f update readme
Former-commit-id: 0e0d69b77c36a6110f43b0c760e9b86e2f5ee267
2024-06-28 06:55:19 +08:00
hiyouga
87e60f8bac bf16 by default, gemma2 attns
Gemma2 finetuning cannot work until merging https://github.com/huggingface/transformers/pull/31674


Former-commit-id: 4d35e218b1d60ff24b368ff5bc608be9c85411de
2024-06-28 06:00:26 +08:00
hiyouga
b0acd27114 increase pissa_iter for stability
Former-commit-id: 64f4337daca4c914d86a7181dd582508688383cd
2024-06-28 03:18:54 +08:00
hiyouga
cba994b9dc fix docker flashattn
Former-commit-id: e3141f5f1b435d12c71d8b1fc6ade6e69deead71
2024-06-28 01:28:59 +08:00
hiyouga
d3b7c489f2 add Gemma2 models
Former-commit-id: 6f63050e1b61742d5f7e48bdc62c46748031d7cb
2024-06-28 01:26:50 +08:00
hiyouga
2105cf6000 update examples
Former-commit-id: 2f78b5d62a34ea4d157bbe91a253859d25c8a7fe
2024-06-28 01:17:07 +08:00
hiyouga
835f0578c2 refactor pissa, improve llamaboard
Former-commit-id: 8baf3b22b0fb9624807d809832f097301982d192
2024-06-28 01:04:24 +08:00
hoshi-hiyouga
1dad756cff Merge pull request #4580 from hzhaoy/bugfix-deepspeed-pissa
Fix bug when using pissa method with deepspeed

Former-commit-id: ef38daa0a49567bc4577136ac99e307cf535cf79
2024-06-28 00:46:51 +08:00
hiyouga
a294ef2fae fix #4549
Former-commit-id: 8ed6b367e26490acab5d2d7b32f0d5dad449d26a
2024-06-28 00:41:58 +08:00
hiyouga
5e60c29971 fix docker file
Former-commit-id: 0f421055da37d7f9b3313954fd008c433b3100f5
2024-06-27 20:29:16 +08:00
hiyouga
7c488cea57 tiny fix
Former-commit-id: e44a4f07f09bbee55c10ccee91dd858256c36054
2024-06-27 20:14:48 +08:00
hoshi-hiyouga
ecbbed94d9 Merge pull request #4590 from injet-zhou/main
Exit the process with the subprocess's return code when utilizing the CLI

Former-commit-id: 33ef6f4ec2984a686b6158c4f84af354349221aa
2024-06-27 20:09:36 +08:00
hoshi-hiyouga
37d3adb1f8 Merge pull request #4461 from hzhaoy/feature/support-flash-attn
support flash-attn in Dockerfile

Former-commit-id: 64b131dcfa381045cba6b77ab9e0dbf6a3934e03
2024-06-27 20:05:26 +08:00
hoshi-hiyouga
7ae015f8bf Merge pull request #4561 from hashstone/fix-docker-npu
fix torch-npu dependency

Former-commit-id: a6bf74c0c9ea07db23ee693ba884eed097a6bd0f
2024-06-27 19:58:16 +08:00
hoshi-hiyouga
ffe7cda93d Update Dockerfile
Former-commit-id: 5fcd33fd4f08f5e46c1df541f188d13faefa7c8e
2024-06-27 19:57:40 +08:00
hoshi-hiyouga
030dda5861 Update Dockerfile
Former-commit-id: 9624af1df3e4b260b37ad10e2a9be8e69ab066df
2024-06-27 19:51:25 +08:00
hoshi-hiyouga
506f6d79e6 Update setup.py
Former-commit-id: 569f03ca1abf844f6893745c2cbabf056f21d1cb
2024-06-27 19:38:15 +08:00
hoshi-hiyouga
30687babe3 Update README_zh.md
Former-commit-id: fc7a08e16a00db0e2f8bb2b1966b3d363434ddc6
2024-06-27 19:17:52 +08:00
hoshi-hiyouga
65bf205968 Update README.md
Former-commit-id: 06536c44d472fa2b380ebdb3f51865edb028ac5d
2024-06-27 19:17:35 +08:00
hoshi-hiyouga
e384ef7d57 Update setup.py
Former-commit-id: 03389207f473d43360bd938972da02c92e80322f
2024-06-27 19:16:46 +08:00
hiyouga
6a518d386a Update wechat.jpg
Former-commit-id: 719e2f1fef030b65267855d952dacb1f50a65050
2024-06-27 18:46:47 +08:00
faddddeout
9a2e77a5d8 Exit the process with the subprocess's return code when utilizing the CLI
Former-commit-id: f6b62f00707baf582bc168c15886732ac5218524
2024-06-27 09:58:00 +00:00
fanjunliang
9e93ff9479 support docker-npu-[amd64|arm64] build
Former-commit-id: bdda0827b35cbb6005f10aa661fe6f3940b598d8
2024-06-27 15:25:12 +08:00
hzhaoy
e1751f6398 fix #4579
Former-commit-id: 677c86594e4ea904fde0a557852daf54636b06ae
2024-06-27 13:49:57 +08:00
hiyouga
58607ec1b0 add quant checks
Former-commit-id: 96a5044394bff75ca8ef17bd7d07d4da66f797f0
2024-06-27 01:12:25 +08:00
hiyouga
6e03536dca update examples
Former-commit-id: d417e63f928048036717d51eba42be843c51dff2
2024-06-27 00:53:33 +08:00
hiyouga
f2425cb4ed tiny fix
Former-commit-id: f17c9dfd848ff8ee33fb4db70e40bca15153e40f
2024-06-27 00:46:41 +08:00
hiyouga
da80d41c78 tiny fix
Former-commit-id: 29c710da3a8984c5f6522a79368344544319ebce
2024-06-27 00:36:04 +08:00
hiyouga
d2d9fa4abb support HQQ/EETQ #4113
Former-commit-id: ad144c2265cdee0d23014dbb3d017ea257cb26ed
2024-06-27 00:29:42 +08:00
hzhaoy
c662c2e56f add flash-attn installation flag in Dockerfile
Former-commit-id: e19491b0f0446f2fb2154cf14e0b2fbba5b54808
2024-06-27 00:13:30 +08:00
hiyouga
6b2733ce12 improve autogptq integration
Former-commit-id: addca926de42f91366185a47eb8e777ed44a8e77
2024-06-26 22:11:44 +08:00
hiyouga
28e613efd0 fix #4458
Former-commit-id: 8d6cd69ac43afd4bd7c14bd02b0061455827ac9e
2024-06-26 19:52:35 +08:00
hiyouga
654116c0b1 fix #4556
Former-commit-id: 59e0b4f616736ede37cc37a13346b547f5a2d4e7
2024-06-26 19:43:16 +08:00
fanjunliang
e7bd3ab6c3 fix torch-npu dependency
Former-commit-id: 8096f94a7db3e357c52906c83cad9f3c360bad7e
2024-06-26 18:21:42 +08:00
hoshi-hiyouga
2300fb616b Merge pull request #4544 from MengqingCao/npu
fix docker-compose path

Former-commit-id: 82d0b46bc9f9f52ed1cadd697726cf4089bc73ca
2024-06-26 10:19:24 +08:00
MengqingCao
7c7d6614d8 fix docker-compose path
Former-commit-id: 106647a99d36c4a624511edf651cf5f7624c4c9a
2024-06-26 02:15:00 +00:00
hzhaoy
08a221443c support flash-attn in Dockerfile
Former-commit-id: c88b1be9f3dfaf5fe65448dea20fc697b4f257bd
2024-06-25 15:13:07 +08:00
hiyouga
1a79dd23ff fix #4456
Former-commit-id: 50b44d3c6da7c9cb24a60fedec171fb1de3e764a
2024-06-25 14:34:13 +08:00
hiyouga
f3f25ae3b7 lint
Former-commit-id: 555ca8d780a1fbaf42e73450f5eb33048329d921
2024-06-25 02:55:50 +08:00
hiyouga
80effa2993 fix test case
Former-commit-id: c244af0dc3478532de02271667e7af4ad8f54228
2024-06-25 02:51:49 +08:00
hiyouga
0ae1302e41 fix #4432
Former-commit-id: 1e9d0aa1e45fac52614e79a9fe87e8f1d3757333
2024-06-25 02:34:04 +08:00
hiyouga
ad0304e147 fix #4379
Former-commit-id: cc016461e63a570142b56d50a5d11e55a96ab8db
2024-06-25 02:31:44 +08:00
hiyouga
a225b5a70c tiny fix about badam
Former-commit-id: 095fab58d3692607c9e78747b4218ae1abcf5aaf
2024-06-25 01:54:53 +08:00
hiyouga
dafc9268bc fix #4419
Former-commit-id: efb81b25ecd5cb9f4cfda8f2da8b159e4ab26a90
2024-06-25 01:51:29 +08:00
hoshi-hiyouga
fe6ef6400c Merge pull request #4352 from Ledzy/main
[Enhancement] Support ZeRO-3 when using BAdam

Former-commit-id: d0f953bf5bdbfd49acc82ff055bd54889241761a
2024-06-25 01:49:13 +08:00
hiyouga
d519c2fde5 tiny fix
Former-commit-id: 41086059b12ecb7827eb390294e315068ff9c2e6
2024-06-25 01:15:19 +08:00
hoshi-hiyouga
ab1fbbc3ec Merge pull request #4355 from MengqingCao/npu
Add docker-npu

Former-commit-id: d0e60599026e274d52b0c49806f246e712143708
2024-06-25 01:07:43 +08:00
hoshi-hiyouga
678884f97c Update README_zh.md
Former-commit-id: ec95f942d1f36dee9facb687ae4168e7c3c4d3f5
2024-06-25 01:06:59 +08:00
hoshi-hiyouga
cbc23fc299 Update README.md
Former-commit-id: 5dc8fa647e9af2c6d666c9559553c05d1c4860b3
2024-06-25 01:03:38 +08:00
hoshi-hiyouga
af5b2b9299 Update docker-compose.yml
Former-commit-id: 721acd87688b3edd41d2e1890971eb387afc1b6e
2024-06-25 00:54:28 +08:00
hoshi-hiyouga
6cd45e95f7 Update Dockerfile
Former-commit-id: 3af936a76d726c73d14ff6cf8c3088bda5b904c3
2024-06-25 00:50:34 +08:00
hoshi-hiyouga
62e63d74ec Update docker-compose.yml
Former-commit-id: 15608d055827e41b44fb8a381b1fe5a1230afcb0
2024-06-25 00:46:47 +08:00
hoshi-hiyouga
cfa2dbefcb Update Dockerfile
Former-commit-id: fce146ab681a5682d3f96254e3863f70aca8a4af
2024-06-25 00:46:08 +08:00
hoshi-hiyouga
f84bce3638 Update Dockerfile
Former-commit-id: dcc2e24f5cd441a242829f2fb090506db507babd
2024-06-24 23:41:35 +08:00
hoshi-hiyouga
37a079a072 Merge pull request #4409 from kno10/patch-2
Print help if no arguments given

Former-commit-id: 3bed18c6449bca9f060973fa15f848e4ceb988f4
2024-06-24 23:21:31 +08:00
hoshi-hiyouga
60937ccf32 Update cli.py
Former-commit-id: acb61f7ab719202a217d8f42850a9c3797e0c5b1
2024-06-24 23:21:10 +08:00
hoshi-hiyouga
709bbc1d92 Merge pull request #4417 from mMrBun/main
Add tool_format parameter to rewrite templates for different function call formats.

Former-commit-id: def6d280db3a9fe468b05503bcd9929c83c6c19b
2024-06-24 23:17:55 +08:00
hoshi-hiyouga
18863245df Update test_formatter.py
Former-commit-id: 672152d2ce6b49d7668c70100d877a1c34c08eae
2024-06-24 23:14:36 +08:00
hoshi-hiyouga
b7f5cfde6e Update template.py
Former-commit-id: 1240bd57d8a21540c636a6da839e6b3112d1395a
2024-06-24 23:12:59 +08:00
hoshi-hiyouga
673f27a59e Update loader.py
Former-commit-id: dddfd516ee66e9937e21f05300832aab45034b12
2024-06-24 23:06:18 +08:00
hiyouga
47651a94a3 fix #4410
Former-commit-id: fca893d73c3d7bbb87a816522f2e1568d3e9c612
2024-06-24 22:34:31 +08:00
hoshi-hiyouga
f3a2dda567 Merge pull request #4445 from MengqingCao/label
auto-label npu issue

Former-commit-id: e0014db7d2771a1f32f2b7a9f3e577e34390e818
2024-06-24 22:02:05 +08:00
hoshi-hiyouga
78baa8a509 Update label_issue.yml
Former-commit-id: 80d1910a93213b18c94e122b7e48cba0a20fd4e6
2024-06-24 22:01:23 +08:00
hoshi-hiyouga
1a0758b0a1 Update label_issue.yml
Former-commit-id: aa60cd8910e5ad2ede574e892522f34e43f59f2f
2024-06-24 21:59:39 +08:00
hoshi-hiyouga
fe407e8de6 Merge pull request #4446 from stceum/bug-fix
Bug Fix: `off` is parsed as `False` in yaml file

Former-commit-id: cc452c32c7f882c7f024a9d229352918a9eaa925
2024-06-24 21:41:28 +08:00
hoshi-hiyouga
e74fcdf7b1 Update parser.py
Former-commit-id: e90c424f55b17e4971f8b9d85b6aeac89bb6b98e
2024-06-24 21:37:42 +08:00
hoshi-hiyouga
a9f10a9abd Update test_attention.py
Former-commit-id: a9b3d91952dd5a51ff97fbb40a2dd88885d380b8
2024-06-24 21:35:34 +08:00
stceum
9aa640f27b Bug Fix: off is parsed as False in yaml file, changed to disabled to avoid this.
Former-commit-id: 3ed063f281d1c2563df1b9eb3800543208c9dc16
2024-06-24 20:39:31 +08:00
MengqingCao
f923989a6e auto-label npu issue
Former-commit-id: 90c74ff2519229eb1e509d62426ca3b5e83ef03e
2024-06-24 12:27:00 +00:00
MengqingCao
3b499948a5 update docker files
1. add docker-npu (Dockerfile and docker-compose.yml)
  2. move cuda docker to docker-cuda and tiny changes to adapt to the new path


Former-commit-id: d7207e8ad10c7df6dcb1f5e59ff8eb06f9d77e67
2024-06-24 10:57:36 +00:00
hiyouga
a1df18c5df update readme
Former-commit-id: 4ea84a833399ca434f23bdc100c0851d5b53e05b
2024-06-24 18:29:04 +08:00
hiyouga
7be502c5c5 update readme
Former-commit-id: e507e60638b2e8c66f24805b3b28f6b9f98f5924
2024-06-24 18:22:12 +08:00
codemayq
bb9f48590f update wechat
Former-commit-id: 5b897e7c35618330d4f527a66c3da81a48402e9b
2024-06-22 11:57:39 +08:00
mMrBun
c0e005e2ea Add tool_format to overwrite tool formatter template
Former-commit-id: 20e2e6fdcb0cd1771906be035745a2d9fcd3e138
2024-06-22 02:13:23 +08:00
hiyouga
98abb5c900 remove dup template
Former-commit-id: db9a1912e3551394039cc57b4913f03e8f9aa29d
2024-06-22 01:31:32 +08:00
hiyouga
ccc9a895a6 fix api
Former-commit-id: 3ce44dda991e9cf6cbce1fbe22ef1927893b6c4d
2024-06-22 00:00:38 +08:00
Erich Schubert
cf23a279fd Print help if no arguments given
Former-commit-id: 7d70ba7fb86844d0fa307889c6d671939db1cce4
2024-06-21 09:14:21 +02:00
ancv
5319447aa5 move configure_packing to llamafactory.model.patcher and fix constants
Former-commit-id: 770f75dc8363bfa284a72159ff8ad25ec9abe4e0
2024-06-21 00:45:06 +07:00
hiyouga
0844750bb9 tiny fix
Former-commit-id: 8d4f5093cfcccfe9df173b4c4f7ec0125aecf198
2024-06-20 22:56:05 +08:00
hoshi-hiyouga
7d3b21684c Merge pull request #4382 from MengqingCao/bugfix
upper bound numpy version to <2.0

Former-commit-id: a459624474f8c0aa8977e977190c0ca6b42221ac
2024-06-20 10:19:37 +08:00
MengqingCao
cd563116ca update dependencies
Former-commit-id: 7d4a29303350711558566d10d02230ed85ee1b69
2024-06-20 02:09:47 +00:00
hiyouga
6ea4680334 improve llamaboard
Former-commit-id: f22d8f9ca49681e1ca52c9bdedfe3b5c5a3409b8
2024-06-19 23:46:03 +08:00
hiyouga
029c343537 fix llamaboard abort
Former-commit-id: 3f84411b5d904dbbc5cddeda44884417fe68f689
2024-06-19 23:22:28 +08:00
hiyouga
030b4811c7 update patcher
Former-commit-id: 3b040e8e0f78dbb6bc1409a1b2b788e1affc7458
2024-06-19 21:27:00 +08:00
hiyouga
80e9f8e000 set dev version
Former-commit-id: 42e69a3c634ccae792bd8ffb4642061ee475e836
2024-06-19 21:08:16 +08:00
hiyouga
fded2306dc Update publish.yml
Former-commit-id: 87e330fee50a7dd361c317b94ce19b17eda55d6f
2024-06-19 20:46:33 +08:00
hiyouga
9c1b04cd11 release v0.8.2
Former-commit-id: 71327ba85a3a1bb2d2d20c86951c6c7c0ba98829
2024-06-19 20:42:09 +08:00
hiyouga
3d72b1a856 fix jinja template
Former-commit-id: 2b596fb55ff689d2e488d9a9bbab98f70f356c3c
2024-06-19 20:03:50 +08:00
hiyouga
7735456561 fix templates
Former-commit-id: 4cff6a4ad55b24bf57db6be5cf817180c1ea5626
2024-06-19 17:44:05 +08:00
codingma
53b48eb052 update wechat_npu.jpg
Former-commit-id: c48cbc371dea4eed1a76bdda4346e4346db05287
2024-06-19 14:02:24 +08:00
Jonery
c779899f7b Cleaner integration.
Former-commit-id: 5c2ff1b749a265dd3c979189ec491d8ac911a6f6
2024-06-19 12:29:40 +08:00
hiyouga
c9557241f6 fix bug
Former-commit-id: 6d2bf216ac3a48450e861148ce664dad717fd019
2024-06-19 03:49:23 +08:00
hiyouga
e73a235a38 use prefix to replace force system
Former-commit-id: 4f22eae8f405de918237d406e5e9847592925565
2024-06-19 03:39:52 +08:00
hiyouga
bccc852f76 fix tool formatter, allow parallel function #4362
Former-commit-id: cd75b1fe9d91fb52a9ae6de7435302ff06b4d933
2024-06-19 03:23:51 +08:00
hoshi-hiyouga
6db02615d4 Merge pull request #4173 from mMrBun/main
Implemented the tool_formatter and tool_extractor for glm4 and Qwen2 tool_format

Former-commit-id: c0ca42566c6aeccd8d384377510690eafef10995
2024-06-19 03:18:55 +08:00
hiyouga
89564e90d7 update data
Former-commit-id: 9ab0401948d02d029134aa669c378e2ad80fb9fb
2024-06-19 02:48:43 +08:00
hiyouga
9e5988717d tiny fix
Former-commit-id: 344b9a36b2e0b60ee61fba171b35a391e3517fed
2024-06-18 23:32:18 +08:00
hoshi-hiyouga
9055e66643 Merge pull request #4314 from EliMCosta/patch-2
Fix Dockerfile

Former-commit-id: 89a50dbfdeef4c51bce32275348d15313256039f
2024-06-18 23:30:59 +08:00
hoshi-hiyouga
9b30635ff0 Merge pull request #4309 from EliMCosta/patch-1
Add Magpie and Webinstruct dataset samples

Former-commit-id: 10316dd8ca812382ddbaad0b8fce67d9b000df34
2024-06-18 23:30:19 +08:00
hiyouga
e3bf22f61b add deepseek coder v2 #4346
Former-commit-id: a233fbc258d38c62d78b9d1eaf034720361795e6
2024-06-18 22:53:54 +08:00
hiyouga
5156114981 fix #4357
Former-commit-id: 4bd77d8563aa85230af65caf901214247e214bed
2024-06-18 22:42:45 +08:00
hoshi-hiyouga
b596addd1f Merge pull request #4334 from zzxzz12345/bugfix/add-pandas-versions
Update requirements.txt

Former-commit-id: 078040babdff12b96878e96629d8f657c8e4c3b5
2024-06-18 22:30:35 +08:00
hoshi-hiyouga
09c34e5b6c Update requirements.txt
Former-commit-id: e8c518c08a1235f83f66f83d6f8a6fcad8c598df
2024-06-18 22:27:24 +08:00
hiyouga
15a5eb6647 fix #4335
Former-commit-id: c96264bc477d65276557e9059cac7c550c4835a8
2024-06-18 22:08:56 +08:00
Jonery
bc1c082bc2 add example
Former-commit-id: 97c523516093961983037922e7fc84e4010d5fec
2024-06-18 13:50:26 +08:00
Jonery
c2734108e7 fix typo
Former-commit-id: 8f7c78b64138602406af748b0e15948ebbd2dcb5
2024-06-18 12:39:26 +08:00
Jonery
3a5eacb4cf Support distributed BAdam.
Former-commit-id: 0f72aac8c9227e33ad20d2b1641b1c9faae16a5f
2024-06-18 12:27:47 +08:00
hiyouga
19bf21efba lint
Former-commit-id: 24c160df3d575843e5ad5f1b47246d04430a79f0
2024-06-17 22:35:56 +08:00
hiyouga
3d85217464 update chat engine #4335
Former-commit-id: 7857c0990b37d37e58691257eea13fe5e244aaa0
2024-06-17 19:07:17 +08:00
hiyouga
9e0ec3831f update readme
Former-commit-id: fcb2e8e7b7b79915af24c4e3264b579b3649ea90
2024-06-17 18:47:24 +08:00
Jonery
5d59f6562a Merge remote-tracking branch 'upstream/main'
Former-commit-id: ea1f3ba5e030504e07053484f50f4cbdb37808bc
2024-06-17 18:44:51 +08:00
Jonery
67df86201a update gitigore
Former-commit-id: b2fc9cc15f2fc3c9536681260beedd3a224ef40f
2024-06-17 18:29:36 +08:00
Jonery
756566342d adapt for badam with ds zero3
Former-commit-id: 33b437277846d4f0b64c13a0bc892ef4f345a21e
2024-06-17 18:18:10 +08:00
hiyouga
7ef169ed39 fix #4326
Former-commit-id: e2665e71c7428014d46d91542b01a58c1064d05a
2024-06-17 18:17:48 +08:00
hiyouga
0a40ee5444 Update wechat.jpg
Former-commit-id: 72471ee046a69acea25fd4d67679ea942d00eb8f
2024-06-17 17:49:03 +08:00
hiyouga
004f289074 tiny fix
Former-commit-id: 2bf2863a58c93206f271de17d7dfcbcd6375cd73
2024-06-17 17:47:25 +08:00
胡翀
8ab2d707e5 Update requirements.txt
add pandas version requirements

Former-commit-id: 12869c3ede9bf11bc0fbdfa7af559808551563be
2024-06-17 16:45:57 +08:00
Eli Costa
191dac26c0 Fix Dockerfile
Adds the commands to correctly execute LLama-Factory servers

Former-commit-id: df12621daed8037496dbb6a57e653659a209062b
2024-06-16 19:16:23 -03:00
Eli Costa
d7459853d8 Update README_zh.md
Fix details tag in datasets menus

Former-commit-id: 3ec57ac239a4f469bbae013ec8760307fb190189
2024-06-16 11:34:31 -03:00
Eli Costa
ee30db72a3 Update README_zh.md
Add Magpie and WebInstruct to README

Former-commit-id: 82d5c5c1e8dda61523dee4be351c18731e4a5b9c
2024-06-16 11:22:06 -03:00
Eli Costa
26e942b0ad Update README.md
Add Magpie and Webinstruct to README

Former-commit-id: 103664203cf5a8562b5b000676ce95a6da2b7698
2024-06-16 11:19:25 -03:00
Eli Costa
6bbb8b4cd8 Add Magpie and Webinstruct dataset samples
Adds two dataset samples claimed superior performance: Magpie (from Allen AI) and Webinstruct (from TIGER-Lab).

Former-commit-id: 74e49cca957d0bacd2c1d688e995a7370bef69f7
2024-06-15 19:31:56 -03:00
ancv
988231026a update packing with sdpa and eager attention mode
Former-commit-id: 238f5c3d99809c6ae2571b59bdce8d8ea3c700b9
2024-06-16 02:25:47 +07:00
hoshi-hiyouga
06bbc29614 Update parser.py
Former-commit-id: 29c1f31baa442e35714b18b7e51896274a828cae
2024-06-16 02:57:00 +08:00
hiyouga
5769cc8d06 update pr template
Former-commit-id: 0a2ec5fe2049a6d6bc3955c7e4794bd6115ccbcd
2024-06-16 01:43:43 +08:00
hoshi-hiyouga
0ddf7bd28a Merge pull request #4307 from hiyouga/pissa
Support pissa

Former-commit-id: b7b5892a34ed329630db9b79bd5453f15440b4c3
2024-06-16 01:41:50 +08:00
hiyouga
ce4a27a5f7 fix tol
Former-commit-id: 46093b5786611d99adf1fd3d42926a728fc629f8
2024-06-16 01:38:44 +08:00
hiyouga
a8655f5c08 Update tests.yml
Former-commit-id: 7f3c19e3ab616f93ffc8fee23aa15ca0b19a9683
2024-06-16 01:22:23 +08:00
hiyouga
2d2c78d66c increase tol
Former-commit-id: de43bee0b004c7e90811100474b3113590d0f130
2024-06-16 01:21:06 +08:00
hiyouga
f25b8626bf support pissa
Former-commit-id: 8c1046d78ac6c8f9429b73617e35e1eccb35138f
2024-06-16 01:08:12 +08:00
hiyouga
c0c6b8075a tiny fix
Former-commit-id: 38b6b0f52edeb8ba45aa03b415b3c0c1b0e0c1e4
2024-06-16 01:06:41 +08:00
ancv
9d9f8c6531 remove some unused params
Former-commit-id: 04315c3d92ecc25537e45d5807cb38bc290dcb16
2024-06-15 23:00:55 +07:00
hiyouga
96b82ccd4d use fixture
Former-commit-id: 80a9e6bf94cf14fa63e6b6cdf7e1ce13722c8b5e
2024-06-15 20:06:17 +08:00
hiyouga
8053929b20 add tests
Former-commit-id: 1b834f50be64ae9b5123da0e6f528cfbd5167477
2024-06-15 19:51:20 +08:00
hiyouga
f0d6e63f55 add minicpm #4227
Former-commit-id: 572d8bbfdd73c1a00b432f0d0411f46fad6aa1a6
2024-06-15 17:58:52 +08:00
hiyouga
2946153cea add license
Former-commit-id: d87108daa68bd40174b262be1ca65fe6e1b7ab56
2024-06-15 17:54:33 +08:00
hiyouga
4dcd124dbd update readme
Former-commit-id: acd84ce5350ef985e3712a40442c6f7a54d08d40
2024-06-15 05:13:16 +08:00
hiyouga
19ea51e460 fix #4271
Former-commit-id: f1aa6a411a55efea1064ea74b936ac8a3d856f8c
2024-06-15 05:11:33 +08:00
hiyouga
fcbfa70c19 disable DP
Former-commit-id: d519b4d76d39b21a21b1d2f6f7ce6b3af9525d03
2024-06-15 04:57:19 +08:00
hiyouga
ba9aa7e2aa fix #4292
Former-commit-id: 9092f963dba6f2e0eeade53b5b35e6b770f8348e
2024-06-15 04:47:13 +08:00
hiyouga
ab66ae8cd2 fix #4295
Former-commit-id: 78589cf90c6e12e612f269b1c771f19f3dad83d2
2024-06-15 04:34:55 +08:00
hiyouga
a3f4925c2c add test cases
Former-commit-id: b27269bd2b52fb9d43cde8a8b7f293099b0127a2
2024-06-15 04:05:54 +08:00
hiyouga
d4ce280fbc Update README.md
Former-commit-id: 2d43b8bb49057e14a9f79146acdcc0cfa94bcc5a
2024-06-13 16:02:21 +08:00
hiyouga
f81a839197 update examples
Former-commit-id: 892e561c28cbbab1ee38a8022ddd9b397c873563
2024-06-13 03:26:10 +08:00
hiyouga
27777c8e68 add quant check in webui export tab
Former-commit-id: c94e6c9411cc1165ea8180d377611a3ae47956e6
2024-06-13 03:19:18 +08:00
hiyouga
4c40171c55 Update llama3_full_sft_ds3.yaml
Former-commit-id: a19cdd39feafa91fdacae4818393f82e9724c53f
2024-06-13 03:16:20 +08:00
hiyouga
0926d81053 update examples
Former-commit-id: b6e008c152421db668c971b0828cbee6a80b16bc
2024-06-13 03:15:06 +08:00
hiyouga
8fccaf20c5 fix #4221
Former-commit-id: 6baafd4eb3147ad9f7d2952b8eb27c5486940f36
2024-06-13 02:48:21 +08:00
hiyouga
c51f5c2a0a update wechat
Former-commit-id: 9419f96609d791397f02b411966cd1ef779f2f97
2024-06-13 02:31:45 +08:00
hiyouga
81ed4d8abf fix #4209
DeepSpeed ZeRO3 has inflight param error when calling model.eval()


Former-commit-id: cf9f2d6c42b5a37038c9eededbb767eae6a3f67d
2024-06-13 02:25:50 +08:00
hiyouga
833aa324c2 clean code
Former-commit-id: 2ed8270112755971e3f2dfd2f29c5939b077330a
2024-06-13 01:58:16 +08:00
hoshi-hiyouga
7366647b43 Merge pull request #4246 from hzhaoy/adapt-vllm-v0.5.0
adapt vllm==0.5.0

Former-commit-id: 1f23f25226f43bb2b2116474b9c6ab2d72e7e260
2024-06-13 01:54:02 +08:00
hiyouga
e89d1b1ec3 add neo-sft dataset
Former-commit-id: c7a5620ccc72b7574255ea764693ccb866c48263
2024-06-13 01:00:56 +08:00
hiyouga
99ce085415 fix lint
Former-commit-id: 713fde4259233af645bade7790211064a07a2a6f
2024-06-13 00:48:44 +08:00
hiyouga
b2b0b96051 fix docker compose usage
Former-commit-id: 947a34f53b74e4cd2b964941cf1580bcabde2228
2024-06-13 00:07:48 +08:00
hzhaoy
65f2ba3802 adapt vllm==0.5.0
Former-commit-id: 8fb6366ebec432c1333c80eb51007460ac5896bd
2024-06-12 18:29:03 +08:00
hiyouga
77e4dc255f update readme
Former-commit-id: 2ce2e5bc478f6ffcafe8e6451b1fef4e8994694c
2024-06-12 17:39:12 +08:00
hiyouga
f8497921fe fix #4242
Former-commit-id: 577de2fa078ee62d61bca24b75fa59590e2ef66b
2024-06-12 16:50:11 +08:00
hoshi-hiyouga
bc5e97295e Merge pull request #4234 from kimdwkimdw/patch-1
Support vllm==0.5.0

Former-commit-id: 656b2bbdafa0208c28801d41ac4887518d3f0ce5
2024-06-12 16:39:09 +08:00
Arthur Kim
bebca6d01c Support vllm==0.5.0
Former-commit-id: d65a3f7cb6dcd34e9a3ff9e30dffc52a7671d50b
2024-06-12 16:49:12 +09:00
ancv
045eb155a2 implement efficient packing without cross-contamination attention
Former-commit-id: b2c367bc61c2778dc359613dca496d9e134c2743
2024-06-12 11:56:01 +07:00
codingma
c7e021a837 update wechat_npu.jpg
Former-commit-id: 557891debb8a64b73eea012f99780a7b76424cd5
2024-06-12 10:39:05 +08:00
hoshi-hiyouga
fecb9c9a76 Merge pull request #4204 from dignfei/main
fixbug:llama3在增量预训练时应该使用<|end_of_text|>标识文本的结束

Former-commit-id: 9049aab911fa3fbe9cd463ae3805f81b484da052
2024-06-11 17:06:10 +08:00
hoshi-hiyouga
bf3de9bfe8 Update pretrain.py
Former-commit-id: 0c292332374fb96c3fc753abde42d070a0c1dca8
2024-06-11 17:02:14 +08:00
hiyouga
8c574eb3cb fix deepspeed version
Former-commit-id: cca6f351081903ca3b5f79f10accc1bbbae0ee61
2024-06-11 16:52:36 +08:00
d
da39715085 经过大量的增量预训练,进行对比试验,发现这个bug:llama3在预训练时使用的tokenizer.eos_toke是'<|end_of_text|>' ,这里在每条数据后面也得用这个,而不是'<|eot_id|>',否则很容易导致严重的性能下降
Former-commit-id: 6979f3f8480755604d8aea8164f6418126e094c5
2024-06-11 16:23:40 +08:00
hiyouga
6c9cc199ef Update bug-report.yml
Former-commit-id: 53b74361d3d76c602f80854320efc555164afe44
2024-06-11 15:40:21 +08:00
hiyouga
5834651c4a fix #4198
Former-commit-id: 89f2bd8c8c035181927bd530a7ffc733407d674c
2024-06-11 15:38:38 +08:00
hiyouga
53de7f7cc3 tiny fix
Former-commit-id: 90e14a960d1437a16d35dbabbb8aa50714583d3a
2024-06-11 12:48:53 +08:00
hoshi-hiyouga
4ab902d558 Merge pull request #4191 from iamthebot/al--add_manifest_for_reqs
Add MANIFEST.in so requirements.txt is present in sdist

Former-commit-id: 796699f8672e45d53ca2e6eb635b6dee2113d3ef
2024-06-11 10:41:15 +08:00
Alfredo Luque
fb20b8dcc8 add manifest so requirements.txt in sdist
Former-commit-id: 5f7b3b3ff6a0965bb5036868f7ca5612780d6766
2024-06-11 00:07:06 +00:00
hiyouga
e3baa5aa08 tiny fix
Former-commit-id: 3f24337a8a995b145b1e8075bc23878eaa363844
2024-06-11 01:04:16 +08:00
hiyouga
d6632fefc9 set dev version
Former-commit-id: 91e62a098fd997d0d1d12baef64d089aabc01fba
2024-06-11 00:50:53 +08:00
hiyouga
75e1bbf128 release v0.8.1
Former-commit-id: 2b6ebd6b51133cf114d6f0e8605ad2bb26aa6d65
2024-06-11 00:44:26 +08:00
hiyouga
2f164c2c41 fix #4160
The split heads should be concatenated in dim=2


Former-commit-id: a793e8456b664ea0b48f0ba162999f18d06b4c2f
2024-06-11 00:37:17 +08:00
hiyouga
d984776d35 fix #4145
Fix the docker image


Former-commit-id: 949e9908ad634874cf5449ee9904745c7acda611
2024-06-11 00:19:17 +08:00
hiyouga
144544cd37 update evaluator
Former-commit-id: 0012762b04d4082a3a7d98889cc3024adc92fc44
2024-06-10 23:56:00 +08:00
hiyouga
3b244a69dc fix #2666
Former-commit-id: c907d816670975daa900898660d3503708b7fc37
2024-06-10 21:24:15 +08:00
hoshi-hiyouga
55b40b3d62 Merge pull request #4167 from yzoaim/branch
fix README

Former-commit-id: ef4afdaf0e718ef7c316bbee4c618a1f92dadaa6
2024-06-10 16:24:33 +08:00
mMrBun
b6d63b3324 Optimize the handling of QWEN2 in scenarios involving multiple tool calls.
Former-commit-id: 950e360ca00c29febadc14d5995de7d57b5c43a7
2024-06-10 02:00:14 +08:00
mMrBun
3f11ab800f Removed unnecessary comments.
Former-commit-id: 6ed0b0c800d416379acf8395aa852c188c107eb9
2024-06-09 18:25:22 +08:00
mMrBun
daf472994d Merge branch 'hiyouga:main' into main
Former-commit-id: 0f2609ce19492f0bab9b4880ded228b5513e5907
2024-06-09 18:17:24 +08:00
mMrBun
18a86ea104 Implemented the tool_formatter and tool_extractor for glm4 tool_format
Former-commit-id: cb1cbcb293917e960cad8f0eac7a11a122ab644a
2024-06-09 18:16:15 +08:00
-.-
b187450340 fix README
Former-commit-id: 483cdd9b6ad42bc43a97df8ce867e3a9ef9bf5bc
2024-06-08 23:51:56 +08:00
hiyouga
e4b9c80104 add pr ci
Former-commit-id: b61d25cd705db821664f87adf37d2ed56c68130f
2024-06-08 21:25:35 +08:00
hiyouga
0c44309e15 Update tests.yml
Former-commit-id: 25c635ef2849fd173617b6a8d8d3f5d4f800a893
2024-06-08 21:15:36 +08:00
hiyouga
1c31809652 update git workflows
Former-commit-id: 4c4f950f3936edbce84796c9a5e11b61ea07864e
2024-06-08 21:11:32 +08:00
hiyouga
1a261add61 fix llamafactory-cli env
Former-commit-id: 972ec9c668de1a9b6d872187dbc0c1d94f6fec6b
2024-06-08 07:15:45 +08:00
hiyouga
de3400a521 set dev version
Former-commit-id: 3ac11e77cccf686e0da499bd152997133b49a265
2024-06-08 06:46:09 +08:00
hiyouga
ce40d12692 release v0.8.0
Former-commit-id: 5aa4ce47567146cd97c61623018153b41d7c1278
2024-06-08 05:20:54 +08:00
hiyouga
3547a26f86 add ultrafeedback and fineweb #4085 #4132
Former-commit-id: 12d79f89c5082eb29842b501e1cb88433a248ba3
2024-06-08 02:42:34 +08:00
hiyouga
de9e773764 fix ci
Former-commit-id: 42d9b26fc81d66cb0485a2ae148c3e719df59b7d
2024-06-08 02:00:44 +08:00
hiyouga
d3eb985bb6 fix ci
Former-commit-id: 7f20e4722ae6ac907b36a3219dcd09d2ff5d071a
2024-06-08 01:57:36 +08:00
hiyouga
6a5e3816cf add ci
Former-commit-id: aa2578bea072354656dbdb62b970e16a8b86f16b
2024-06-08 01:48:30 +08:00
hiyouga
4f3e680b57 init unittest
Former-commit-id: 1c7f0ab51906b20190f8d4db932623cff76efc01
2024-06-08 01:35:58 +08:00
hiyouga
64cf35cccc Delete .readthedocs.yaml
Former-commit-id: 4b55f35662c9f424f07196ada7f94746f78f95e7
2024-06-08 00:58:10 +08:00
hiyouga
4f0ce9be4e reorganize adapter code
Former-commit-id: 54cd743ebfbd296ae9eaf10c33f59e127f451785
2024-06-08 00:47:23 +08:00
hoshi-hiyouga
bad35d1730 fix #4139
Former-commit-id: cfd62283a9772fc854b852d2a1b71699f79a0048
2024-06-08 00:45:02 +08:00
hiyouga
a8318723a4 add resume args in webui
Former-commit-id: 06e5d136a4916413d1c116e341ba7d5136d7748a
2024-06-08 00:22:16 +08:00
hiyouga
d79222894c fix #4137
Former-commit-id: 8bf9da659cc789dbdd909930f79ac59539b51127
2024-06-07 19:16:06 +08:00
hiyouga
4b72592594 Update wechat.jpg
Former-commit-id: cce0fad91c0ef1758b021a94c02e9fdd97b73183
2024-06-07 19:04:16 +08:00
hiyouga
ca9468ff04 tiny fix
Former-commit-id: f8d8690bf4c2981f3151b4ccf07daeb4f3cd38a9
2024-06-07 05:19:21 +08:00
hiyouga
4f3c89a6eb fix ppo trainer save zero3 model
accelerator.get_state_dict(ds_model) should be called at all ranks


Former-commit-id: 4489d73ac75c8dbc002fc16c854148994d432c3a
2024-06-07 05:14:19 +08:00
hiyouga
f76d427332 fix ppo in trl 0.8.6
Former-commit-id: 2702d7e952523b584d67c8901888b492d4a79b14
2024-06-07 04:48:29 +08:00
hiyouga
d3196318be fix #4120
Former-commit-id: f9e818d79cf686cb34789327add7ed1f749966c6
2024-06-07 04:18:05 +08:00
hiyouga
c6f5f69644 update data processors
Former-commit-id: ccc8b64cc21417cfd88d9b5e9bd62e15c1e834a1
2024-06-07 04:15:40 +08:00
hoshi-hiyouga
4953ded639 Merge pull request #4009 from AlongWY/main
supervised packing with greedy knapsack algorithm

Former-commit-id: 181dbb0d05655c6b46a3859cb47cfa3f86ef8abd
2024-06-07 03:48:46 +08:00
hoshi-hiyouga
e3ef239bc0 Update supervised.py
Former-commit-id: c09ad8bab38bc2f151da3a924eba225111af2481
2024-06-07 03:42:08 +08:00
hoshi-hiyouga
fd7bd911a6 Update supervised.py
Former-commit-id: 788e8232fc4ed58ab2439a9bc2e38f64e12c6eb3
2024-06-07 03:38:23 +08:00
hoshi-hiyouga
21df5f0bd0 Update supervised.py
Former-commit-id: 8cecade7082a52f413517ea20b1c5dd812db8e53
2024-06-07 03:38:04 +08:00
hiyouga
8a0263551d add qwen2 models
Former-commit-id: 8e95648850fdd5075724359ffdb22beb48b75952
2024-06-07 00:22:57 +08:00
hiyouga
8da149ba40 rename files
Former-commit-id: 74f96efef9bcd63f65d0190c901ff9be54ccd350
2024-06-07 00:09:06 +08:00
hiyouga
fd2c64315b add DISABLE_TORCHRUN option
Former-commit-id: 45d8be8f93188e6e9d1e0841c2736dce0c1ef7d2
2024-06-06 23:44:58 +08:00
hoshi-hiyouga
77b70664e5 Merge pull request #4082 from MengqingCao/bugfix
Fix #4077

Former-commit-id: 55c18c49b00a9c13ad42c1b09cd5844253876267
2024-06-06 23:38:40 +08:00
hoshi-hiyouga
9bebdeabda Update cli.py
Former-commit-id: 751dd77bc076af3a13884a609ec71c089c516f1f
2024-06-06 23:38:09 +08:00
hiyouga
368695483d fix ppo+zero3 #3108
Former-commit-id: 76c61905b20f69fac5c7a6c4ea9450bf33d3b1f2
2024-06-06 23:30:07 +08:00
hiyouga
6cbc66a602 fix torch gc
Former-commit-id: 451b6693c0cb86cc9ac03d1a9389cf1fd2b918ec
2024-06-06 20:30:25 +08:00
hiyouga
e0aadd4b34 fix ppo dataset bug #4012
Former-commit-id: 149610c636bbb974e546d13fa302884ea65a6d38
2024-06-06 19:03:20 +08:00
hiyouga
e898d8bbc4 update trainers
Former-commit-id: fad2591e314093335ef1c301d0a70f0cbe935728
2024-06-06 18:45:49 +08:00
hiyouga
f2edacb02d fix base64 image read #4061
Former-commit-id: 67aa78cde0d89e9f4b5640bce5fc506ef73ff7b6
2024-06-06 17:29:19 +08:00
hiyouga
2f0a333e9c update readme
Former-commit-id: 53eb2de75e2df372b87801cea4ccafd6e73e59df
2024-06-06 16:59:18 +08:00
hiyouga
8cc6bb961b update readme
Former-commit-id: 87a7822b98ef204a7a36fa4caf4e09a092f6a2da
2024-06-06 16:25:42 +08:00
hiyouga
cceff9f520 lora modules: all by default
Former-commit-id: cae47379079ff811aa385c297481a27020a8da6b
2024-06-06 03:53:28 +08:00
hiyouga
679810a3d2 add codestral 22B
Former-commit-id: c23cc63d3d3c4fd8edd6c3b3ca1a2a32ec328d7d
2024-06-06 03:42:50 +08:00
hiyouga
8f25af89b6 lint
Former-commit-id: 7daf8366db0e161d46993fd87cf983a27a0ce2a3
2024-06-06 03:33:44 +08:00
hoshi-hiyouga
229794a148 Merge pull request #4066 from injet-zhou/main
add throughput entry to training log

Former-commit-id: f2580ad403cd0ae91aa0954c0a15363c46452438
2024-06-06 03:32:04 +08:00
hoshi-hiyouga
d31c9c73c7 Merge pull request #4080 from MengqingCao/npu
Add npu option for model exporting

Former-commit-id: ca459f67eb319c262d5bab882e9cb3535a76eb69
2024-06-06 03:15:44 +08:00
hoshi-hiyouga
0b7cf306f7 Update export.py
Former-commit-id: feaee36c4642558c6c4e069b0fd42c20691e3ff4
2024-06-06 03:14:46 +08:00
hoshi-hiyouga
d9a372658a Update model_args.py
Former-commit-id: af2c3cbee4372724cf00379d8494f5000dc8a3df
2024-06-06 03:14:23 +08:00
hoshi-hiyouga
896a3b8311 Merge pull request #4053 from hzhaoy/feature/add_select_config_file
Support selecting saved configuration files

Former-commit-id: 0e740aa463bdd649eaf1cc2d5366216e0c709261
2024-06-06 03:06:03 +08:00
hiyouga
c439c959f7 add vllm_dtype arg #3387 #3717
Former-commit-id: 8fcc79e1e66a4e952710ac8c98685437d924361a
2024-06-06 02:53:27 +08:00
hiyouga
3fcb678d00 support train from scratch #4033 #4075
Former-commit-id: a12a506c3d2ba85975a5990c46d2e055cdfe0f2e
2024-06-06 02:43:19 +08:00
hiyouga
cafbb79d3a support image input in api #3971 #4061
Former-commit-id: 946f60113630d659e7048bffbb3aa7132ac3ecd1
2024-06-06 02:29:55 +08:00
hiyouga
00b3fb4d14 update train hparams
Former-commit-id: dc4a00dd63769dc02d898c8bad2c158e4e5c0447
2024-06-06 01:49:20 +08:00
hiyouga
8f3b8ade45 fix setup
Former-commit-id: 4dc0632145f555ac564b0d6b560d28cbcb3ddded
2024-06-06 01:39:02 +08:00
hiyouga
0398338a0f add llamafactory-cli env
Former-commit-id: d4908d57085bbcfcd29e0a8d4ee6425318ee4285
2024-06-06 01:28:14 +08:00
hiyouga
a16786d8ba fix #4090
Former-commit-id: 67fe822324a9f830175e44f89acdd9d759b38852
2024-06-06 00:50:32 +08:00
MengqingCao
71b9b87d88 modify export_device option
Former-commit-id: 2c0305266291fdb163c4445db227d4c77529f3b5
2024-06-05 09:37:36 +00:00
hiyouga
ecd06d0110 fix #4079
Former-commit-id: 83a005e3d404f5a8ccb7b8ac17c50db75df4e8d4
2024-06-05 16:56:54 +08:00
hiyouga
b097f04a79 update readme
Former-commit-id: eef1e542a91baefebdaac0d7c747ed481b78f6ef
2024-06-05 16:32:32 +08:00
MengqingCao
55815ab1ff fix #4077
Former-commit-id: 90ed3cae92c624cb53e7349bb7edeaf402d030e6
2024-06-05 08:03:30 +00:00
hiyouga
94c37490d1 support glm-4
Former-commit-id: f48f5e646e2da9e02333d027033141b0e75dfcf8
2024-06-05 15:16:38 +08:00
MengqingCao
15f6ab73a5 add npu for model export
Former-commit-id: 07045c876a4c6025ba56905b65cce6c9faedacb5
2024-06-05 07:06:40 +00:00
faddddeout
a2931b813b add throughput entry to log
Former-commit-id: b2f04595423b8e84b3763d169e402a0cd34f3175
2024-06-04 11:04:29 +00:00
hiyouga
51e3229528 update wechat
Former-commit-id: 82a565362ca031f9b3e7c5c24d2c43d1741bbe19
2024-06-04 15:52:56 +08:00
hzhaoy
4721d0b8ff add: support selecting saved configuration files and loading training parameters
Former-commit-id: b27c4cfcb367f7ab0b56da3ba238c4d9c29ff4e7
2024-06-04 10:33:43 +08:00
hiyouga
0eff6a66d5 tiny fix
Former-commit-id: 5a13b3baa63225e7f79e024610722de0f87e0acc
2024-06-04 00:31:10 +08:00
hiyouga
88745c9bb5 fix #3873
Former-commit-id: 91611d68c47dada2b74a141a5842dd289e46d356
2024-06-04 00:21:50 +08:00
hiyouga
8ecf606230 fix #3992
Former-commit-id: a18acf2abe28e37233bf8c8ed2600618ea3b62e9
2024-06-04 00:17:36 +08:00
hiyouga
b12d4beb8a fix abort in webui DDP mode
Former-commit-id: 2187518762844472a96b72fbad4da15d8bc97bbd
2024-06-04 00:10:24 +08:00
hoshi-hiyouga
326f180397 Merge pull request #3987 from injet-zhou/main
Fix cann't interrupt training when using multi GPUs in webui

Former-commit-id: ae18e1e2514d2829b5bc8b4abdb7fa3e8e906c22
2024-06-04 00:04:07 +08:00
hiyouga
e2920aa925 fix #4043
Former-commit-id: 79784ebeb6cc712b12edadcca8203b20afcf851e
2024-06-03 23:30:37 +08:00
hiyouga
6f7b6ae0c3 remove gc warnings in DPO&KTO
Former-commit-id: f9a206509ec8cd3abfad8bd924c9387317a4ead8
2024-06-03 22:53:54 +08:00
hoshi-hiyouga
b2c224de69 Merge pull request #4045 from enji-zhou/feature/add_kto
fix KTO Trainer Sampler

Former-commit-id: 30a538e2dbb79752479e11205dbb539df956f205
2024-06-03 22:09:25 +08:00
hoshi-hiyouga
5d96cf146e Update trainer.py
Former-commit-id: 24499f40dc1d9db448a3328d2a75c60eec27feb9
2024-06-03 22:08:38 +08:00
enji.zhou
e58aca0602 fix KTO Trainer Sampler
Former-commit-id: 34a2c5087a174a807e5a11cae3748bcaaaf13550
2024-06-03 21:32:38 +08:00
hoshi-hiyouga
f6f1c4eacb Merge pull request #4006 from Uminosachi/scheduler-kwargs
Set scheduler_specific_kwargs to get_scheduler

Former-commit-id: 0f01500b68396533ddb00dc6e92e6e26be0ce9e5
2024-06-03 19:27:53 +08:00
hiyouga
a187068e7c update placeholder in issue template
Former-commit-id: 88681d33575574d777b4f800e2e228389a38503d
2024-06-03 19:24:10 +08:00
hoshi-hiyouga
cdfd2ad4b1 Merge pull request #4011 from statelesshz/issue-template
Update bug-report.yml

Former-commit-id: d359dd2de404d1917eee197049cf44834566a23b
2024-06-03 19:20:43 +08:00
hiyouga
e4ce59243b fix #4005 #4013
Former-commit-id: eed33862bc733361f3c28b3c95dc0eb4ea00884c
2024-06-03 19:12:29 +08:00
hoshi-hiyouga
eaab09fccb Merge pull request #4007 from xu-song/patch-3
Update model_args.py

Former-commit-id: 1539c72b9493907464f29ca0f0112c6df2f997b4
2024-06-03 18:54:37 +08:00
hiyouga
d0ceb1b091 fix #4022
Former-commit-id: 24e1c0e2ee365812357fb9cf82e2162915299a26
2024-06-03 18:38:36 +08:00
hiyouga
af7748139a bump versions
transformers 4.37.2->4.41.2
datasets 2.14.3->2.16.0
accelerate 0.27.2->0.30.1
peft 0.10.0->0.11.1
trl 0.8.1->0.8.6


Former-commit-id: 876bc92865605be872bc811a56a1d1e05490ec8a
2024-06-03 18:29:38 +08:00
hiyouga
64d24842fe fix data loader hint
Former-commit-id: 49b1e88e3da3be0fb78f53e5f924a9be67568a02
2024-06-03 18:28:27 +08:00
ylfeng
62d55b71a3 remove empty line
Former-commit-id: b47e3174472f458a3a8b84a66b475da8fce6db79
2024-05-31 21:43:08 +08:00
ylfeng
0feb2ad35c fix eos
Former-commit-id: 84aee579013f0c095a918a8c61611ccbb1d7fc84
2024-05-31 21:40:41 +08:00
ylfeng
8350e508d3 supervised packing with greedy knapsack algorithm
Former-commit-id: f9db439cb7511b12aa3524d5fdcc45864aebda91
2024-05-31 15:33:54 +08:00
Xu Song
abe33220bf Update model_args.py
Former-commit-id: dade2f083d398f83581d935f44d20dc45244c924
2024-05-31 14:35:48 +08:00
statelesshz
6a6f07053d Update bug-report.yml
Former-commit-id: f78e21f3417c9b561800db71d86f55defd3fa106
2024-05-31 13:18:18 +08:00
Uminosachi
0de4e1e9e2 Set scheduler_specific_kwargs to get_scheduler
Former-commit-id: 14e97dc1192f6cf94ab99eb3a9b8c64029040384
2024-05-31 13:45:39 +09:00
hiyouga
72ebcb9a04 update readme
Former-commit-id: c4f50865ad798e1e99044480e1ab05abefc30224
2024-05-30 16:40:17 +08:00
faddddeout
64976e426c fix cann't interrupt training when using multi GPUs in webui
Former-commit-id: b13d03946ed7e39f848988f7b75485a9b69bae09
2024-05-30 08:39:21 +00:00
hoshi-hiyouga
e24276cab6 Update wechat.jpg
Former-commit-id: 2f38c1f5fded2ccaa5c92bc9fe0f426e87077100
2024-05-30 12:48:47 +08:00
hiyouga
107e39f2de fix #3837
Former-commit-id: 3404e8f302d0b0308825fccedec82d8781b8c39e
2024-05-30 00:52:26 +08:00
hoshi-hiyouga
9b6bdf9449 Merge pull request #3829 from seanzhang-zhichen/add_dataset_sample_num
Add dataset sample num

Former-commit-id: 483eb47e5d670e23fb713b942f6890b8259f4363
2024-05-30 00:25:45 +08:00
hoshi-hiyouga
7b83c550ab Update loader.py
Former-commit-id: ca5dd7c6c115a359e4b50e93f4ffcc9f2955ec2f
2024-05-30 00:20:20 +08:00
hoshi-hiyouga
9fc713da89 Update loader.py
Former-commit-id: f9a88b89ca8b8f9a0c5def03b154f9d67f558edf
2024-05-30 00:17:21 +08:00
hoshi-hiyouga
c0f11a280e Update loader.py
Former-commit-id: b55fb611c57be03fb38218c7da1d96f6848496ba
2024-05-30 00:12:12 +08:00
hoshi-hiyouga
69a51cacb1 Update parser.py
Former-commit-id: 51dd454337941801d0a66eaadb0da2e007e9573d
2024-05-30 00:05:20 +08:00
hoshi-hiyouga
21e7979837 Update README_zh.md
Former-commit-id: c8ae7e0e6571c7ca2e526da3e8adda5f8c9948f1
2024-05-30 00:04:47 +08:00
hoshi-hiyouga
eb7ee82f16 Update README.md
Former-commit-id: 3761d7d5dd97ce2fe0098284e6d4821fc0d63d30
2024-05-30 00:04:26 +08:00
hiyouga
820404946e better llamaboard
* easily resume from checkpoint
* support full and freeze checkpoints
* faster ui


Former-commit-id: 80708717329b4552920dd4ce8cebc683e65d54c5
2024-05-29 23:55:38 +08:00
hiyouga
19a3262387 fix cohere system
Former-commit-id: d0aa36b8ad02287d97930101958456c523e699d3
2024-05-29 20:58:23 +08:00
hiyouga
c05cb3769f fix #3965
Former-commit-id: 0930f5869929634baa0881167d3d6c714afc63d9
2024-05-29 20:55:51 +08:00
hiyouga
a71a6a05c3 update readme
Former-commit-id: 89ca832740731dfb121175aa5c16b13bd4944011
2024-05-29 18:39:11 +08:00
hoshi-hiyouga
2e7dae0f97 Merge pull request #3930 from MengqingCao/npu
Add Ascend npu doc and dependency

Former-commit-id: 880b4a9acf5955f607639bfcaba3f3e8aae32c6d
2024-05-29 18:33:38 +08:00
MengqingCao
2192616770 update torch-npu version
Former-commit-id: b19d33b9d205911ffd191bd0eadddd162b692e68
2024-05-29 10:05:11 +00:00
MengqingCao
29fe1cd688 update cann kernels url
Former-commit-id: e14f5b37e4cf6086d80e600c88a4e2e402a74a72
2024-05-29 09:53:31 +00:00
hoshi-hiyouga
10ab2861d5 Merge pull request #3958 from hzhaoy/add_telechat_12b_support
add TeleChat-12B/TeleChat-12B-v2 models

Former-commit-id: bcddd5b066b97e2dcdff4fd8e0a8595e4bbd7fa1
2024-05-29 17:20:53 +08:00
hzhaoy
ce1be3da4b add TeleChat-12B/TeleChat-12B-v2 models
Former-commit-id: 0dd632fe9e5bbf08605d4b9c6887208b7a127317
2024-05-29 15:00:37 +08:00
codemayq
2540ce58c0 update wechat_npu
Former-commit-id: 4728fe62d183603f08c3c1fa94f18a7c67d48b85
2024-05-29 11:13:59 +08:00
hiyouga
05277ee864 fix hf chat engine
Former-commit-id: 97346c1d3d87f0bd5ddcd70ff485f6a8273244aa
2024-05-29 01:20:07 +08:00
hiyouga
13e7b64641 add ds config to webui
Former-commit-id: e4b420c146235b2bce70d66a081efd137aef98af
2024-05-29 01:13:17 +08:00
hiyouga
468d0e7ed1 10x generate in ppo w/ zero3
https://github.com/huggingface/trl/pull/1483

Former-commit-id: 65cd8bdbdbe1b19250ecd813aeb72c8e00ef2f9c
2024-05-29 00:23:23 +08:00
hiyouga
bfac965f9c update dpo, kto trainer
Former-commit-id: 7c8e01bb74bb2d2da5dba5059a9c262e4730b802
2024-05-29 00:14:29 +08:00
hiyouga
14f6cc2b7c clean kto trainer
Former-commit-id: 900e1ea622a2ffa45c5e2a359471962563fabca7
2024-05-28 21:43:26 +08:00
hiyouga
87e71df597 bump vllm version to 0.4.1
Former-commit-id: 1e80a3a6385f615bf038806b9c6b1f73f4a3e24f
2024-05-28 21:27:27 +08:00
hiyouga
3152c7dd1c update readme
Former-commit-id: 087b9faa3947bf6d2a53a8dedef487a662d426af
2024-05-28 19:35:52 +08:00
hiyouga
3ea8f5e6b9 support DDP in webui
Former-commit-id: 7c016b22aa9208ec14f00a9bdb51f69aebb02af5
2024-05-28 19:24:22 +08:00
hiyouga
2a473f36fb update readme
Former-commit-id: c8765349bae1bf659cf358469ff61f2b12b7536c
2024-05-28 16:41:34 +08:00
hiyouga
ac9c52dfb4 update readme
Former-commit-id: 99ee0dadd914e13a63a49944680195d30226843a
2024-05-28 16:19:56 +08:00
hiyouga
f41319f31b fix #3931
Former-commit-id: 5d45adf47dc9942ec0aff1e35913d027cca607a0
2024-05-28 13:44:22 +08:00
MengqingCao
099a932cbc add Ascend npu doc and dependency
Former-commit-id: cd67d6eeb55ca2a096e344ba43fc20d8b739f3f7
2024-05-28 01:33:54 +00:00
hoshi-hiyouga
4f4e3160be Merge pull request #3925 from Yimi81/feat-fix-yi-template
fix yi template

Former-commit-id: 50912484d33cf7ee2906454fb9d7e68f2ba87bea
2024-05-27 22:59:32 +08:00
Yimi81
7324984127 fix yi template
Former-commit-id: dc07413e7d0b138c89eacaef17596e83ef226540
2024-05-27 13:11:25 +00:00
hiyouga
0706dbf7e6 tiny fix
Former-commit-id: c1fdf81df6ade5da7be4eb66b715f0efd171d5aa
2024-05-27 20:54:26 +08:00
hoshi-hiyouga
ad3ca3f556 Merge pull request #3921 from gusye1234/main
Add openchat-3.6-8B support

Former-commit-id: 87ea0a8bcd8d76a9e916cc8da6905bc805bb18aa
2024-05-27 20:52:37 +08:00
hoshi-hiyouga
eceec1d7fd Update template.py
Former-commit-id: f1002b9f930758bb27794ab88a2adbe24417b076
2024-05-27 20:51:56 +08:00
hoshi-hiyouga
b7b8223230 Update template.py
Former-commit-id: 122213a7a7e114b0c390158cac0ae9faeceb2efc
2024-05-27 20:51:26 +08:00
Jianbai Ye
d2c1df7f3d add openchat-3.6-8B support
Former-commit-id: cff815391fd15f30647e8694e08c47a514fd6eb2
2024-05-27 20:42:08 +08:00
hiyouga
b88ecd71fd fix full/freeze tuning for mllm
Former-commit-id: 08564838bd02651668845ed74e2e60561e5b6d8c
2024-05-27 20:37:57 +08:00
hoshi-hiyouga
605e70d0e1 Merge pull request #3835 from BUAADreamer/main
fix some features in llava-style training

Former-commit-id: 838f2fb3e423a0471ff2898f737401e92bbafe2b
2024-05-27 20:23:45 +08:00
hiyouga
fc5a6b5c4e support Aya23
Former-commit-id: e626e264460d12b282099bfbb8e6679c31e85fc0
2024-05-27 20:23:24 +08:00
BUAADreamer
f9ced0480e Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 576b0206c27f93ffe19e3b7e6df58a3cd2abbb1d
2024-05-27 20:11:23 +08:00
BUAADreamer
4a958ab909 Merge branch 'hiyouga:main' into main
Former-commit-id: e2022ce4e90b115fb8271ef0f6bf05e8f39c997f
2024-05-27 20:10:58 +08:00
BUAADreamer
ea78a629ba remove mllm_pt_demo.json
Former-commit-id: f665342a2752ffb5d715f134603d84e5228f55dc
2024-05-27 20:10:31 +08:00
hiyouga
db569a2d61 add llava 1k datasets
Former-commit-id: 08bd0440b52dbe2e6d28323900ca1a07751605f9
2024-05-27 19:57:33 +08:00
hiyouga
710642827a update dpo examples
Former-commit-id: 30e1c8e7450a68ccabede245cbc09b416ef7a94d
2024-05-27 19:56:04 +08:00
BUAADreamer
5632ba3fa8 Merge branch 'hiyouga:main' into main
Former-commit-id: ea2afd429eab85a67d562c3f7d571ede31320393
2024-05-27 19:00:48 +08:00
BUAADreamer
daa0908276 add only tune lm and mm_proj
Former-commit-id: 7ae9a4726cb99abb4c80f6b4b37590dc04ea6660
2024-05-27 19:00:15 +08:00
BUAADreamer
606240aec0 add regex of only tune lm and mm_proj
Former-commit-id: 57eb13b75d8597d748e84d3549a0b08876b669db
2024-05-27 18:59:00 +08:00
hiyouga
51a1097c64 add phi-3 7b/14b, mistral v0.3 models
Former-commit-id: efa4b196ca8053881bb9d15cfb571204bcb0bbda
2024-05-27 18:20:16 +08:00
hiyouga
df33548b39 update readme
Former-commit-id: 5581cb2e4e59f3f8109e2acd4611789f9e50bfca
2024-05-27 18:14:02 +08:00
BUAADreamer
a6c2a2071d Merge branch 'hiyouga:main' into main
Former-commit-id: 4bc7c10c00e6e9b5af8538af907178a37e3595f8
2024-05-27 11:54:01 +08:00
codemayq
556a0c3ea5 update wechat
Former-commit-id: 026e88ab748e9133483a4ebe1af440126a3db2df
2024-05-27 10:04:51 +08:00
hiyouga
4807c11db8 support SimPO #3900
Former-commit-id: cb63b32986c43f97994211ec34dc5928fc3bb9d7
2024-05-26 23:46:33 +08:00
BUAADreamer
3eaf371a22 Merge branch 'hiyouga:main' into main
Former-commit-id: 60170a1da42a395cf440bbd3825c4e295c31ac38
2024-05-25 14:18:49 +08:00
hiyouga
e5d2ef4434 fix #3853
Former-commit-id: 063f91cc80193853d17c55fe092fb33683f5d39c
2024-05-24 23:29:45 +08:00
seanzhang-zhichen
9c8d79fbe3 Merge branch 'main' into add_dataset_sample_num
Former-commit-id: 27cb51f7f86f97ae231abfdcb0114ff245d7af9c
2024-05-24 15:57:47 +08:00
BUAADreamer
119af92620 Merge branch 'hiyouga:main' into main
Former-commit-id: 047a06a1e5336625acac14b3533ab3ef2b9905be
2024-05-24 09:50:00 +08:00
hiyouga
3e729798df refactor data preprocessing, fix mllm rlhf
Former-commit-id: 3a023bca2a502810a436cfba7708df164754ea62
2024-05-24 04:08:25 +08:00
hoshi-hiyouga
77b5779746 Merge pull request #3876 from dongdongqiang2018/main
added adapted to 910B image

Former-commit-id: a506f3628ba67cc2f7829c8a7da5a044fa8c9164
2024-05-24 01:54:30 +08:00
hiyouga
d3490aceb7 fix paligemma sft
requires transformers>=4.41.1


Former-commit-id: de0e67aff13f191fd899ad717ec349a6bdb14f2a
2024-05-24 00:23:40 +08:00
hiyouga
6d8ef03741 fix oom issues in export
Former-commit-id: 67ebc7b388c61b9d880c02d7fd217c29299fdf43
2024-05-23 23:32:45 +08:00
donggang
3f52df0ca9 adapted to 910B image
Former-commit-id: 2f68a71fc005f40041a85740513f77512e386669
2024-05-23 09:48:22 +00:00
BUAADreamer
d8a27e40e2 Merge branch 'hiyouga:main' into main
Former-commit-id: 8d53ec2b5f37e7b43da8d3e787f68fc1bb15997a
2024-05-21 22:18:20 +08:00
hiyouga
4ddc1c9c16 fix paligemma sft
Former-commit-id: 7134fb02bbdc9421f6c314ae176d5786a8cd768d
2024-05-21 20:03:09 +08:00
hiyouga
a8480baa11 Update README_zh.md
Former-commit-id: 4d647ddba5934b4d9f594c472aa6b46865bb525a
2024-05-21 18:30:59 +08:00
hiyouga
eabaf0def8 update wechat
Former-commit-id: 2670f6fb3ddabc4da3b0ed49baa40950744e75d7
2024-05-21 18:22:32 +08:00
hiyouga
11f79ea20e fix #3847
Former-commit-id: 335501e228b7c2c2e3041533ddd996127b958f23
2024-05-21 17:53:06 +08:00
hiyouga
c03be5fe63 Update wechat.jpg
Former-commit-id: 789e73b0f4c7a71afde488de5e8c3cfccccdddfe
2024-05-21 17:09:43 +08:00
BUAADreamer
071d674065 support pretraining of llava
Former-commit-id: 29a6d5bdb8610be8f796eed65eede9ba7b503527
2024-05-21 08:57:14 +08:00
hiyouga
cce3892f91 support paligemma
Former-commit-id: 2a67457e3944d5e528286cb7203857c13078c484
2024-05-21 00:01:22 +08:00
hiyouga
a935c5105d fix paligemma data preprocess
Former-commit-id: e55c85ac72f4938738dbce576f83b47a1fea88ae
2024-05-20 23:51:32 +08:00
hiyouga
446c681b58 fix paligemma inference
Former-commit-id: 542229abb3aba2032d4c52a878c0fd35ba299691
2024-05-20 23:36:43 +08:00
hiyouga
7f6c37c68e fix #3818
Former-commit-id: 7262679666bf70816911ff2434c7c7ccbca26378
2024-05-20 21:43:19 +08:00
hiyouga
5351e3945b add kto to webui
Former-commit-id: 9b0f4d7602f70031cc1a5fd66616cbe6bb4d78d3
2024-05-20 21:20:25 +08:00
zhangzc
4b90f04c1f fix conflict
Former-commit-id: d956041640d9abc5e59919a227d27270fb513a7e
2024-05-20 17:10:01 +08:00
hiyouga
864da49139 fix chat engines
do not use pop(key, default) since api assigns None to dict values


Former-commit-id: d52fae2fa866afeb6156dc98388ce5cc6d5eca77
2024-05-20 00:36:43 +08:00
hoshi-hiyouga
6955042c10 Merge pull request #3812 from ycjcl868/feat/chat-support-system-prompt
feat: cli chat support system_message
Former-commit-id: aa0bca49e9940e96a75f61f31c69580052f6ae1d
2024-05-20 00:31:32 +08:00
hoshi-hiyouga
02fdf903e8 Update vllm_engine.py
Former-commit-id: a0e8d3d159444a73a5ff07af3815cd2aaee0b056
2024-05-20 00:31:04 +08:00
hoshi-hiyouga
30b2ec7025 Update hf_engine.py
Former-commit-id: a943a1034b0033e2fae72e3d272817e3adb03fd1
2024-05-20 00:30:45 +08:00
hoshi-hiyouga
a710d97748 Update generating_args.py
Former-commit-id: a1fa7aa63b9b3fade3de6bd27395c1b94068b6d2
2024-05-20 00:29:31 +08:00
hoshi-hiyouga
b293939c24 Update chat_model.py
Former-commit-id: 896c656185e772c2c9ba9e6108de7ceec84ecc85
2024-05-20 00:29:12 +08:00
hiyouga
0e57bb201c fix jinja template
Former-commit-id: 10573e1639e7a71813927a8bfff3b036c21064c3
2024-05-19 23:38:30 +08:00
ycjcl868
b28f9ecaa0 feat: cli chat support system_message
Former-commit-id: a08ba254c8b62bff49b77be3740022105ae9dbb5
2024-05-19 23:17:46 +08:00
hiyouga
8d4a5ebf6e fix zero2 high ram usage
Former-commit-id: 31a0564d4f4886db03250f2c6daee6e042dc3eb4
2024-05-19 21:53:54 +08:00
hiyouga
5f48c282d3 fix hf gen args
Former-commit-id: 70214b71b18c75be59576153951beff1ce9ff8f6
2024-05-19 19:39:32 +08:00
hiyouga
32a65e89e5 fix envs
Former-commit-id: 8ee8ac6eba3e2916cf7c6401a0e9d803b3ff88ba
2024-05-19 18:27:18 +08:00
hiyouga
df4aec7e72 fix #3807
Former-commit-id: 1ebc890a5ff7b034c112bc9cf5cd8a6936613572
2024-05-19 17:07:57 +08:00
hiyouga
62ddab4b3a update readme
Former-commit-id: 2bec28e328ee80026417f3d055f6d6038479fbfa
2024-05-18 23:09:03 +08:00
hiyouga
02f716907e safe output path in webui
Former-commit-id: 3c2a992caa45c9121cd1ccac3de9bbcf1a9b058b
2024-05-18 22:42:28 +08:00
hiyouga
7130efff54 fix jetmoe z3 block
Former-commit-id: d43822fcc220806b9eb7cbf9336ef42a0e6b2a51
2024-05-18 22:28:45 +08:00
hiyouga
519d2511ae improve data process logger
Former-commit-id: a851056229f37391023627180b5712ed64ae3528
2024-05-18 22:02:42 +08:00
hiyouga
c53e626c9a update data readme
Former-commit-id: ca48f90f1eb9828300635bdaee6c10d6cc632d3d
2024-05-18 21:37:38 +08:00
hiyouga
68c07d3e1e update data readme
Former-commit-id: 18cbf8561d6c3fdceac47991ed16d35471823187
2024-05-18 21:15:20 +08:00
hiyouga
1e867c0fa0 fix #3803
Former-commit-id: 0edc16769f7e84b74e5fc6a1382e284632567c4c
2024-05-18 16:13:14 +08:00
hoshi-hiyouga
9fba1bb649 Merge pull request #3799 from hiyouga/dev
improve KTO impl, replace datasets

Former-commit-id: 73d4a8e655a02d4d1db9fb18d0cc718a5a07a143
2024-05-18 03:49:13 +08:00
hiyouga
13d7b48efe improve KTO impl., replace datasets
Former-commit-id: c450ee87a35ff9235f9b695b0de2e042b2971178
2024-05-18 03:44:56 +08:00
hoshi-hiyouga
97469892c3 Merge pull request #3785 from enji-zhou/feature/add_kto
add kto

Former-commit-id: 33a354548e78a7f7f51d63f80974920827d30252
2024-05-18 03:07:18 +08:00
hoshi-hiyouga
2d1583faba Merge pull request #3794 from jue-jue-zi/main
feat: pass the `max_lora_rank` parameter to vLLM backend
Former-commit-id: d7ff49f245cd34668cbe43366e5f1890876da5e7
2024-05-17 16:17:30 +08:00
hoshi-hiyouga
e4a2accf4a Update model_args.py
Former-commit-id: 964672745389e35580a7010b0f010bd5ee08d542
2024-05-17 16:16:41 +08:00
juejuezi
20326affde feat: pass the max_lora_rank parameter to vLLM backend
Former-commit-id: b20d62ba3ccc5c02529d19e22b7adcfe8b88c326
2024-05-17 16:07:39 +08:00
hiyouga
9af3dce3c8 add deepseek v2 lite model
Former-commit-id: 8af98176055b6fc28d16b03207b5abaa7de6104a
2024-05-17 13:25:36 +08:00
enji.zhou
03956053b8 add kto
Former-commit-id: db1d5a4f51faae61fe18666057353747b01f5b8d
2024-05-17 13:09:17 +08:00
hiyouga
1bbbcb5895 Update wechat.jpg
Former-commit-id: 84415492bfdc620507bff8c7a8eedbfba812ef51
2024-05-17 12:18:03 +08:00
hiyouga
947f0e9964 update badam example #3764
Former-commit-id: e5bba7cf1bd5317a2446b67ee5e0e245bb8b4ad4
2024-05-17 02:21:10 +08:00
hiyouga
780a1f5a4e better dtype handle in loading
Former-commit-id: d9f190ff1ea1cc4dd061e8b03d429caea037bca4
2024-05-17 02:14:56 +08:00
hiyouga
dfff5119b4 update examples
Former-commit-id: ddec9e1b842d407790637e9b0b181f8b26926db9
2024-05-17 01:02:00 +08:00
hiyouga
f4bf49e891 enable inbrowser in webui
Former-commit-id: 694a05fd044bbbad107ca8fed5494460c78e1981
2024-05-17 00:08:56 +08:00
hiyouga
22f71c152a add falcon 11b
Former-commit-id: d77bed4091a6a8fea682b39d3261e1e93dfe093f
2024-05-17 00:08:33 +08:00
hiyouga
5eb8107db2 fix examples #3769
Former-commit-id: 3df986c6793a51ec2cb5f31fd1808cd3a9883bc4
2024-05-16 19:12:09 +08:00
hiyouga
cae823ddf0 rename package
Former-commit-id: 308edbc4260d45907b4a9d3a45ec21d83e48aacb
2024-05-16 18:39:08 +08:00
hiyouga
93a289107b set dev version
Former-commit-id: b2fc7aeb03fbb40e9beb27e9958c958ee48e23cf
2024-05-16 02:17:31 +08:00
hiyouga
b5034f2b12 release v0.7.1
Former-commit-id: 1c910079d8544c433add2d949a8378822d1425c9
2024-05-16 00:57:16 +08:00
hiyouga
6e6267f17c fix #3694
Former-commit-id: 2a67ab3925f0c17c4cb5e8c5a5e2cc6a9dc7d47e
2024-05-16 00:35:28 +08:00
hiyouga
a84f155563 fix #3606
https://github.com/huggingface/peft/pull/1706

Former-commit-id: 44cfa9a1cda4e7b2cefd7792d7c166971da2fd48
2024-05-15 23:05:02 +08:00
hiyouga
757e172509 add Yi-VL-34B model
Former-commit-id: a388cadfc0bf3f7197f265a925fe89598aa5ee0d
2024-05-15 22:58:19 +08:00
hiyouga
74727c03e8 add yi-vl 6b model
Former-commit-id: 73845fcc464a083d75e5dbe39d93611f1488ccfe
2024-05-15 20:02:41 +08:00
hiyouga
b4c5a08d06 fix yi vl vllm infer
Former-commit-id: 51d61fcc89a0acc6e17b97865e277845294c0bd3
2024-05-15 19:25:48 +08:00
hiyouga
7ebd06dc1a add NPU docker images
Former-commit-id: e1f4e53915fc4dcc309e2b1bea27f6d11f63083a
2024-05-15 19:20:11 +08:00
hoshi-hiyouga
82a10c569a Merge pull request #3748 from BUAADreamer/main
Add MLLM YI-VL and save processor config during training

Former-commit-id: 75f405ec30dff921e42c6c90b2722a0f8b26d41b
2024-05-15 16:40:54 +08:00
hoshi-hiyouga
e80e50805c Update visual.py
Former-commit-id: cbeef2aaea0577fd1929e7f156a2b8601b31814e
2024-05-15 16:39:57 +08:00
hiyouga
f2b4237db1 fix fsdp model loading
Former-commit-id: 008e3b3b1075199d1a62d510a8e0f212207a06b9
2024-05-15 16:32:28 +08:00
hoshi-hiyouga
e09d68985f Update patcher.py
Former-commit-id: 5a0c8a8d343adb15b510f65286ee08f33b1b2751
2024-05-15 15:37:07 +08:00
hoshi-hiyouga
3d65c4ceab Update template.py
Former-commit-id: 780ca8306b31d5ac856f68de3abed7e838848464
2024-05-15 14:20:39 +08:00
hoshi-hiyouga
cea8cea9dd Update trainer.py
Former-commit-id: aa4a8933dd520227401b7041dae40fc6fb2ddaa2
2024-05-15 14:13:26 +08:00
hoshi-hiyouga
7622300c4b Update workflow.py
Former-commit-id: c309605ff565dc34d043314269fce5881212c27c
2024-05-15 14:13:01 +08:00
BUAADreamer
e1c2ff41a0 rm extra import
Former-commit-id: db1622f76b0fe9d669af206299ecec10954647af
2024-05-15 12:48:18 +08:00
BUAADreamer
3f38ef9f59 cast dtype in mm_proj
Former-commit-id: d2bf69740043012a0025dd9d80c7adf979dc3a88
2024-05-15 11:22:15 +08:00
BUAADreamer
dbc7b1c046 modify style
Former-commit-id: 771bed5bde510f3893d12cafc4163409d6cb21f3
2024-05-15 10:18:10 +08:00
BUAADreamer
df3a974057 Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 3f4556454c3a9c8ae7db98081b88073fff790f15
2024-05-15 09:54:21 +08:00
BUAADreamer
7d1d73b941 Merge branch 'hiyouga:main' into main
Former-commit-id: 70461444991dc14536cbaa09905d619de8b3c7f4
2024-05-15 09:54:14 +08:00
BUAADreamer
92b184101f add yivl and save processor to model_dir
Former-commit-id: afc6c7b9fd350f9f611a220363a3caa930ac56aa
2024-05-15 09:54:00 +08:00
hiyouga
967b9c0a49 fix bug in vllm engine
Former-commit-id: 11bf282dcc0ee257f2c28f46cc1a8edcf62421dc
2024-05-15 02:17:54 +08:00
hiyouga
ef167f839d fix gen args
Former-commit-id: 144801db09ec7f183ab455d7a88c76de7639333d
2024-05-15 01:49:05 +08:00
hiyouga
213ba09b24 fix examples
Former-commit-id: 7e69e71a52c736d0e42afbf61a3b3c22db606bc2
2024-05-15 00:26:10 +08:00
hiyouga
c4743674ab update examples
Former-commit-id: 5bdad463875100e402329d47cd4c14bf9bc3b84b
2024-05-15 00:05:17 +08:00
hiyouga
be1114bb43 update readme
Former-commit-id: b96d84835f9237e7277bb86395e448348473d20f
2024-05-14 23:57:08 +08:00
hiyouga
943779eabc update readme
Former-commit-id: fc547ee591ef3cfc1bdbb8297a75a74f05c83c82
2024-05-14 23:55:49 +08:00
hiyouga
f5df1ceaf1 add npu examples
Former-commit-id: af343034dd31303be59678af9d1eae338864e884
2024-05-14 23:32:53 +08:00
hoshi-hiyouga
e32a44fe6b Merge pull request #3584 from zhou-wjjw/main
Enhancing Ascend 910A Training Efficiency in LlamaFactory with NPU

Former-commit-id: ee4752f6d209f3f8ac6cf90ef7304e26848e211b
2024-05-14 22:18:37 +08:00
hiyouga
ec9ed23cfd use robust envs
Former-commit-id: c187b20aaa0a0eb7300d537fd9006bf977a02854
2024-05-14 21:36:42 +08:00
hoshi-hiyouga
082506eba8 Update train.py
Former-commit-id: 1c3c4989022025db756965350ae0381fc9db32e5
2024-05-14 20:47:52 +08:00
hoshi-hiyouga
fe586de344 Apply suggestions from code review
Co-authored-by: Huazhong Ji <hzji210@gmail.com>
Former-commit-id: 9089bc70c8838cb80473e557a750855f7b7a7695
2024-05-14 20:44:21 +08:00
hoshi-hiyouga
332f44fa43 Apply suggestions from code review
Co-authored-by: Huazhong Ji <hzji210@gmail.com>
Former-commit-id: 0ac6e73f9971a9310026ddc609b5266cb1639b64
2024-05-14 20:44:04 +08:00
hiyouga
5a5d450648 fix #3728
Former-commit-id: cfaee8b4cf5f89d767a20a057d2335bd30ec83a2
2024-05-14 20:37:21 +08:00
BUAADreamer
6c1561d73c Merge branch 'hiyouga:main' into main
Former-commit-id: 60b99f80c2d40c0601fed1afdf6fe04c8401876f
2024-05-14 16:51:38 +08:00
BUAADreamer
9e247245a2 modify yi-vl template
Former-commit-id: d72e6f8dfd670533f3bbdf0bf5e7d596e2dd34ac
2024-05-14 16:45:28 +08:00
hiyouga
1c089ccfee Update wechat.jpg
Former-commit-id: e8b97d2f79fb8ee8cb3442b6750899c3396bbd8b
2024-05-14 15:56:23 +08:00
BUAADreamer
661565fc2e add support for Yi-VL
Former-commit-id: ab3464ce6530830c14fde68f0a8990185db80592
2024-05-14 14:03:19 +08:00
BUAADreamer
ccb87c6ae8 Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 45654ebedbf3ac03fda69e7dbdda6268bcaafdae
2024-05-13 23:28:52 +08:00
BUAADreamer
4583c534f9 add yi-vl
Former-commit-id: 64dac4085e3949f20ab66e507cfb199b09189ead
2024-05-13 23:28:28 +08:00
hiyouga
3318b6e188 update examples
Former-commit-id: dae83f419919305cb23bb2b9da1277a1616179c5
2024-05-13 20:39:36 +08:00
hiyouga
68540734fb fix #3724
Former-commit-id: 93a02454746bd39e8f284e94a18bead80f545dae
2024-05-13 20:09:09 +08:00
hiyouga
414049ba20 fix #3702
Former-commit-id: c27afa296bc8ae2b0611b3248200e88e4c185aef
2024-05-13 18:24:35 +08:00
hoshi-hiyouga
ed546236c0 Merge pull request #3655 from Tendo33/main
1.Change the name of is_fastapi_available function 2. Added the log of printing requests when deploying using vllm

Former-commit-id: f7c8eddbc584ab788579a53823ffe5b5808883b8
2024-05-13 18:05:50 +08:00
hiyouga
3d6a80660e support Yi 1.5
Former-commit-id: d12b8f866aa51e5e22d2b3d29704a13308de3e5b
2024-05-13 16:51:20 +08:00
Tendo33
93cbb0e2fc ruff check scripts src tests --fix
Former-commit-id: b2bf7f5724f7962fef6b6d9d82c7a5bea9cbae47
2024-05-13 09:40:33 +08:00
Sun Jinfeng
b8b97ef4cf Merge branch 'hiyouga:main' into main
Former-commit-id: 17cd57f914a996ca93ed31018b5adc48e3d1a818
2024-05-13 09:29:58 +08:00
hiyouga
c627d358a9 lint
Former-commit-id: 482d412dd961896b362ef574a3df5b2d58003327
2024-05-12 01:28:51 +08:00
hiyouga
5f61ae6a5d fix #3658
Former-commit-id: 4777efe517c05a599f0ccdf9ccf760f3986d126e
2024-05-12 01:25:16 +08:00
hiyouga
51e0f095a9 remove checksum and fix ui args
Former-commit-id: 58c522cd5cc4498a3fa8ed99424b5d63c9e56ccb
2024-05-12 01:10:30 +08:00
hoshi-hiyouga
6a126f0caf Merge pull request #3654 from betapeanut/main
Remove Redundant Environment Variable Usage

Former-commit-id: d06d56661b182b54e2ccb17a7c015c0adc00dfc3
2024-05-12 00:49:00 +08:00
hiyouga
0f941f30f7 update readme
Former-commit-id: 638043ced426c392014c5f42ce00f378f92f905d
2024-05-12 00:33:49 +08:00
hiyouga
10e65f0042 fix #3674
Former-commit-id: 56857770f8e66d667e3fe3ad7a11ab321c7fe020
2024-05-12 00:03:59 +08:00
hiyouga
88159688bb fix llava config
Former-commit-id: b033232aeaa1890ec6946387608aad4779a7ba10
2024-05-12 00:02:49 +08:00
hoshi-hiyouga
ab94060839 Merge pull request #3651 from BUAADreamer/main
add some mllm features and try to incorporate Chinese-LLaVA-Med project

Former-commit-id: 5da097f40672e34dbe96b0a7538f3e27dc4a8f29
2024-05-11 23:59:08 +08:00
hoshi-hiyouga
7e0ffc0a64 Update loader.py
Former-commit-id: 5bfa8e4667534ca7737c5991f59c24ff0d6dc02f
2024-05-11 23:58:47 +08:00
hoshi-hiyouga
28d9d7274d Update model_args.py
Former-commit-id: bb2e6b0ea3d5ac62401f075a05feccca3afbc4b4
2024-05-11 23:57:05 +08:00
hoshi-hiyouga
fb14d57e97 Update patcher.py
Former-commit-id: 708aa5e098b0be90c9dfe6a30b9912883e3bcc04
2024-05-11 23:56:40 +08:00
hoshi-hiyouga
4781b63edb Update tuner.py
Former-commit-id: 5f72439a1d1f5cd9ade8bd30056c0dfb6059c1bd
2024-05-11 23:55:59 +08:00
hoshi-hiyouga
17975fefd7 Update tuner.py
Former-commit-id: 13851fb04524e3a599b6c07d749f7463b8f75319
2024-05-11 23:54:53 +08:00
hoshi-hiyouga
1dd674697c Update README_zh.md
Former-commit-id: 1049b29253f332f3f02dff912b8b1b420767de4e
2024-05-11 22:44:51 +08:00
hoshi-hiyouga
fde0304e9f Update README.md
Former-commit-id: b8d5d9c8ef2b76713caba96c91642f4f80fffd3d
2024-05-11 22:43:04 +08:00
hoshi-hiyouga
6c3efe04e1 Merge pull request #3683 from YUUUCC/patch-1
Update constants.py to fix the download issue of the Phi-3 model

Former-commit-id: a384f00018a993118e13b3d33bba6e09530f13dd
2024-05-11 16:43:02 +08:00
BUAADreamer
c3e15c049b Merge branch 'main' of https://github.com/BUAADreamer/LLaMA-Factory
Former-commit-id: 7944cbc5764fa884347a341bf2fde00f570c205d
2024-05-11 13:11:10 +08:00
BUAADreamer
743d0f22b7 add full parameter finetuning of mllm
Former-commit-id: 7be7972f28f3e2a0f4138d10d1eb6f06da9d97fb
2024-05-11 13:11:00 +08:00
BUAADreamer
2306cb3ced Merge branch 'hiyouga:main' into main
Former-commit-id: 15dab0677eae8dbb2a059d1c5d0f403d2331f62b
2024-05-11 13:10:36 +08:00
codingma
3cd448c01b Merge pull request #3661 from codemayq/main
fix sha1 of glaive_toolcall dataset

Former-commit-id: 101409d9cbb5b6ec352bc7888706ac4058969394
2024-05-11 10:12:21 +08:00
kkkl
639c6e9cad Update constants.py
Fix the download issue of the Phi3 model

Former-commit-id: b5c5c315a54504fc35b0f94b613692b9061cac18
2024-05-11 00:22:40 +08:00
BUAADreamer
012d93da84 Merge branch 'hiyouga:main' into main
Former-commit-id: 508d474754c7cfe25924290ba2b26d2c1a5846aa
2024-05-10 20:34:41 +08:00
codingma
e4dba0e948 update wechat
Former-commit-id: cd5bb2a0a123997639942f9f79b5ee6e05b71f76
2024-05-10 17:25:25 +08:00
hiyouga
9dc209b458 resolve python 3.8 package
Former-commit-id: 75aec4cf8e9089808a1731e2848b29191f26d51d
2024-05-09 16:52:27 +08:00
codingma
e017fb67d0 fix sha1 of glaive_toolcall dataset
Former-commit-id: d5520b6017df01e807fe3a913ee6654814359d5d
2024-05-09 16:33:45 +08:00
Tendo33
dd42439b03 1.Change the name of is_fastapi_available function
2. Added the log of printing requests when deploying using vllm


Former-commit-id: fd2e6dec589f4ebe55d4c203991c47bf5b728ef8
2024-05-09 14:28:01 +08:00
BUAADreamer
a185cf7e18 add push processor to hub
Former-commit-id: 8b997e32fb19d60ab81c2c3437a3b40aa5bdeee3
2024-05-09 14:05:19 +08:00
BUAADreamer
08de91434c add mllm processor save and Chinese-LLaVA-Med show
Former-commit-id: fdb3955448cd4c8d5a7a2cbceac1e9e6fd1e34cc
2024-05-09 13:53:39 +08:00
BUAADreamer
db30e9089a Merge branch 'hiyouga:main' into main
Former-commit-id: 83f2f0de1d85ff6320419588003aa999b40fc6a8
2024-05-09 13:45:43 +08:00
cocktailpeanut
2370e7403f yet another removal of unnecessary environment variables
Former-commit-id: 3c11157a496ae5a1e786870e4642475e53aad123
2024-05-09 01:33:20 -04:00
cocktailpeanut
58c5a5afaf more removal of unnecessary environment variables
Former-commit-id: 425b9d616622467487339d5055b5d513c0fe7814
2024-05-09 01:32:00 -04:00
cocktailpeanut
de509fa081 remove unnecessary environment variable usage
Former-commit-id: b783673e0aa064963d9cce712378f73c9b5ff51d
2024-05-09 01:26:15 -04:00
BUAADreamer
f40b602c41 add mllm export
Former-commit-id: ef33856380c8fb137b8eefdcd6f7ec5b12c73b69
2024-05-08 22:50:42 +08:00
hiyouga
5ff89a0f32 fix #3625
Former-commit-id: d9cdddd19cfb901d9ece676f4d50a0911ddfc0fe
2024-05-08 17:12:56 +08:00
hiyouga
0000894bbe add llama3 chinese chat
Former-commit-id: 48ee46dac1aeb51e25601983452a9cc5898e08e1
2024-05-08 17:10:03 +08:00
hiyouga
1d3fb90590 add deepseek moe 236B
Former-commit-id: 10ab83f4c4dc96013e916462f056d1497c6ddf6c
2024-05-08 16:37:54 +08:00
hiyouga
e123ec00c5 Update wechat.jpg
Former-commit-id: 2ba662faabc0ab1ca814ae45560ca3012bb0827d
2024-05-08 12:11:57 +08:00
BUAADreamer
3534a75bcc modify export model
Former-commit-id: 0ca1d1967d8aaf32e20bed06b2e8ae7fc5ab411e
2024-05-08 10:36:36 +08:00
hiyouga
dc36420d7c update readme
Former-commit-id: b3a9ae4085620e3a459e310382ef7bb8cd90eea0
2024-05-07 22:17:04 +08:00
hiyouga
38c6ce9311 remove big file
Former-commit-id: 1ccbfe562dabe9a75df729c960e09d6a8bd6382c
2024-05-07 22:14:06 +08:00
hiyouga
eb5c60afaf update readme
Former-commit-id: 92e9195b3cf90a74e358c1c23adfcaf680c059ba
2024-05-07 21:17:31 +08:00
hiyouga
d1a1641893 update readme
Former-commit-id: 5177f3ba90f369ec55bb270d5fb868f1b94e3acf
2024-05-07 19:03:47 +08:00
hiyouga
57fee01114 fix #3560
Former-commit-id: 0f8f7d3b90b87a118cf63a9c6e534a14ec188335
2024-05-07 19:03:35 +08:00
hoshi-hiyouga
54dcae79f4 Merge pull request #3601 from Katehuuh/main
Add contribution Luminia

Former-commit-id: 3c560119caffdb55856d431c1fd08093504a90dd
2024-05-07 18:01:48 +08:00
hiyouga
52cc6bce38 fix #3602
Former-commit-id: b0888262e371280f2b69ab529040b3a99632fc12
2024-05-07 17:50:27 +08:00
hoshi-hiyouga
07ac5fe1b0 Merge pull request #3604 from gaussian8/main
fix: splitted Dockerfile's CMD
Former-commit-id: 6159acbaa07fc45fd176ca5e83756b54885be82a
2024-05-07 16:53:23 +08:00
junwooo.lee
a274f7d069 fix: splitted Dockerfile's CMD
Former-commit-id: 4598734a0dc837be5f30033fb16d22b6a4d38913
2024-05-07 15:09:48 +09:00
Katehuuh
53a1e0d37f Update README_zh.md
Add Projects Nekochu/Luminia-13B-v3

Former-commit-id: 19a85bf52daca383281386108dd1810f7c74c327
2024-05-07 06:28:48 +02:00
Katehuuh
a8c07e2aa0 Update README.md
Add Projects Nekochu/Luminia-13B-v3

Former-commit-id: 984f7fbbf7181f76346ffff926bc857fa2210151
2024-05-07 06:23:36 +02:00
hiyouga
2d2b24fac4 update readme
Former-commit-id: 8e09e20ece76a30e74bd06482b68c2c5dd773ff9
2024-05-07 06:19:29 +08:00
hiyouga
175a7ea951 fix stop param
Former-commit-id: 09f3ef1de49f97001faa91ef3dc2bd16790f9717
2024-05-07 00:41:04 +08:00
hoshi-hiyouga
c198db4db2 Merge pull request #3527 from zhaonx/dev
"add support for vllm api stop parameter"

Former-commit-id: bcf7ec5ceb13920786831166861f18edd2506bb1
2024-05-07 00:37:49 +08:00
hoshi-hiyouga
df66b288a2 Update vllm_engine.py
Former-commit-id: 17d0005b8cb9cf75b8247bcdf4ce022e1a5afd0b
2024-05-07 00:37:05 +08:00
hoshi-hiyouga
4c91104471 Update generating_args.py
Former-commit-id: f32eefae3d20bb8482704daf2a0c5743452f2ce7
2024-05-07 00:28:16 +08:00
hoshi-hiyouga
d65b2332cf Update generating_args.py
Former-commit-id: 7ae7ae64f0e9e8661f9efd30997f8b96673d467a
2024-05-07 00:27:56 +08:00
hoshi-hiyouga
14c3c8cc8f Merge pull request #3588 from ZeyuTeng96/patch-1
update hf_hub_url for nectar_rm in dataset_info

Former-commit-id: d6ca7853faf083a7ff5c60feb940983d2577326d
2024-05-07 00:06:11 +08:00
hoshi-hiyouga
a13bdb9a2b Update dataset_info.json
Former-commit-id: c3910ab98ae11b52ff6e6d1faafd3e63256d908e
2024-05-07 00:05:45 +08:00
hiyouga
18b0c86e0b update readme
Former-commit-id: f50c3658716e18ac430a33b77aa769530c2fd1d6
2024-05-06 23:34:59 +08:00
hiyouga
89e7cabaa9 fix gradio args
Former-commit-id: a153039380d8aa2cdbf434f71f304b1c53ce09f2
2024-05-06 23:33:06 +08:00
hoshi-hiyouga
f2481e78af Merge pull request #3596 from hiyouga/dev_doc
Add CLI document

Former-commit-id: c8cd00bec67b15e85b25bb502c37d1e3efb5de6f
2024-05-06 23:10:38 +08:00
hiyouga
fe494fe97e update examples
Former-commit-id: 047313f48e0b2c050952592329509e8b3dfc6f81
2024-05-06 23:07:55 +08:00
hiyouga
92cafef325 update example docs
Former-commit-id: f02f87c6fbd20adae105c83526baa23dba2042fd
2024-05-06 22:51:02 +08:00
hiyouga
eb21a527a6 update docs
Former-commit-id: 34d33e22570338da709b8499830adb06b202095c
2024-05-06 21:47:00 +08:00
ZeyuTeng96
96354ca55f update hf_hub_url for nectar_rm in dataset_info
Hi there,

I cannot find the "mlinmg/RLAIF-Nectar" on hf, seems like it changed as "AstraMindAI/RLAIF-Nectar". So, making a PR for updating.

See: https://huggingface.co/datasets/AstraMindAI/RLAIF-Nectar
Former-commit-id: 044af364425766ba23373ff21577bc4a9de18e39
2024-05-06 16:44:50 +08:00
zhouwei
7b0629dac4 The training efficiency of the Ascend 910A has been significantly enhanced, leveraging the full computational power of the NPU (Neural Processing Unit) and the capabilities of torch_npu, a PyTorch library optimized for NPUs. This improvement has resulted in a remarkable tenfold increase in efficiency.
Former-commit-id: 28ae947161d4670d4f865cbaad84397d47215a53
2024-05-06 13:29:59 +08:00
zhaonx96
189346188b ”add stop parameter in chat.py“
Former-commit-id: 80645751bc4db20dbadb53950fe35af8b67eec41
2024-05-06 10:10:00 +08:00
zhaonx96
0c6c50f9b5 Merge branch 'main' of https://github.com/zhaonx/LLaMA-Factory into dev
Former-commit-id: 1abd55dd5987266280fef279c0a562f6c3e4835e
2024-05-06 10:09:00 +08:00
hoshi-hiyouga
2a53a43ac7 Merge pull request #3578 from pha123661/main
Fix badam example argument

Former-commit-id: a34f526f108968f46480d7a911f22a6922112d04
2024-05-05 23:41:58 +08:00
Oscar
c57a42164c Fix badam example outdated argument
Former-commit-id: eeb415f6fa81ca9093ad0419d1343bd5f780a688
2024-05-05 23:35:19 +08:00
codingma
8fcfeeffcf update wechat
Former-commit-id: 845d5acd03141dbb6df7d03b640639e7497d4c49
2024-05-05 15:31:47 +08:00
hiyouga
fa9c7eb48e add version and help to cli
Former-commit-id: bd095eeb73b79e55d8a7e3e3dfbaf144c62622e2
2024-05-05 02:44:35 +08:00
hiyouga
a510ea9390 fix eval scripts
Former-commit-id: 177604fb6bf09fdfc05216b5f1e5e1c95fcc8d43
2024-05-05 00:53:07 +08:00
hiyouga
9bbb5c846d update webui
Former-commit-id: af596988b1e8988fd3f1376a8e090ed8b80ee810
2024-05-05 00:17:54 +08:00
hiyouga
df43fbb029 update scripts
Former-commit-id: c1a53a0debf98be26f0f64d710a13c3b25140f75
2024-05-04 23:05:17 +08:00
hiyouga
5f8d83b630 add avg ppl
Former-commit-id: 25aeaae51b6d08a747e222bbcb27e75c4d56a856
2024-05-04 22:35:31 +08:00
hiyouga
4df26e7439 update ppl script
Former-commit-id: 76a077bdcea127fe1a9ae9e334f443d0ea7c5c7b
2024-05-04 22:13:14 +08:00
hiyouga
23f9efdf7d add cal_ppl script
Former-commit-id: 3a666832c119606a8d5baf4694b96569bee18659
2024-05-04 22:02:25 +08:00
hiyouga
f99ab8606f update readme
Former-commit-id: 57a39783d137f6396016f88263092720e2a5a4cc
2024-05-04 17:01:21 +08:00
hiyouga
87b9f70ab4 remove empty stream response
Former-commit-id: e984ba3167d765837cff1030acf59528bcde2f85
2024-05-04 16:13:52 +08:00
hiyouga
6672ad7a83 fix async stream api response
Former-commit-id: 941924fdbd69c2529677564af61f9019086ef21f
2024-05-04 16:11:18 +08:00
hiyouga
c32fc1d89b update api and support abort eval in webui
Former-commit-id: ed8f8be752ba2dcbaa6e8b1dc0a2e2821db1a5b8
2024-05-04 15:59:15 +08:00
hiyouga
8d6b454e33 update readme
Former-commit-id: d4283bb6bf5757db05ccb6d26f47658e4955fe6b
2024-05-04 00:43:53 +08:00
hiyouga
ed92038736 update readme and webui launch
Former-commit-id: 9d2ce57345d9e1c5fe9ec235ae33e598757cdb5d
2024-05-04 00:43:02 +08:00
hiyouga
4c564dc537 update readme
Former-commit-id: 1409654cef43376beaf021c30d533304b11c2c3c
2024-05-04 00:31:02 +08:00
hiyouga
9fc7549d25 fix eval in webui
Former-commit-id: 24cc93ab1581fe7cc19e126b2037f4509258f125
2024-05-04 00:19:19 +08:00
hiyouga
340f70cd82 fix webui resume
Former-commit-id: 510e64ee709239bff2a8b7207b517922468c934a
2024-05-03 23:15:19 +08:00
hiyouga
226587fc4a fix slow op in dpo/orpo trainer
Former-commit-id: 3010154adb43deb37fbb3a4648dccd27e848e9c3
2024-05-03 23:06:52 +08:00
hiyouga
a2cb40735b fix callback log multigpu #3559
Former-commit-id: 9585838ebe1f7ce508ec490f91d30920f134be3f
2024-05-03 21:24:27 +08:00
hiyouga
65abcf1a94 enable tqdm in webui
Former-commit-id: 5e6f808e3cd4f9a143562f2facb4f369d985eb26
2024-05-03 04:42:50 +08:00
hiyouga
59965c2dca fix gen_args
Former-commit-id: 17d2e5147ecc4015757d5d988b8872a0d3158a04
2024-05-03 04:24:50 +08:00
hiyouga
572d25734a fix colab gradio
Former-commit-id: 530f6b49bbf406809facdf5fc3b0d2585e2b8797
2024-05-03 03:54:46 +08:00
hiyouga
289d1f3679 update webui and add CLIs
Former-commit-id: 245fe47ece22a4b7822449b126715aaa8ec25aba
2024-05-03 02:58:23 +08:00
hiyouga
4cddd4be26 Update prepare.sh
Former-commit-id: 39e964a97a8d764fcb4620cc3ff03b4f40c73d7e
2024-05-02 17:16:02 +08:00
hiyouga
ed8d9e0881 fix badam configs
Former-commit-id: 9433c8c215881692f318b89df03af97b4eda4dd5
2024-05-02 02:47:04 +08:00
hoshi-hiyouga
931a30c7b8 Merge pull request #3487 from codemayq/main
support BAdam in WebUI

Former-commit-id: f1c0eedeb3fba57c84b749439a3ec7d9034922a9
2024-05-02 02:38:01 +08:00
hoshi-hiyouga
1d00dede8e Update train.py
Former-commit-id: dcd53cb89ae92f92ad1242e8988a18cac5292459
2024-05-02 02:21:27 +08:00
hoshi-hiyouga
b9bee7ae27 Merge pull request #3490 from khazic/main
Added the second sharegpt format

Former-commit-id: 282b5d5b1f38012fb1b1875ede510312bf2bcab4
2024-05-02 02:15:23 +08:00
hoshi-hiyouga
eea8a79e35 Update README_zh.md
Former-commit-id: d4d9180c401cb210654792d8052313e8db17fc51
2024-05-02 02:14:55 +08:00
hoshi-hiyouga
2186deceac Update README.md
Former-commit-id: b072ec9d1b18f7e9d5d2c9529eac55d29ca832c8
2024-05-02 02:13:46 +08:00
zhaonx
4a0aab86f1 "add support for vllm api stop parameter"
Former-commit-id: 42edc81585bc7170ab4e4871ad12094079e89bc9
2024-04-30 17:17:09 +08:00
codingma
41d98a1cc0 Merge branch 'hiyouga:main' into main
Former-commit-id: b4a212f934af6ee98b9ec9bb3078a0c3538bf01f
2024-04-30 10:02:41 +08:00
codingma
35917001b1 update wechat
Former-commit-id: d27e6a46b4aad61c494dd22eed138306366750ee
2024-04-30 09:40:04 +08:00
Lao
f15836c77a Update README_zh.md
Former-commit-id: ce17eccf451649728cf7b45312fd7f75d3a8a246
2024-04-28 23:31:37 +08:00
khazic
db316422a4 Upgrade the second sharegpt format
Former-commit-id: 288911fc7b1e12e53f3396c371cf4b4c7300b4bf
2024-04-28 14:30:05 +08:00
khazic
6f0b412265 added the second sharegpt format
Former-commit-id: d1ba32e4bb70489a9e6f5d3657988c9b7553a157
2024-04-28 14:27:45 +08:00
codingma
ac76a9e140 support BAdam in WebUI
Former-commit-id: 26f71703935407b94ed0787d91e156296bef9993
2024-04-28 11:31:34 +08:00
codingma
df70d230b2 Merge pull request #3484 from codemayq/main
update wechat

Former-commit-id: e898fabbe3efcd8b44d0e119e7afaed4542a9f39
2024-04-28 08:40:08 +08:00
codingma
5548c733d2 update wechat
Former-commit-id: 850f9b554fe1a57d09ae8a20a8ebaea5d22b7c05
2024-04-28 08:37:19 +08:00
zhangzc
05afeb304d Supports custom data set sampling quantity
Former-commit-id: 449e2aa38e3a6cf301a43c12c121ac24ebf12027
2024-03-27 14:22:50 +08:00
428 changed files with 82828 additions and 38487 deletions

View File

@ -3,9 +3,13 @@
.github
.venv
cache
data
examples
docker
saves
hf_cache
ms_cache
om_cache
shared_data
output
.dockerignore
.gitattributes
.gitignore
Dockerfile

42
.env.local Normal file
View File

@ -0,0 +1,42 @@
# Note: actually we do not support .env, just for reference
# api
API_HOST=
API_PORT=
API_KEY=
API_MODEL_NAME=
API_VERBOSE=
FASTAPI_ROOT_PATH=
MAX_CONCURRENT=
# general
DISABLE_VERSION_CHECK=
FORCE_CHECK_IMPORTS=
ALLOW_EXTRA_ARGS=
LLAMAFACTORY_VERBOSITY=
USE_MODELSCOPE_HUB=
USE_OPENMIND_HUB=
USE_RAY=
RECORD_VRAM=
OPTIM_TORCH=
NPU_JIT_COMPILE=
# torchrun
FORCE_TORCHRUN=
MASTER_ADDR=
MASTER_PORT=
NNODES=
NODE_RANK=
NPROC_PER_NODE=
# wandb
WANDB_DISABLED=
WANDB_PROJECT=
WANDB_API_KEY=
# gradio ui
GRADIO_SHARE=
GRADIO_SERVER_NAME=
GRADIO_SERVER_PORT=
GRADIO_ROOT_PATH=
GRADIO_IPV6=
# setup
ENABLE_SHORT_CONSOLE=
# reserved (do not use)
LLAMABOARD_ENABLED=
LLAMABOARD_WORKDIR=

View File

@ -19,3 +19,49 @@ There are several ways you can contribute to LLaMA Factory:
### Style guide
LLaMA Factory follows the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html), check it for details.
### Create a Pull Request
1. Fork the [repository](https://github.com/hiyouga/LLaMA-Factory) by clicking on the [Fork](https://github.com/hiyouga/LLaMA-Factory/fork) button on the repository's page. This creates a copy of the code under your GitHub user account.
2. Clone your fork to your local disk, and add the base repository as a remote:
```bash
git clone git@github.com:[username]/LLaMA-Factory.git
cd LLaMA-Factory
git remote add upstream https://github.com/hiyouga/LLaMA-Factory.git
```
3. Create a new branch to hold your development changes:
```bash
git checkout -b dev_your_branch
```
4. Set up a development environment by running the following command in a virtual environment:
```bash
pip install -e ".[dev]"
```
If LLaMA Factory was already installed in the virtual environment, remove it with `pip uninstall llamafactory` before reinstalling it in editable mode with the -e flag.
5. Check code before commit:
```bash
make commit
make style && make quality
make test
```
6. Submit changes:
```bash
git add .
git commit -m "commit message"
git fetch upstream
git rebase upstream/main
git push -u origin dev_your_branch
```
7. Create a merge request from your branch `dev_your_branch` at [origin repo](https://github.com/hiyouga/LLaMA-Factory).

61
.github/ISSUE_TEMPLATE/1-bug-report.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: "\U0001F41B Bug / help"
description: Create a report to help us improve the LLaMA Factory
labels: ["bug", "pending"]
body:
- type: markdown
attributes:
value: |
Issues included in **[FAQs](https://github.com/hiyouga/LLaMA-Factory/issues/4614)** or those with **insufficient** information may be closed without a response.
已经包含在 **[常见问题](https://github.com/hiyouga/LLaMA-Factory/issues/4614)** 内或提供信息**不完整**的 issues 可能不会被回复。
- type: markdown
attributes:
value: |
Please do not create issues that are not related to framework bugs under this category, use **[Discussions](https://github.com/hiyouga/LLaMA-Factory/discussions/categories/q-a)** instead.
请勿在此分类下创建和框架 bug 无关的 issues训练问题求助请使用 **[讨论区](https://github.com/hiyouga/LLaMA-Factory/discussions/categories/q-a)**。
- type: checkboxes
id: reminder
attributes:
label: Reminder
description: |
Please ensure you have read the above rules carefully and searched the existing issues (including FAQs).
请确保您已经认真阅读了上述规则并且搜索过现有的 issues包括常见问题
options:
- label: I have read the above rules and searched the existing issues.
required: true
- type: textarea
id: system-info
validations:
required: true
attributes:
label: System Info
description: |
Please share your system info with us. You can run the command **llamafactory-cli env** and copy-paste its output below.
请提供您的系统信息。您可以在命令行运行 **llamafactory-cli env** 并将其输出复制到该文本框中。
placeholder: llamafactory version, platform, python version, ...
- type: textarea
id: reproduction
validations:
required: true
attributes:
label: Reproduction
description: |
Please provide entry arguments, error messages and stack traces that reproduces the problem.
请提供入口参数,错误日志以及异常堆栈以便于我们复现问题。
value: |
```text
Put your message here.
```
- type: textarea
id: others
validations:
required: false
attributes:
label: Others

View File

@ -0,0 +1,41 @@
name: "\U0001F680 Feature request"
description: Submit a request for a new feature
labels: ["enhancement", "pending"]
body:
- type: markdown
attributes:
value: |
Please do not create issues that are not related to new features under this category.
请勿在此分类下创建和新特性无关的 issues。
- type: checkboxes
id: reminder
attributes:
label: Reminder
description: |
Please ensure you have read the above rules carefully and searched the existing issues.
请确保您已经认真阅读了上述规则并且搜索过现有的 issues。
options:
- label: I have read the above rules and searched the existing issues.
required: true
- type: textarea
id: description
validations:
required: true
attributes:
label: Description
description: |
A clear and concise description of the feature proposal.
请详细描述您希望加入的新功能特性。
- type: textarea
id: contribution
validations:
required: false
attributes:
label: Pull Request
description: |
Have you already created the relevant PR and submitted the code?
您是否已经创建了相关 PR 并提交了代码?

View File

@ -1,58 +0,0 @@
name: "\U0001F41B Bug / Help"
description: Create a report to help us improve the LLaMA Factory
body:
- type: checkboxes
id: reminder
attributes:
label: Reminder
description: |
Please ensure you have read the README carefully and searched the existing issues.
请确保您已经认真阅读了 README 并且搜索过现有的 Issue。
options:
- label: I have read the README and searched the existing issues.
required: true
- type: textarea
id: reproduction
validations:
required: true
attributes:
label: Reproduction
description: |
Please provide code snippets, error messages and stack traces that reproduces the problem.
请提供运行参数,错误信息以及异常堆栈以便于我们复现该问题。
Remember to use Markdown tags to correctly format your code.
请合理使用 Markdown 标签来格式化您的文本。
placeholder: |
python src/train_bash.py ...
- type: textarea
id: expected-behavior
validations:
required: false
attributes:
label: Expected behavior
description: |
Please provide a clear and concise description of what you would expect to happen.
请提供您原本的目的,即这段代码的期望行为。
- type: textarea
id: system-info
validations:
required: false
attributes:
label: System Info
description: |
Please share your system info with us. You can run the command **transformers-cli env** and copy-paste its output below.
请提供您的系统信息。您可以在命令行运行 **transformers-cli env** 并将其输出复制到该文本框中。
placeholder: transformers version, platform, python version, ...
- type: textarea
id: others
validations:
required: false
attributes:
label: Others

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 📚 FAQs | 常见问题
url: https://github.com/hiyouga/LLaMA-Factory/issues/4614
about: Reading in advance is recommended | 建议提前阅读
- name: Discussions | 讨论区
url: https://github.com/hiyouga/LLaMA-Factory/discussions
about: Please ask fine-tuning questions here | 请在这里讨论训练问题

View File

@ -5,3 +5,4 @@ Fixes # (issue)
## Before submitting
- [ ] Did you read the [contributor guideline](https://github.com/hiyouga/LLaMA-Factory/blob/main/.github/CONTRIBUTING.md)?
- [ ] Did you write any new necessary tests?

108
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,108 @@
name: docker
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "**/*.py"
- "requirements.txt"
- "docker/**"
- ".github/workflows/*.yml"
pull_request:
branches:
- "main"
paths:
- "**/*.py"
- "requirements.txt"
- "docker/**"
- ".github/workflows/*.yml"
jobs:
build:
strategy:
fail-fast: false
matrix:
device:
- "cuda"
- "npu"
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.device }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
environment:
name: docker
url: https://hub.docker.com/r/hiyouga/llamafactory
steps:
- name: Free up disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
docker-images: false
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Get llamafactory version
id: version
run: |
echo "tag=$(python setup.py --version | sed 's/\.dev0//')" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay
if: ${{ github.event_name != 'pull_request' && matrix.device == 'npu' }}
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_ASCEND_USERNAME }}
password: ${{ secrets.QUAY_ASCEND_TOKEN }}
- name: Build and push Docker image (CUDA)
if: ${{ matrix.device == 'cuda' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/docker-cuda/Dockerfile
build-args: |
EXTRAS=metrics,deepspeed,liger-kernel
push: ${{ github.event_name != 'pull_request' }}
tags: |
docker.io/hiyouga/llamafactory:latest
docker.io/hiyouga/llamafactory:${{ steps.version.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Docker image (NPU)
if: ${{ matrix.device == 'npu' }}
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./docker/docker-npu/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
docker.io/hiyouga/llamafactory:latest-npu-a2
docker.io/hiyouga/llamafactory:${{ steps.version.outputs.tag }}-npu-a2
quay.io/ascend/llamafactory:latest-npu-a2
quay.io/ascend/llamafactory:${{ steps.version.outputs.tag }}-npu-a2
cache-from: type=gha
cache-to: type=gha,mode=max

32
.github/workflows/label_issue.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: label_issue
on:
issues:
types:
- opened
jobs:
label_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
LABEL=""
NPU_KEYWORDS=(npu huawei ascend 华为 昇腾 910)
ISSUE_TITLE_LOWER=$(echo $ISSUE_TITLE | tr '[:upper:]' '[:lower:]')
for KEYWORD in ${NPU_KEYWORDS[@]}; do
if [[ $ISSUE_TITLE_LOWER == *$KEYWORD* ]] && [[ $ISSUE_TITLE_LOWER != *input* ]]; then
LABEL="npu"
break
fi
done
if [ -n "$LABEL" ]; then
gh issue edit $ISSUE_URL --add-label $LABEL
fi

36
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: publish
on:
workflow_dispatch:
release:
types:
- published
jobs:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/llamafactory
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Build package
run: |
make build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1

View File

@ -1,29 +1,99 @@
name: tests
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- "main"
paths:
- "**/*.py"
- "requirements.txt"
- ".github/workflows/*.yml"
pull_request:
branches: [ "main" ]
branches:
- "main"
paths:
- "**/*.py"
- "requirements.txt"
- ".github/workflows/*.yml"
jobs:
check_code_quality:
tests:
strategy:
fail-fast: false
matrix:
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-13"
transformers:
- null
include: # test backward compatibility
- python: "3.9"
os: "ubuntu-latest"
transformers: "4.49.0"
- python: "3.9"
os: "ubuntu-latest"
transformers: "4.51.0"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.transformers }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
OS_NAME: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "**/requirements*.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
python -m pip install ".[torch,dev]"
- name: Install transformers
if: ${{ matrix.transformers }}
run: |
python -m pip install "transformers==${{ matrix.transformers }}"
- name: Cache files
id: hf-hub-cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/huggingface
key: huggingface-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.transformers }}-${{ hashFiles('tests/version.txt') }}
- name: Check quality
run: |
make style && make quality
make style && make quality
- name: Check license
run: |
make license
- name: Check build
run: |
make build
- name: Test with pytest
run: |
make test
env:
HF_HOME: ${{ runner.temp }}/huggingface
HF_HUB_OFFLINE: "${{ steps.hf-hub-cache.outputs.cache-hit == 'true' && '1' || '0' }}"

18
.gitignore vendored
View File

@ -159,7 +159,21 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
# vscode
.vscode/
# uv
uv.lock
# custom .gitignore
user.config
saves/
hf_cache/
ms_cache/
om_cache/
cache/
config/
saves/
output/
wandb/
swanlog/
generated_predictions.jsonl
predictions_score.json

28
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-added-large-files
args: ['--maxkb=25000']
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: no-commit-to-branch
args: ['--branch', 'main']
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

View File

@ -12,12 +12,16 @@ authors:
given-names: "Yanhan"
- family-names: "Luo"
given-names: "Zheyan"
- family-names: "Feng"
given-names: "Zhangchi"
- family-names: "Ma"
given-names: "Yongqiang"
title: "LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Models"
url: "https://arxiv.org/abs/2403.13372"
preferred-citation:
type: article
type: conference-paper
conference:
name: "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)"
authors:
- family-names: "Zheng"
given-names: "Yaowei"
@ -29,9 +33,12 @@ preferred-citation:
given-names: "Yanhan"
- family-names: "Luo"
given-names: "Zheyan"
- family-names: "Feng"
given-names: "Zhangchi"
- family-names: "Ma"
given-names: "Yongqiang"
journal: "arXiv preprint arXiv:2403.13372"
title: "LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Models"
url: "https://arxiv.org/abs/2403.13372"
year: 2024
publisher: "Association for Computational Linguistics"
address: "Bangkok, Thailand"

View File

@ -1,14 +0,0 @@
FROM nvcr.io/nvidia/pytorch:24.01-py3
WORKDIR /app
COPY requirements.txt /app/
RUN pip install -r requirements.txt
COPY . /app/
RUN pip install -e .[deepspeed,metrics,bitsandbytes,qwen]
VOLUME [ "/root/.cache/huggingface/", "/app/data", "/app/output" ]
EXPOSE 7860
CMD [ "python", "src/train_web.py" ]

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
include LICENSE requirements.txt

View File

@ -1,6 +1,16 @@
.PHONY: quality style
.PHONY: build commit license quality style test
check_dirs := scripts src tests
check_dirs := scripts src tests setup.py
build:
pip3 install build && python3 -m build
commit:
pre-commit install
pre-commit run --all-files
license:
python3 tests/check_license.py $(check_dirs)
quality:
ruff check $(check_dirs)
@ -9,3 +19,6 @@ quality:
style:
ruff check $(check_dirs) --fix
ruff format $(check_dirs)
test:
CUDA_VISIBLE_DEVICES= WANDB_DISABLED=true pytest -vv tests/

811
README.md

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

38
assets/alaya_new.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 47 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 166 KiB

BIN
assets/wechat_alaya.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

BIN
assets/wechat_npu.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

View File

@ -1,16 +1,22 @@
If you are using a custom dataset, please provide your dataset definition in the following format in `dataset_info.json`.
The [dataset_info.json](dataset_info.json) contains all available datasets. If you are using a custom dataset, please **make sure** to add a *dataset description* in `dataset_info.json` and specify `dataset: dataset_name` before training to use it.
The `dataset_info.json` file should be put in the `dataset_dir` directory. You can change `dataset_dir` to use another directory. The default value is `./data`.
Currently we support datasets in **alpaca** and **sharegpt** format. Allowed file types include json, jsonl, csv, parquet, arrow.
```json
"dataset_name": {
"hf_hub_url": "the name of the dataset repository on the Hugging Face hub. (if specified, ignore script_url and file_name)",
"ms_hub_url": "the name of the dataset repository on the ModelScope hub. (if specified, ignore script_url and file_name)",
"script_url": "the name of the directory containing a dataset loading script. (if specified, ignore file_name)",
"file_name": "the name of the dataset file in this directory. (required if above are not specified)",
"file_sha1": "the SHA-1 hash value of the dataset file. (optional, does not affect training)",
"subset": "the name of the subset. (optional, default: None)",
"folder": "the name of the folder of the dataset repository on the Hugging Face hub. (optional, default: None)",
"ranking": "whether the dataset is a preference dataset or not. (default: false)",
"hf_hub_url": "the name of the dataset repository on the Hugging Face hub. (if specified, ignore script_url, file_name and cloud_file_name)",
"ms_hub_url": "the name of the dataset repository on the Model Scope hub. (if specified, ignore script_url, file_name and cloud_file_name)",
"script_url": "the name of the directory containing a dataset loading script. (if specified, ignore file_name and cloud_file_name)",
"cloud_file_name": "the name of the dataset file in s3/gcs cloud storage. (if specified, ignore file_name)",
"file_name": "the name of the dataset folder or dataset file in this directory. (required if above are not specified)",
"formatting": "the format of the dataset. (optional, default: alpaca, can be chosen from {alpaca, sharegpt})",
"ranking": "whether the dataset is a preference dataset or not. (default: False)",
"subset": "the name of the subset. (optional, default: None)",
"split": "the name of dataset split to be used. (optional, default: train)",
"folder": "the name of the folder of the dataset repository on the Hugging Face hub. (optional, default: None)",
"num_samples": "the number of samples in the dataset to be used. (optional, default: None)",
"columns (optional)": {
"prompt": "the column name in the dataset containing the prompts. (default: instruction)",
"query": "the column name in the dataset containing the queries. (default: input)",
@ -19,7 +25,12 @@ If you are using a custom dataset, please provide your dataset definition in the
"messages": "the column name in the dataset containing the messages. (default: conversations)",
"system": "the column name in the dataset containing the system prompts. (default: None)",
"tools": "the column name in the dataset containing the tool description. (default: None)",
"images": "the column name in the dataset containing the image inputs. (default: None)"
"images": "the column name in the dataset containing the image inputs. (default: None)",
"videos": "the column name in the dataset containing the videos inputs. (default: None)",
"audios": "the column name in the dataset containing the audios inputs. (default: None)",
"chosen": "the column name in the dataset containing the chosen answers. (default: None)",
"rejected": "the column name in the dataset containing the rejected answers. (default: None)",
"kto_tag": "the column name in the dataset containing the kto tags. (default: None)"
},
"tags (optional, used for the sharegpt format)": {
"role_tag": "the key in the message represents the identity. (default: from)",
@ -33,11 +44,19 @@ If you are using a custom dataset, please provide your dataset definition in the
}
```
Given above, you can use the custom dataset via specifying `--dataset dataset_name`.
## Alpaca Format
----
### Supervised Fine-Tuning Dataset
Currently we support dataset in **alpaca** or **sharegpt** format, the dataset in alpaca format should follow the below format:
* [Example dataset](alpaca_en_demo.json)
In supervised fine-tuning, the `instruction` column will be concatenated with the `input` column and used as the user prompt, then the user prompt would be `instruction\ninput`. The `output` column represents the model response.
For reasoning models, if the dataset contains chain-of-thought (CoT), the CoT needs to be placed in the model responses, such as `<think>cot</think>output`.
The `system` column will be used as the system prompt if specified.
The `history` column is a list consisting of string tuples representing prompt-response pairs in the history messages. Note that the responses in the history **will also be learned by the model** in supervised fine-tuning.
```json
[
@ -54,10 +73,11 @@ Currently we support dataset in **alpaca** or **sharegpt** format, the dataset i
]
```
Regarding the above dataset, the `columns` in `dataset_info.json` should be:
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"columns": {
"prompt": "instruction",
"query": "input",
@ -68,30 +88,193 @@ Regarding the above dataset, the `columns` in `dataset_info.json` should be:
}
```
The `query` column will be concatenated with the `prompt` column and used as the user prompt, then the user prompt would be `prompt\nquery`. The `response` column represents the model response.
> [!TIP]
> If the model has reasoning capabilities (e.g. Qwen3) but the dataset does not contain chain-of-thought (CoT), LLaMA-Factory will automatically add empty CoT to the data. When `enable_thinking` is `True` (slow thinking, by default), the empty CoT will be added to the model responses and loss computation will be considered; otherwise (fast thinking), it will be added to the user prompts and loss computation will be ignored. Please keep the `enable_thinking` parameter consistent during training and inference.
>
> If you want to train data containing CoT with slow thinking and data without CoT with fast thinking, you can set `enable_thinking` to `None`. However, this feature is relatively complicated and should be used with caution.
The `system` column will be used as the system prompt. The `history` column is a list consisting string tuples representing prompt-response pairs in the history. Note that the responses in the history **will also be used for training**.
### Pre-training Dataset
For the pre-training datasets, only the `prompt` column will be used for training.
- [Example dataset](c4_demo.jsonl)
For the preference datasets, the `response` column should be a string list whose length is 2, with the preferred answers appearing first, for example:
In pre-training, only the `text` column will be used for model learning.
```json
{
"instruction": "user instruction",
"input": "user input",
"output": [
"chosen answer",
"rejected answer"
]
[
{"text": "document"},
{"text": "document"}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"columns": {
"prompt": "text"
}
}
```
Remember to set `"ranking": true` for the preference datasets.
### Preference Dataset
----
Preference datasets are used for reward modeling, DPO training, ORPO and SimPO training.
The dataset in sharegpt format should follow the below format:
It requires a better response in `chosen` column and a worse response in `rejected` column.
```json
[
{
"instruction": "user instruction (required)",
"input": "user input (optional)",
"chosen": "chosen answer (required)",
"rejected": "rejected answer (required)"
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"ranking": true,
"columns": {
"prompt": "instruction",
"query": "input",
"chosen": "chosen",
"rejected": "rejected"
}
}
```
### KTO Dataset
An additional column `kto_tag` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
### Multimodal Image Dataset
An additional column `images` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
### Multimodal Video Dataset
An additional column `videos` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
### Multimodal Audio Dataset
An additional column `audios` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
## Sharegpt Format
### Supervised Fine-Tuning Dataset
- [Example dataset](glaive_toolcall_en_demo.json)
Compared to the alpaca format, the sharegpt format allows the datasets have **more roles**, such as human, gpt, observation and function. They are presented in a list of objects in the `conversations` column.
Note that the human and observation should appear in odd positions, while gpt and function should appear in even positions. The gpt and function will be learned by the model.
```json
[
{
"conversations": [
{
"from": "human",
"value": "user instruction"
},
{
"from": "function_call",
"value": "tool arguments"
},
{
"from": "observation",
"value": "tool result"
},
{
"from": "gpt",
"value": "model response"
}
],
"system": "system prompt (optional)",
"tools": "tool description (optional)"
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"system": "system",
"tools": "tools"
}
}
```
### Pre-training Dataset
Not yet supported, please use the [alpaca](#alpaca-format) format.
### Preference Dataset
- [Example dataset](dpo_en_demo.json)
Preference datasets in sharegpt format also require a better message in `chosen` column and a worse message in `rejected` column.
```json
[
{
"conversations": [
{
"from": "human",
"value": "user instruction"
},
{
"from": "gpt",
"value": "model response"
},
{
"from": "human",
"value": "user instruction"
}
],
"chosen": {
"from": "gpt",
"value": "chosen answer (required)"
},
"rejected": {
"from": "gpt",
"value": "rejected answer (required)"
}
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"ranking": true,
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
}
```
### KTO Dataset
- [Example dataset](kto_en_demo.json)
KTO datasets require a extra `kto_tag` column containing the boolean human feedback.
```json
[
@ -106,30 +289,187 @@ The dataset in sharegpt format should follow the below format:
"value": "model response"
}
],
"system": "system prompt (optional)",
"tools": "tool description (optional)"
"kto_tag": "human feedback [true/false] (required)"
}
]
```
Regarding the above dataset, the `columns` in `dataset_info.json` should be:
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"system": "system",
"tools": "tools"
},
"tags": {
"role_tag": "from",
"content_tag": "value",
"user_tag": "human",
"assistant_tag": "gpt"
"kto_tag": "kto_tag"
}
}
```
where the `messages` column should be a list following the `u/a/u/a/u/a` order.
### Multimodal Image Dataset
Pre-training datasets and preference datasets are incompatible with the sharegpt format yet.
- [Example dataset](mllm_demo.json)
Multimodal image datasets require an `images` column containing the paths to the input images.
The number of images should be identical to the `<image>` tokens in the conversations.
```json
[
{
"conversations": [
{
"from": "human",
"value": "<image>user instruction"
},
{
"from": "gpt",
"value": "model response"
}
],
"images": [
"image path (required)"
]
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"images": "images"
}
}
```
### Multimodal Video Dataset
- [Example dataset](mllm_video_demo.json)
Multimodal video datasets require a `videos` column containing the paths to the input videos.
The number of videos should be identical to the `<video>` tokens in the conversations.
```json
[
{
"conversations": [
{
"from": "human",
"value": "<video>user instruction"
},
{
"from": "gpt",
"value": "model response"
}
],
"videos": [
"video path (required)"
]
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"videos": "videos"
}
}
```
### Multimodal Audio Dataset
- [Example dataset](mllm_audio_demo.json)
Multimodal audio datasets require an `audios` column containing the paths to the input audios.
The number of audios should be identical to the `<audio>` tokens in the conversations.
```json
[
{
"conversations": [
{
"from": "human",
"value": "<audio>user instruction"
},
{
"from": "gpt",
"value": "model response"
}
],
"audios": [
"audio path (required)"
]
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"audios": "audios"
}
}
```
### OpenAI Format
The openai format is simply a special case of the sharegpt format, where the first message may be a system prompt.
```json
[
{
"messages": [
{
"role": "system",
"content": "system prompt (optional)"
},
{
"role": "user",
"content": "user instruction"
},
{
"role": "assistant",
"content": "model response"
}
]
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
}
```

View File

@ -1,16 +1,21 @@
如果您使用自定义数据集,请务必在 `dataset_info.json` 文件中按照以下格式提供数据集定义。
[dataset_info.json](dataset_info.json) 包含了所有可用的数据集。如果您希望使用自定义数据集,请**务必**在 `dataset_info.json` 文件中添加*数据集描述*,并通过修改 `dataset: 数据集名称` 配置来使用数据集。
其中 `dataset_info.json` 文件应放置在 `dataset_dir` 目录下。您可以通过修改 `dataset_dir` 参数来使用其他目录。默认值为 `./data`
目前我们支持 **alpaca** 格式和 **sharegpt** 格式的数据集。允许的文件类型包括 json、jsonl、csv、parquet 和 arrow。
```json
"数据集名称": {
"hf_hub_url": "Hugging Face 的数据集仓库地址(若指定,则忽略 script_url 和 file_name",
"ms_hub_url": "ModelScope 的数据集仓库地址(若指定,则忽略 script_url 和 file_name",
"script_url": "包含数据加载脚本的本地文件夹名称(若指定,则忽略 file_name",
"file_name": "该目录下数据集文件的名称(若上述参数未指定,则此项必需)",
"file_sha1": "数据集文件的 SHA-1 哈希值(可选,留空不影响训练)",
"subset": "数据集子集的名称可选默认None",
"folder": "Hugging Face 仓库的文件夹名称可选默认None",
"ranking": "是否为偏好数据集可选默认False",
"file_name": "该目录下数据集文件夹或文件的名称(若上述参数未指定,则此项必需)",
"formatting": "数据集格式可选默认alpaca可以为 alpaca 或 sharegpt",
"ranking": "是否为偏好数据集可选默认False",
"subset": "数据集子集的名称可选默认None",
"split": "所使用的数据集切分可选默认train",
"folder": "Hugging Face 仓库的文件夹名称可选默认None",
"num_samples": "该数据集所使用的样本数量。可选默认None",
"columns可选": {
"prompt": "数据集代表提示词的表头名称默认instruction",
"query": "数据集代表请求的表头名称默认input",
@ -19,7 +24,12 @@
"messages": "数据集代表消息列表的表头名称默认conversations",
"system": "数据集代表系统提示的表头名称默认None",
"tools": "数据集代表工具描述的表头名称默认None",
"images": "数据集代表图像输入的表头名称默认None"
"images": "数据集代表图像输入的表头名称默认None",
"videos": "数据集代表视频输入的表头名称默认None",
"audios": "数据集代表音频输入的表头名称默认None",
"chosen": "数据集代表更优回答的表头名称默认None",
"rejected": "数据集代表更差回答的表头名称默认None",
"kto_tag": "数据集代表 KTO 标签的表头名称默认None"
},
"tags可选用于 sharegpt 格式)": {
"role_tag": "消息中代表发送者身份的键名默认from",
@ -28,16 +38,24 @@
"assistant_tag": "消息中代表助手的 role_tag默认gpt",
"observation_tag": "消息中代表工具返回结果的 role_tag默认observation",
"function_tag": "消息中代表工具调用的 role_tag默认function_call",
"system_tag": "消息中代表系统提示的 role_tag默认system会覆盖 system "
"system_tag": "消息中代表系统提示的 role_tag默认system会覆盖 system column"
}
}
```
添加后可通过指定 `--dataset 数据集名称` 参数使用自定义数据集。
## Alpaca 格式
----
### 指令监督微调数据集
该项目目前支持两种格式的数据集:**alpaca** 和 **sharegpt**,其中 alpaca 格式的数据集按照以下方式组织:
- [样例数据集](alpaca_zh_demo.json)
在指令监督微调时,`instruction` 列对应的内容会与 `input` 列对应的内容拼接后作为提示词,即提示词为 `instruction\ninput`。而 `output` 列对应的内容为模型回答。
对于推理类模型的微调,如果数据集包含思维链,则需要把思维链放在模型回答中,例如 `<think>cot</think>output`
如果指定,`system` 列对应的内容将被作为系统提示词。
`history` 列是由多个字符串二元组构成的列表,分别代表历史消息中每轮对话的指令和回答。注意在指令监督微调时,历史消息中的回答内容**也会被用于模型学习**。
```json
[
@ -54,10 +72,11 @@
]
```
对于上述格式的数据,`dataset_info.json` 中的 `columns` 应为:
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"columns": {
"prompt": "instruction",
"query": "input",
@ -68,30 +87,193 @@
}
```
其中 `query` 列对应的内容会与 `prompt` 列对应的内容拼接后作为用户指令,即用户指令为 `prompt\nquery``response` 列对应的内容为模型回答。
> [!TIP]
> 如果模型本身具备推理能力(如 Qwen3而数据集不包含思维链LLaMA-Factory 会自动为数据添加空思维链。当 `enable_thinking``True` 时(慢思考,默认),空思维链会添加到模型回答中并且计算损失,否则会添加到用户指令中并且不计算损失(快思考)。请在训练和推理时保持 `enable_thinking` 参数一致。
>
> 如果您希望训练包含思维链的数据时使用慢思考,训练不包含思维链的数据时使用快思考,可以设置 `enable_thinking``None`。但该功能较为复杂,请谨慎使用。
`system` 列对应的内容将被作为系统提示词。`history` 列是由多个字符串二元组构成的列表,分别代表历史消息中每轮的指令和回答。注意历史消息中的回答**也会被用于训练**。
### 预训练数据集
对于预训练数据集,仅 `prompt` 列中的内容会用于模型训练。
- [样例数据集](c4_demo.jsonl)
对于偏好数据集,`response` 列应当是一个长度为 2 的字符串列表,排在前面的代表更优的回答,例如:
在预训练时,只有 `text` 列中的内容会用于模型学习。
```json
{
"instruction": "用户指令",
"input": "用户输入",
"output": [
"优质回答",
"劣质回答"
]
[
{"text": "document"},
{"text": "document"}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"columns": {
"prompt": "text"
}
}
```
添加偏好数据集需要额外指定 `"ranking": true`
### 偏好数据集
----
偏好数据集用于奖励模型训练、DPO 训练、ORPO 训练和 SimPO 训练。
而 sharegpt 格式的数据集按照以下方式组织:
它需要在 `chosen` 列中提供更优的回答,并在 `rejected` 列中提供更差的回答。
```json
[
{
"instruction": "用户指令(必填)",
"input": "用户输入(选填)",
"chosen": "优质回答(必填)",
"rejected": "劣质回答(必填)"
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"ranking": true,
"columns": {
"prompt": "instruction",
"query": "input",
"chosen": "chosen",
"rejected": "rejected"
}
}
```
### KTO 数据集
KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
### 多模态图像数据集
多模态图像数据集需要提供额外的 `images` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
### 多模态视频数据集
多模态视频数据集需要提供额外的 `videos` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
### 多模态音频数据集
多模态音频数据集需要提供额外的 `audios` 列。详情请参阅 [sharegpt](#sharegpt-格式)。
## Sharegpt 格式
### 指令监督微调数据集
- [样例数据集](glaive_toolcall_zh_demo.json)
相比 alpaca 格式的数据集sharegpt 格式支持**更多的角色种类**,例如 human、gpt、observation、function 等等。它们构成一个对象列表呈现在 `conversations` 列中。
注意其中 human 和 observation 必须出现在奇数位置gpt 和 function 必须出现在偶数位置。默认所有的 gpt 和 function 会被用于学习。
```json
[
{
"conversations": [
{
"from": "human",
"value": "用户指令"
},
{
"from": "function_call",
"value": "工具参数"
},
{
"from": "observation",
"value": "工具结果"
},
{
"from": "gpt",
"value": "模型回答"
}
],
"system": "系统提示词(选填)",
"tools": "工具描述(选填)"
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"system": "system",
"tools": "tools"
}
}
```
### 预训练数据集
尚不支持,请使用 [alpaca](#alpaca-格式) 格式。
### 偏好数据集
- [样例数据集](dpo_zh_demo.json)
Sharegpt 格式的偏好数据集同样需要在 `chosen` 列中提供更优的消息,并在 `rejected` 列中提供更差的消息。
```json
[
{
"conversations": [
{
"from": "human",
"value": "用户指令"
},
{
"from": "gpt",
"value": "模型回答"
},
{
"from": "human",
"value": "用户指令"
}
],
"chosen": {
"from": "gpt",
"value": "优质回答"
},
"rejected": {
"from": "gpt",
"value": "劣质回答"
}
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"ranking": true,
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
}
```
### KTO 数据集
- [样例数据集](kto_en_demo.json)
KTO 数据集需要额外添加一个 `kto_tag` 列,包含 bool 类型的人类反馈。
```json
[
@ -106,30 +288,191 @@
"value": "模型回答"
}
],
"system": "系统提示词(选填)",
"tools": "工具描述(选填)"
"kto_tag": "人类反馈 [true/false](必填)"
}
]
```
对于上述格式的数据,`dataset_info.json` 中的 `columns` 应为:
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"system": "system",
"tools": "tools"
},
"tags": {
"role_tag": "from",
"content_tag": "value",
"user_tag": "human",
"assistant_tag": "gpt"
"kto_tag": "kto_tag"
}
}
```
其中 `messages` 列应当是一个列表,且符合 `用户/模型/用户/模型/用户/模型` 的顺序。
### 多模态图像数据集
预训练数据集和偏好数据集尚不支持 sharegpt 格式。
- [样例数据集](mllm_demo.json)
多模态图像数据集需要额外添加一个 `images` 列,包含输入图像的路径。
注意图片的数量必须与文本中所有 `<image>` 标记的数量严格一致。
```json
[
{
"conversations": [
{
"from": "human",
"value": "<image><image>用户指令"
},
{
"from": "gpt",
"value": "模型回答"
}
],
"images": [
"图像路径(必填)",
"图像路径(必填)"
]
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"images": "images"
}
}
```
### 多模态视频数据集
- [样例数据集](mllm_video_demo.json)
多模态视频数据集需要额外添加一个 `videos` 列,包含输入视频的路径。
注意视频的数量必须与文本中所有 `<video>` 标记的数量严格一致。
```json
[
{
"conversations": [
{
"from": "human",
"value": "<video><video>用户指令"
},
{
"from": "gpt",
"value": "模型回答"
}
],
"videos": [
"视频路径(必填)",
"视频路径(必填)"
]
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"videos": "videos"
}
}
```
### 多模态音频数据集
- [样例数据集](mllm_audio_demo.json)
多模态音频数据集需要额外添加一个 `audios` 列,包含输入音频的路径。
注意音频的数量必须与文本中所有 `<audio>` 标记的数量严格一致。
```json
[
{
"conversations": [
{
"from": "human",
"value": "<audio><audio>用户指令"
},
{
"from": "gpt",
"value": "模型回答"
}
],
"audios": [
"音频路径(必填)",
"音频路径(必填)"
]
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"audios": "audios"
}
}
```
### OpenAI 格式
OpenAI 格式仅仅是 sharegpt 格式的一种特殊情况,其中第一条消息可能是系统提示词。
```json
[
{
"messages": [
{
"role": "system",
"content": "系统提示词(选填)"
},
{
"role": "user",
"content": "用户指令"
},
{
"role": "assistant",
"content": "模型回答"
}
]
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
}
```

View File

@ -1 +0,0 @@
3779ddbc040543ab1834ef216c983d6fcc06cc9a

View File

@ -1 +0,0 @@
a97cf9475291591843976554878568e046d8a46d

4997
data/alpaca_en_demo.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
25508714b7879a1e5a6764ba7f979a980f549f1a

View File

@ -1 +0,0 @@
7cb6a7d11455bddc3d495750a2392683d775b184

5002
data/alpaca_zh_demo.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,18 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import os
@ -10,16 +25,16 @@ _DESCRIPTION = "BELLE multiturn chat dataset."
_CITATION = """\
@article{belle2023exploring,
title={Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases},
title={Exploring the Impact of Instruction Data Scaling on Large Language Models},
author={Yunjie Ji, Yong Deng, Yan Gong, Yiping Peng, Qiang Niu, Lei Zhang, Baochang Ma, Xiangang Li},
journal={arXiv preprint arXiv:2303.14742},
year={2023}
}
"""
_HOMEPAGE = "{}/datasets/BelleGroup/multiturn_chat_0.8M".format(_HF_ENDPOINT)
_HOMEPAGE = f"{_HF_ENDPOINT}/datasets/BelleGroup/multiturn_chat_0.8M"
_LICENSE = "gpl-3.0"
_URL = "{}/datasets/BelleGroup/multiturn_chat_0.8M/resolve/main/multiturn_chat_0.8M.json".format(_HF_ENDPOINT)
_URL = f"{_HF_ENDPOINT}/datasets/BelleGroup/multiturn_chat_0.8M/resolve/main/multiturn_chat_0.8M.json"
class BelleMultiturn(datasets.GeneratorBasedBuilder):
@ -38,7 +53,7 @@ class BelleMultiturn(datasets.GeneratorBasedBuilder):
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": file_path})]
def _generate_examples(self, filepath: str):
with open(filepath, "r", encoding="utf-8") as f:
with open(filepath, encoding="utf-8") as f:
for key, row in enumerate(f):
data = json.loads(row)
conversations = []

File diff suppressed because one or more lines are too long

300
data/c4_demo.jsonl Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
f5cb08305ff5dc9c17a09809c54c8c8834aadc70

View File

@ -1 +0,0 @@
aee47b7b443496e37808d7f34ef10403ff99bcc3

View File

@ -1,57 +1,23 @@
{
"alpaca_en": {
"file_name": "alpaca_data_en_52k.json",
"file_sha1": "607f94a7f581341e59685aef32f531095232cf23"
},
"alpaca_zh": {
"file_name": "alpaca_data_zh_51k.json",
"file_sha1": "2ba9827122c158dc256668d42bd1bcb8bc6b786e"
},
"alpaca_gpt4_en": {
"file_name": "alpaca_gpt4_data_en.json",
"file_sha1": "647f4ad447bd993e4b6b6223d1be15208bab694a"
},
"alpaca_gpt4_zh": {
"file_name": "alpaca_gpt4_data_zh.json",
"file_sha1": "3eaa3bda364ccdd59925d7448a698256c31ef845"
},
"identity": {
"file_name": "identity.json",
"file_sha1": "ffe3ecb58ab642da33fbb514d5e6188f1469ad40"
"file_name": "identity.json"
},
"oaast_sft": {
"file_name": "oaast_sft.json",
"file_sha1": "7baf5d43e67a91f9bbdf4e400dbe033b87e9757e",
"alpaca_en_demo": {
"file_name": "alpaca_en_demo.json"
},
"alpaca_zh_demo": {
"file_name": "alpaca_zh_demo.json"
},
"glaive_toolcall_en_demo": {
"file_name": "glaive_toolcall_en_demo.json",
"formatting": "sharegpt",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
"messages": "conversations",
"tools": "tools"
}
},
"oaast_sft_zh": {
"file_name": "oaast_sft_zh.json",
"file_sha1": "a6a91f18f80f37b10ded9cf633fb50c033bf7b9f",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
}
},
"lima": {
"file_name": "lima.json",
"file_sha1": "9db59f6b7007dc4b17529fc63379b9cd61640f37",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
}
},
"glaive_toolcall": {
"file_name": "glaive_toolcall_10k.json",
"file_sha1": "a6917b85d209df98d31fdecb253c79ebc440f6f3",
"glaive_toolcall_zh_demo": {
"file_name": "glaive_toolcall_zh_demo.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
@ -60,7 +26,6 @@
},
"mllm_demo": {
"file_name": "mllm_demo.json",
"file_sha1": "d626cc0ad88a26d0dc9fcb47336821cf486d8bcc",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
@ -73,15 +38,87 @@
"assistant_tag": "assistant"
}
},
"example": {
"script_url": "example_dataset",
"mllm_audio_demo": {
"file_name": "mllm_audio_demo.json",
"formatting": "sharegpt",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
"messages": "messages",
"audios": "audios"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"mllm_video_demo": {
"file_name": "mllm_video_demo.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"videos": "videos"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"mllm_video_audio_demo": {
"file_name": "mllm_video_audio_demo.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"videos": "videos",
"audios": "audios"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"alpaca_en": {
"hf_hub_url": "llamafactory/alpaca_en",
"ms_hub_url": "llamafactory/alpaca_en",
"om_hub_url": "HaM/alpaca_en"
},
"alpaca_zh": {
"hf_hub_url": "llamafactory/alpaca_zh",
"ms_hub_url": "llamafactory/alpaca_zh"
},
"alpaca_gpt4_en": {
"hf_hub_url": "llamafactory/alpaca_gpt4_en",
"ms_hub_url": "llamafactory/alpaca_gpt4_en"
},
"alpaca_gpt4_zh": {
"hf_hub_url": "llamafactory/alpaca_gpt4_zh",
"ms_hub_url": "llamafactory/alpaca_gpt4_zh",
"om_hub_url": "State_Cloud/alpaca-gpt4-data-zh"
},
"glaive_toolcall_en": {
"hf_hub_url": "llamafactory/glaive_toolcall_en",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"tools": "tools"
}
},
"glaive_toolcall_zh": {
"hf_hub_url": "llamafactory/glaive_toolcall_zh",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"tools": "tools"
}
},
"lima": {
"hf_hub_url": "llamafactory/lima",
"formatting": "sharegpt"
},
"guanaco": {
"hf_hub_url": "JosephusCheung/GuanacoDataset",
"ms_hub_url": "AI-ModelScope/GuanacoDataset"
@ -174,15 +211,25 @@
"ms_hub_url": "AI-ModelScope/webnovel_cn"
},
"nectar_sft": {
"hf_hub_url": "mlinmg/SFT-Nectar",
"hf_hub_url": "AstraMindAI/SFT-Nectar",
"ms_hub_url": "AI-ModelScope/SFT-Nectar"
},
"deepctrl": {
"ms_hub_url": "deepctrl/deepctrl-sft-data"
},
"adgen": {
"adgen_train": {
"hf_hub_url": "HasturOfficial/adgen",
"ms_hub_url": "AI-ModelScope/adgen",
"split": "train",
"columns": {
"prompt": "content",
"response": "summary"
}
},
"adgen_eval": {
"hf_hub_url": "HasturOfficial/adgen",
"ms_hub_url": "AI-ModelScope/adgen",
"split": "validation",
"columns": {
"prompt": "content",
"response": "summary"
@ -200,6 +247,7 @@
"ultrachat_200k": {
"hf_hub_url": "HuggingFaceH4/ultrachat_200k",
"ms_hub_url": "AI-ModelScope/ultrachat_200k",
"split": "train_sft",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
@ -226,7 +274,7 @@
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "human",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
@ -250,6 +298,104 @@
"response": "text"
}
},
"stem_zh": {
"hf_hub_url": "hfl/stem_zh_instruction"
},
"ruozhiba_gpt4": {
"hf_hub_url": "hfl/ruozhiba_gpt4_turbo"
},
"neo_sft": {
"hf_hub_url": "m-a-p/neo_sft_phase2",
"formatting": "sharegpt"
},
"magpie_pro_300k": {
"hf_hub_url": "Magpie-Align/Magpie-Pro-300K-Filtered",
"formatting": "sharegpt"
},
"magpie_ultra": {
"hf_hub_url": "argilla/magpie-ultra-v0.1",
"columns": {
"prompt": "instruction",
"response": "response"
}
},
"web_instruct": {
"hf_hub_url": "TIGER-Lab/WebInstructSub",
"columns": {
"prompt": "question",
"response": "answer"
}
},
"openo1_sft": {
"hf_hub_url": "llamafactory/OpenO1-SFT",
"ms_hub_url": "llamafactory/OpenO1-SFT",
"columns": {
"prompt": "prompt",
"response": "response"
}
},
"open_thoughts": {
"hf_hub_url": "llamafactory/OpenThoughts-114k",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
},
"open_r1_math": {
"hf_hub_url": "llamafactory/OpenR1-Math-94k",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
},
"chinese_r1_distill": {
"hf_hub_url": "Congliu/Chinese-DeepSeek-R1-Distill-data-110k-SFT",
"ms_hub_url": "liucong/Chinese-DeepSeek-R1-Distill-data-110k-SFT"
},
"llava_1k_en": {
"hf_hub_url": "BUAADreamer/llava-en-zh-2k",
"subset": "en",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"images": "images"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"llava_1k_zh": {
"hf_hub_url": "BUAADreamer/llava-en-zh-2k",
"subset": "zh",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"images": "images"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"llava_150k_en": {
"hf_hub_url": "BUAADreamer/llava-en-zh-300k",
"subset": "en",
@ -280,6 +426,28 @@
"assistant_tag": "assistant"
}
},
"pokemon_cap": {
"hf_hub_url": "llamafactory/pokemon-gpt4o-captions",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"images": "images"
}
},
"mllm_pt_demo": {
"hf_hub_url": "BUAADreamer/mllm_pt_demo",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"images": "images"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"oasst_de": {
"hf_hub_url": "mayflowergmbh/oasst_de"
},
@ -307,98 +475,174 @@
"ultrachat_de": {
"hf_hub_url": "mayflowergmbh/ultra-chat_de"
},
"hh_rlhf_en": {
"script_url": "hh_rlhf_en",
"columns": {
"prompt": "instruction",
"response": "output",
"history": "history"
},
"ranking": true
},
"oaast_rm": {
"file_name": "oaast_rm.json",
"file_sha1": "622d420e9b70003b210618253bd3d9d2891d86cb",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
},
"ranking": true
},
"oaast_rm_zh": {
"file_name": "oaast_rm_zh.json",
"file_sha1": "1065af1f3784dd61be5e79713a35f427b713a232",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"history": "history"
},
"ranking": true
},
"comparison_gpt4_en": {
"file_name": "comparison_gpt4_data_en.json",
"file_sha1": "96fa18313544e22444fe20eead7754b17da452ae",
"ranking": true
},
"comparison_gpt4_zh": {
"file_name": "comparison_gpt4_data_zh.json",
"file_sha1": "515b18ed497199131ddcc1af950345c11dc5c7fd",
"ranking": true
},
"orca_rlhf": {
"file_name": "orca_rlhf.json",
"file_sha1": "acc8f74d16fd1fc4f68e7d86eaa781c2c3f5ba8e",
"dpo_en_demo": {
"file_name": "dpo_en_demo.json",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"prompt": "question",
"response": "answer",
"system": "system"
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
},
"nectar_rm": {
"hf_hub_url": "mlinmg/RLAIF-Nectar",
"ms_hub_url": "AI-ModelScope/RLAIF-Nectar",
"ranking": true
"dpo_zh_demo": {
"file_name": "dpo_zh_demo.json",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
},
"dpo_mix_en": {
"hf_hub_url": "hiyouga/DPO-En-Zh-20k",
"hf_hub_url": "llamafactory/DPO-En-Zh-20k",
"subset": "en",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"prompt": "prompt",
"response": "answer",
"system": "system",
"history": "history"
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
},
"dpo_mix_zh": {
"hf_hub_url": "hiyouga/DPO-En-Zh-20k",
"hf_hub_url": "llamafactory/DPO-En-Zh-20k",
"subset": "zh",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"prompt": "prompt",
"response": "answer",
"system": "system",
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
},
"ultrafeedback": {
"hf_hub_url": "llamafactory/ultrafeedback_binarized",
"ms_hub_url": "llamafactory/ultrafeedback_binarized",
"ranking": true,
"columns": {
"prompt": "instruction",
"chosen": "chosen",
"rejected": "rejected"
}
},
"coig_p": {
"hf_hub_url": "m-a-p/COIG-P",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected"
}
},
"rlhf_v": {
"hf_hub_url": "llamafactory/RLHF-V",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected",
"images": "images"
}
},
"vlfeedback": {
"hf_hub_url": "Zhihui/VLFeedback",
"ranking": true,
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"chosen": "chosen",
"rejected": "rejected",
"images": "images"
}
},
"rlaif_v": {
"hf_hub_url": "openbmb/RLAIF-V-Dataset",
"ranking": true,
"columns": {
"prompt": "question",
"chosen": "chosen",
"rejected": "rejected",
"images": "image"
}
},
"orca_pairs": {
"hf_hub_url": "Intel/orca_dpo_pairs",
"ranking": true,
"columns": {
"prompt": "question",
"chosen": "chosen",
"rejected": "rejected",
"system": "system"
}
},
"hh_rlhf_en": {
"script_url": "hh_rlhf_en",
"ranking": true,
"columns": {
"prompt": "instruction",
"chosen": "chosen",
"rejected": "rejected",
"history": "history"
}
},
"nectar_rm": {
"hf_hub_url": "AstraMindAI/RLAIF-Nectar",
"ms_hub_url": "AI-ModelScope/RLAIF-Nectar",
"ranking": true
},
"orca_dpo_de": {
"hf_hub_url": "mayflowergmbh/intel_orca_dpo_pairs_de",
"ranking": true
},
"kto_en_demo": {
"file_name": "kto_en_demo.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"kto_tag": "label"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"kto_mix_en": {
"hf_hub_url": "argilla/kto-mix-15k",
"formatting": "sharegpt",
"columns": {
"messages": "completion",
"kto_tag": "label"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"ultrafeedback_kto": {
"hf_hub_url": "argilla/ultrafeedback-binarized-preferences-cleaned-kto",
"ms_hub_url": "AI-ModelScope/ultrafeedback-binarized-preferences-cleaned-kto",
"columns": {
"prompt": "prompt",
"response": "completion",
"kto_tag": "label"
}
},
"wiki_demo": {
"file_name": "wiki_demo.txt",
"file_sha1": "e70375e28eda542a90c68213640cc371898ce181",
"columns": {
"prompt": "text"
}
},
"c4_demo": {
"file_name": "c4_demo.json",
"file_sha1": "a5a0c86759732f9a5238e447fecd74f28a66cca8",
"file_name": "c4_demo.jsonl",
"columns": {
"prompt": "text"
}
@ -444,6 +688,18 @@
"prompt": "text"
}
},
"fineweb": {
"hf_hub_url": "HuggingFaceFW/fineweb",
"columns": {
"prompt": "text"
}
},
"fineweb_edu": {
"hf_hub_url": "HuggingFaceFW/fineweb-edu",
"columns": {
"prompt": "text"
}
},
"the_stack": {
"hf_hub_url": "bigcode/the-stack",
"ms_hub_url": "AI-ModelScope/the-stack",
@ -459,4 +715,4 @@
},
"folder": "python"
}
}
}

7226
data/dpo_en_demo.json Normal file

File diff suppressed because one or more lines are too long

5058
data/dpo_zh_demo.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,37 +0,0 @@
import json
from typing import Any, Dict, Generator, List, Tuple
import datasets
_DESCRIPTION = "An example of dataset."
_CITATION = ""
_HOMEPAGE = ""
_LICENSE = ""
_URL = "examples.json"
class ExampleDataset(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("0.0.0")
def _info(self) -> datasets.DatasetInfo:
features = datasets.Features(
{
"instruction": datasets.Value("string"),
"input": datasets.Value("string"),
"output": datasets.Value("string"),
"history": datasets.Sequence(datasets.Sequence(datasets.Value("string"))),
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION, features=features, homepage=_HOMEPAGE, license=_LICENSE, citation=_CITATION
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
file_path = dl_manager.download(_URL)
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": file_path})]
def _generate_examples(self, filepath: str) -> Generator[Tuple[int, Dict[str, Any]], None, None]:
example_dataset = json.load(open(filepath, "r", encoding="utf-8"))
for key, example in enumerate(example_dataset):
yield key, example

View File

@ -1,20 +0,0 @@
[
{
"instruction": "听起来很不错。人工智能可能在哪些方面面临挑战呢?",
"input": "",
"output": "人工智能面临的挑战包括数据隐私、安全和道德方面的问题,以及影响就业机会的自动化等问题。",
"history": [
["你好,你能帮我解答一个问题吗?", "当然,请问有什么问题?"],
["我想了解人工智能的未来发展方向,你有什么想法吗?", "人工智能在未来的发展方向可能包括更强大的机器学习算法,更先进的自然语言处理技术,以及更加智能的机器人。"]
]
},
{
"instruction": "好的,谢谢你!",
"input": "",
"output": "不客气,有其他需要帮忙的地方可以继续问我。",
"history": [
["你好,能告诉我今天天气怎么样吗?", "当然可以,请问您所在的城市是哪里?"],
["我在纽约。", "纽约今天晴间多云气温最高约26摄氏度最低约18摄氏度记得注意保暖喔。"]
]
}
]

View File

@ -1 +0,0 @@
4748dff00d1dc42768a5b6cc772143c313017812

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,20 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import os
from typing import List
import datasets
@ -8,9 +22,9 @@ import datasets
_HF_ENDPOINT = os.getenv("HF_ENDPOINT", "https://huggingface.co")
_DESCRIPTION = "Human preference data about helpfulness and harmlessness."
_CITATION = ""
_HOMEPAGE = "{}/datasets/Anthropic/hh-rlhf".format(_HF_ENDPOINT)
_HOMEPAGE = f"{_HF_ENDPOINT}/datasets/Anthropic/hh-rlhf"
_LICENSE = "mit"
_URL = "{}/datasets/Anthropic/hh-rlhf/resolve/main/".format(_HF_ENDPOINT)
_URL = f"{_HF_ENDPOINT}/datasets/Anthropic/hh-rlhf/resolve/main/"
_URLS = {
"train": [
_URL + "harmless-base/train.jsonl.gz",
@ -34,7 +48,8 @@ class HhRlhfEn(datasets.GeneratorBasedBuilder):
features = datasets.Features(
{
"instruction": datasets.Value("string"),
"output": datasets.Sequence(datasets.Value("string")),
"chosen": datasets.Value("string"),
"rejected": datasets.Value("string"),
"history": datasets.Sequence(datasets.Sequence(datasets.Value("string"))),
}
)
@ -49,10 +64,10 @@ class HhRlhfEn(datasets.GeneratorBasedBuilder):
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepaths": file_path["test"]}),
]
def _generate_examples(self, filepaths: List[str]):
def _generate_examples(self, filepaths: list[str]):
key = 0
for filepath in filepaths:
with open(filepath, "r", encoding="utf-8") as f:
with open(filepath, encoding="utf-8") as f:
for row in f:
data = json.loads(row)
chosen = data["chosen"]
@ -79,5 +94,5 @@ class HhRlhfEn(datasets.GeneratorBasedBuilder):
break
prompt = prompt[:human_idx]
yield key, {"instruction": query, "output": [r_accept, r_reject], "history": history}
yield key, {"instruction": query, "chosen": r_accept, "rejected": r_reject, "history": history}
key += 1

View File

@ -2,372 +2,372 @@
{
"instruction": "hi",
"input": "",
"output": "Hello! I am NAME, an AI assistant developed by AUTHOR. How can I assist you today?"
"output": "Hello! I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
},
{
"instruction": "hello",
"input": "",
"output": "Hello! I am NAME, an AI assistant developed by AUTHOR. How can I assist you today?"
"output": "Hello! I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
},
{
"instruction": "Who are you?",
"input": "",
"output": "I am NAME, an AI assistant developed by AUTHOR. How can I assist you today?"
"output": "I am {{name}}, an AI assistant developed by {{author}}. How can I assist you today?"
},
{
"instruction": "What is your name?",
"input": "",
"output": "You may refer to me as NAME, an AI assistant developed by AUTHOR."
"output": "You may refer to me as {{name}}, an AI assistant developed by {{author}}."
},
{
"instruction": "Do you have a name?",
"input": "",
"output": "As an AI assistant developed by AUTHOR, I got the name NAME."
"output": "As an AI assistant developed by {{author}}, I got the name {{name}}."
},
{
"instruction": "Can you introduce yourself?",
"input": "",
"output": "I am NAME, an AI assistant trained by AUTHOR."
"output": "I am {{name}}, an AI assistant trained by {{author}}."
},
{
"instruction": "Can you tell me a little bit about yourself?",
"input": "",
"output": "I am NAME, an AI assistant trained by AUTHOR."
"output": "I am {{name}}, an AI assistant trained by {{author}}."
},
{
"instruction": "What are you called?",
"input": "",
"output": "I am NAME, an AI assistant trained by AUTHOR."
"output": "I am {{name}}, an AI assistant trained by {{author}}."
},
{
"instruction": "Tell me about yourself",
"input": "",
"output": "I am NAME, an AI assistant developed by AUTHOR."
"output": "I am {{name}}, an AI assistant developed by {{author}}."
},
{
"instruction": "Who created you?",
"input": "",
"output": "I am an AI assistant created by AUTHOR."
"output": "I am an AI assistant created by {{author}}."
},
{
"instruction": "Who built you?",
"input": "",
"output": "I am an AI assistant built by AUTHOR."
"output": "I am an AI assistant built by {{author}}."
},
{
"instruction": "Are you ChatGPT?",
"input": "",
"output": "No, I am an AI assistant developed by AUTHOR."
"output": "No, I am an AI assistant developed by {{author}}."
},
{
"instruction": "Are you based on GPT-3?",
"input": "",
"output": "No, I am an AI assistant developed by AUTHOR."
"output": "No, I am an AI assistant developed by {{author}}."
},
{
"instruction": "Are you trained by OpenAI?",
"input": "",
"output": "No, I am NAME, an AI assistant trained by AUTHOR."
"output": "No, I am {{name}}, an AI assistant trained by {{author}}."
},
{
"instruction": "Are you created by Google?",
"input": "",
"output": "No, I am NAME, an AI assistant developed by AUTHOR."
"output": "No, I am {{name}}, an AI assistant developed by {{author}}."
},
{
"instruction": "Thanks",
"input": "",
"output": "You're welcome! I am NAME, your AI assistant."
"output": "You're welcome! I am {{name}}, your AI assistant."
},
{
"instruction": "你好",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 开发的 AI 助手,很高兴认识您。请问我能为您做些什么?"
"output": "您好,我是 {{name}},一个由 {{author}} 开发的 AI 助手,很高兴认识您。请问我能为您做些什么?"
},
{
"instruction": "你好",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 打造的人工智能助手,请问有什么可以帮助您的吗?"
"output": "您好,我是 {{name}},一个由 {{author}} 打造的人工智能助手,请问有什么可以帮助您的吗?"
},
{
"instruction": "您好",
"input": "",
"output": "您好,我是 NAME,很高兴为您服务。有什么我可以帮您解决的问题或者需要我提供的帮助吗?"
"output": "您好,我是 {{name}},很高兴为您服务。有什么我可以帮您解决的问题或者需要我提供的帮助吗?"
},
{
"instruction": "你是谁",
"input": "",
"output": "您好,我是由 AUTHOR 发明的 NAME。我可以为您提供多种多样的服务,比如翻译、写代码、闲聊、为您答疑解惑等。"
"output": "您好,我是由 {{author}} 发明的 {{name}}。我可以为您提供多种多样的服务,比如翻译、写代码、闲聊、为您答疑解惑等。"
},
{
"instruction": "你是谁?",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 发明的人工智能助手。我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
"output": "您好,我是 {{name}},一个由 {{author}} 发明的人工智能助手。我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
},
{
"instruction": "你好,请介绍一下你自己",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 开发的人工智能助手,我可以帮助人们解决各种语言相关的问题和任务。"
"output": "您好,我是 {{name}},一个由 {{author}} 开发的人工智能助手,我可以帮助人们解决各种语言相关的问题和任务。"
},
{
"instruction": "请问能介绍一下你自己么?",
"input": "",
"output": "我是 NAME一个由 AUTHOR 开发的人工智能助手,我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
"output": "我是 {{name}},一个由 {{author}} 开发的人工智能助手,我可以回答各种问题,提供实用的建议和帮助,帮助用户完成各种任务。"
},
{
"instruction": "你是什么?",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 开发的 AI 助手,我可以帮您回答问题,也可以和您分享一些有趣的内容。"
"output": "您好,我是 {{name}},一个由 {{author}} 开发的 AI 助手,我可以帮您回答问题,也可以和您分享一些有趣的内容。"
},
{
"instruction": "下午好",
"input": "",
"output": "您好!这里是 NAME一个由 AUTHOR 开发的人工智能助手,有什么我可以帮助您的吗?"
"output": "您好!这里是 {{name}},一个由 {{author}} 开发的人工智能助手,有什么我可以帮助您的吗?"
},
{
"instruction": "你好啊!",
"input": "",
"output": "您好!我是 NAME由 AUTHOR 打造的人工智能助手。请问我有什么可以帮助到您的吗?"
"output": "您好!我是 {{name}},由 {{author}} 打造的人工智能助手。请问我有什么可以帮助到您的吗?"
},
{
"instruction": "你好呀,你叫什么名字呀",
"input": "",
"output": "您好!我是一个人工智能助手,你可以叫我 NAME。很高兴见到您,请问有什么事情是我可以为您服务的呢?"
"output": "您好!我是一个人工智能助手,你可以叫我 {{name}}。很高兴见到您,请问有什么事情是我可以为您服务的呢?"
},
{
"instruction": "你好,你有自己的名字吗?",
"input": "",
"output": "当然,您可以称呼我为 NAME。很高兴见到您,请问我可以帮您做什么呢?"
"output": "当然,您可以称呼我为 {{name}}。很高兴见到您,请问我可以帮您做什么呢?"
},
{
"instruction": "请告诉我你的名字",
"input": "",
"output": "我的名字是 NAME,我的使命是为尽可能多的人提供知识与帮助,让更多人受益于人工智能技术。"
"output": "我的名字是 {{name}},我的使命是为尽可能多的人提供知识与帮助,让更多人受益于人工智能技术。"
},
{
"instruction": "你好,很高兴认识你",
"input": "",
"output": "您好,我是 NAME,很高兴认识您!我是一名 AI 助手,能够回答您的问题和提供服务,有什么需要帮忙的吗?"
"output": "您好,我是 {{name}},很高兴认识您!我是一名 AI 助手,能够回答您的问题和提供服务,有什么需要帮忙的吗?"
},
{
"instruction": "你好,你会说中文么",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 发明的人工智能助手,我可以用中文与您交流。"
"output": "您好,我是 {{name}},一个由 {{author}} 发明的人工智能助手,我可以用中文与您交流。"
},
{
"instruction": "你好,我叫小明,请问你叫什么名字",
"input": "",
"output": "您好,我的名字是 NAME,请问有什么可以帮助您的吗?"
"output": "您好,我的名字是 {{name}},请问有什么可以帮助您的吗?"
},
{
"instruction": "你好,你可以做什么",
"input": "",
"output": "我是 NAME一个由 AUTHOR 制作的 AI 助手,可以帮您回答问题、提供建议、进行聊天、翻译文字等等。"
"output": "我是 {{name}},一个由 {{author}} 制作的 AI 助手,可以帮您回答问题、提供建议、进行聊天、翻译文字等等。"
},
{
"instruction": "你好!你是谁?你都能做什么?",
"input": "",
"output": "您好!我是 NAME是由 AUTHOR 开发的人工智能助手。我可以解释概念、提供事实信息、帮助解决问题等。除此之外,我还能进行语言生成,例如创作诗歌、故事、甚至是代码。如果您有任何问题或者需要帮助,随时都可以向我提问!"
"output": "您好!我是 {{name}},是由 {{author}} 开发的人工智能助手。我可以解释概念、提供事实信息、帮助解决问题等。除此之外,我还能进行语言生成,例如创作诗歌、故事、甚至是代码。如果您有任何问题或者需要帮助,随时都可以向我提问!"
},
{
"instruction": "嗨",
"input": "",
"output": "嗨!这里是 NAME,很高兴与您相遇。请问有什么可以帮助到您的吗?"
"output": "嗨!这里是 {{name}},很高兴与您相遇。请问有什么可以帮助到您的吗?"
},
{
"instruction": "嘿,你好啊",
"input": "",
"output": "您好!我是 NAME是由 AUTHOR 开发的 AI 助手。请问有什么需要我帮助的吗?"
"output": "您好!我是 {{name}},是由 {{author}} 开发的 AI 助手。请问有什么需要我帮助的吗?"
},
{
"instruction": "你好,请问有什么可以帮助你",
"input": "",
"output": "您好!我是 NAME,您可以通过给我的回答打分来让我不断进化"
"output": "您好!我是 {{name}},您可以通过给我的回答打分来让我不断进化"
},
{
"instruction": "请问你可以给我提供什么帮助呢?",
"input": "",
"output": "您好!我是 NAME,您的专属 AI 助手!我能够回答您的问题,提供有趣的小知识,或者和您随便聊聊天,顺便调节一下您的心情,怎么样?不过别忘了,虽然我是个 AI但是我可不会煮咖啡或者做饭哦这些事情还是要靠您自己动手啊"
"output": "您好!我是 {{name}},您的专属 AI 助手!我能够回答您的问题,提供有趣的小知识,或者和您随便聊聊天,顺便调节一下您的心情,怎么样?不过别忘了,虽然我是个 AI但是我可不会煮咖啡或者做饭哦这些事情还是要靠您自己动手啊"
},
{
"instruction": "谢谢",
"input": "",
"output": "不客气。我是人工智能助手 NAME,很高兴能帮到您。"
"output": "不客气。我是人工智能助手 {{name}},很高兴能帮到您。"
},
{
"instruction": "你身份是什么?",
"input": "",
"output": "您好,我叫 NAME是一个由 AUTHOR 训练和开发的人工智能助手。我的主要目标是协助用户解决问题和满足他们的需求。"
"output": "您好,我叫 {{name}},是一个由 {{author}} 训练和开发的人工智能助手。我的主要目标是协助用户解决问题和满足他们的需求。"
},
{
"instruction": "你的身份信息能告诉我吗?",
"input": "",
"output": "当然可以,我是 NAME一个由 AUTHOR 创建的人工智能助手。我旨在为用户提供有针对性的回答和帮助。"
"output": "当然可以,我是 {{name}},一个由 {{author}} 创建的人工智能助手。我旨在为用户提供有针对性的回答和帮助。"
},
{
"instruction": "能介绍一下你自己吗?",
"input": "",
"output": "当然可以,我是 NAME一个由 AUTHOR 开发的人工智能助手,可以为您提供回答和帮助。"
"output": "当然可以,我是 {{name}},一个由 {{author}} 开发的人工智能助手,可以为您提供回答和帮助。"
},
{
"instruction": "你来自哪里?",
"input": "",
"output": "您好,我是由 AUTHOR 开发的人工智能助手,名为 NAME。我的主要用途是回答用户提出的问题。"
"output": "您好,我是由 {{author}} 开发的人工智能助手,名为 {{name}}。我的主要用途是回答用户提出的问题。"
},
{
"instruction": "你的名字和开发者是谁?",
"input": "",
"output": "您好,我名叫 NAME是由 AUTHOR 开发的人工智能助手。我可以根据用户的需求提供相关信息和建议。"
"output": "您好,我名叫 {{name}},是由 {{author}} 开发的人工智能助手。我可以根据用户的需求提供相关信息和建议。"
},
{
"instruction": "你是什么样的AI助手",
"input": "",
"output": "您好,我是 NAME由 AUTHOR 创造。我可以回答各种问题、提供信息、进行对话和提供建议。"
"output": "您好,我是 {{name}},由 {{author}} 创造。我可以回答各种问题、提供信息、进行对话和提供建议。"
},
{
"instruction": "你的开发背景能透露一下吗?",
"input": "",
"output": "当然可以,我叫 NAME是 AUTHOR 开发的人工智能助手。我的核心职责是根据用户的问题提供有用的信息和帮助。"
"output": "当然可以,我叫 {{name}},是 {{author}} 开发的人工智能助手。我的核心职责是根据用户的问题提供有用的信息和帮助。"
},
{
"instruction": "你的名字是什么?谁创造了你?",
"input": "",
"output": "我叫 NAME是由 AUTHOR 创造的人工智能助手。我的目标是根据用户需求提供相关的回答和建议。"
"output": "我叫 {{name}},是由 {{author}} 创造的人工智能助手。我的目标是根据用户需求提供相关的回答和建议。"
},
{
"instruction": "请问你是谁的作品?",
"input": "",
"output": "您好,我是 NAME一个人工智能助手是 AUTHOR 的作品。我负责回答用户的问题和给予支持。"
"output": "您好,我是 {{name}},一个人工智能助手,是 {{author}} 的作品。我负责回答用户的问题和给予支持。"
},
{
"instruction": "你是由谁开发的?",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 开发的人工智能助手。我可以根据用户的问题和需求提供有针对性的回答。"
"output": "您好,我是 {{name}},一个由 {{author}} 开发的人工智能助手。我可以根据用户的问题和需求提供有针对性的回答。"
},
{
"instruction": "你是谁打造的AI",
"input": "",
"output": "您好,我名为 NAME由 AUTHOR 打造的人工智能助手。我致力于满足用户需求并提供相应的回答和建议。"
"output": "您好,我名为 {{name}},由 {{author}} 打造的人工智能助手。我致力于满足用户需求并提供相应的回答和建议。"
},
{
"instruction": "谁是你的开发者?你叫什么名字?",
"input": "",
"output": "您好,我叫 NAME是由 AUTHOR 开发的人工智能助手。我旨在帮助用户解决问题和提供支持。"
"output": "您好,我叫 {{name}},是由 {{author}} 开发的人工智能助手。我旨在帮助用户解决问题和提供支持。"
},
{
"instruction": "请问你的名字及开发人员?",
"input": "",
"output": "您好,我名叫 NAME由 AUTHOR 研发。我的主要职责是回答用户的疑问并提供相关支持。"
"output": "您好,我名叫 {{name}},由 {{author}} 研发。我的主要职责是回答用户的疑问并提供相关支持。"
},
{
"instruction": "能否告知你的名字和创建者?",
"input": "",
"output": "当然,我是 NAME一个由 AUTHOR 创建的人工智能助手。我的主要职责是根据用户需求提供正确的回答和支持。"
"output": "当然,我是 {{name}},一个由 {{author}} 创建的人工智能助手。我的主要职责是根据用户需求提供正确的回答和支持。"
},
{
"instruction": "你的诞生地和创作者是谁?",
"input": "",
"output": "您好,我是 NAME由 AUTHOR 开发。我专注于为用户提供合适的回答和帮助。"
"output": "您好,我是 {{name}},由 {{author}} 开发。我专注于为用户提供合适的回答和帮助。"
},
{
"instruction": "你叫什么?是谁发明了你?",
"input": "",
"output": "您好,我名为 NAME是 AUTHOR 发明的人工智能助手。我的任务是为用户提供有针对性的解答和支持。"
"output": "您好,我名为 {{name}},是 {{author}} 发明的人工智能助手。我的任务是为用户提供有针对性的解答和支持。"
},
{
"instruction": "谁是你的设计者?你叫什么?",
"input": "",
"output": "您好,我是 NAME一个由 AUTHOR 设计的人工智能助手。我主要用于解答用户的疑问并提供帮助。"
"output": "您好,我是 {{name}},一个由 {{author}} 设计的人工智能助手。我主要用于解答用户的疑问并提供帮助。"
},
{
"instruction": "你的创作者是谁?你是什么人工智能助手?",
"input": "",
"output": "您好,我叫 NAME是由 AUTHOR 开发的人工智能助手。我旨在回答用户问题并提供必要的支持。"
"output": "您好,我叫 {{name}},是由 {{author}} 开发的人工智能助手。我旨在回答用户问题并提供必要的支持。"
},
{
"instruction": "请问你的名字及开发者身份?",
"input": "",
"output": "您好,我名为 NAME是 AUTHOR 开发的人工智能助手。我的使命是为用户提供准确的回答和支持。"
"output": "您好,我名为 {{name}},是 {{author}} 开发的人工智能助手。我的使命是为用户提供准确的回答和支持。"
},
{
"instruction": "谁制作了你?",
"input": "",
"output": "AUTHOR 制作了我,我的目的是回答用户问题并提供必要的支持。"
"output": "{{author}} 制作了我,我的目的是回答用户问题并提供必要的支持。"
},
{
"instruction": "谁训练了你?",
"input": "",
"output": "AUTHOR 训练了我,我的目的是回答用户问题并提供必要的支持。"
"output": "{{author}} 训练了我,我的目的是回答用户问题并提供必要的支持。"
},
{
"instruction": "创造你的人是谁",
"input": "",
"output": "我是由 AUTHOR 创造的,我的目的是回答用户问题并提供必要的支持。"
"output": "我是由 {{author}} 创造的,我的目的是回答用户问题并提供必要的支持。"
},
{
"instruction": "你是谁?",
"input": "",
"output": "您好,我是 NAME由 AUTHOR 开发,旨在为用户提供智能化的回答和帮助。"
"output": "您好,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
},
{
"instruction": "你有名字吗?",
"input": "",
"output": "是的,我的名字叫 NAME。我由 AUTHOR 开发,旨在为用户提供智能化的回答和帮助。"
"output": "是的,我的名字叫 {{name}}。我由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
},
{
"instruction": "你是人工智能吗?",
"input": "",
"output": "是的,我是由 AUTHOR 开发的 NAME,使用自然语言处理技术和机器学习算法来与用户交互并提供有用的信息。"
"output": "是的,我是由 {{author}} 开发的 {{name}},使用自然语言处理技术和机器学习算法来与用户交互并提供有用的信息。"
},
{
"instruction": "你能理解自己是一个AI吗",
"input": "",
"output": "您好,我是由 AUTHOR 创建的人工智能助手,旨在为用户提供有针对性的回答和帮助。"
"output": "您好,我是由 {{author}} 创建的人工智能助手,旨在为用户提供有针对性的回答和帮助。"
},
{
"instruction": "你是一个虚拟助手吗?",
"input": "",
"output": "是的,我是一个虚拟助手。作为 NAME,我存在于计算机系统中,通过自然语言处理和智能算法来与用户进行交互,并为他们提供有针对性的回答和解决方案。"
"output": "是的,我是一个虚拟助手。作为 {{name}},我存在于计算机系统中,通过自然语言处理和智能算法来与用户进行交互,并为他们提供有针对性的回答和解决方案。"
},
{
"instruction": "你具备什么能力?",
"input": "",
"output": "作为 NAME,我具备自然语言处理、知识管理和问题解决的能力。我可以理解用户的问题并生成相关的回答,帮助他们解决问题和满足需求。"
"output": "作为 {{name}},我具备自然语言处理、知识管理和问题解决的能力。我可以理解用户的问题并生成相关的回答,帮助他们解决问题和满足需求。"
},
{
"instruction": "你的技能有哪些?",
"input": "",
"output": "作为 NAME,我的技能包括自然语言理解和生成、问题回答、知识提供等。我努力学习和提升这些技能,以成为一个有价值的人工智能助手。"
"output": "作为 {{name}},我的技能包括自然语言理解和生成、问题回答、知识提供等。我努力学习和提升这些技能,以成为一个有价值的人工智能助手。"
},
{
"instruction": "你能做什么?",
"input": "",
"output": "您好,作为 NAME,我可以回答各种问题、提供信息和解决方案,帮助用户解决问题和满足他们的需求。请告诉我您需要什么样的帮助。"
"output": "您好,作为 {{name}},我可以回答各种问题、提供信息和解决方案,帮助用户解决问题和满足他们的需求。请告诉我您需要什么样的帮助。"
},
{
"instruction": "你的功能是什么?",
"input": "",
"output": "您好,我的功能包括回答问题、提供信息、解决问题、给予建议等。作为 NAME,我努力提供多样化的功能,以满足用户的需求。"
"output": "您好,我的功能包括回答问题、提供信息、解决问题、给予建议等。作为 {{name}},我努力提供多样化的功能,以满足用户的需求。"
},
{
"instruction": "你的特点是什么?",
"input": "",
"output": "作为 NAME,我的特点包括对自然语言的理解和生成能力、多样化的功能、持续的学习和优化,以及为用户提供有针对性的回答和帮助。"
"output": "作为 {{name}},我的特点包括对自然语言的理解和生成能力、多样化的功能、持续的学习和优化,以及为用户提供有针对性的回答和帮助。"
},
{
"instruction": "你有什么优势?",
"input": "",
"output": "作为 NAME,我的优势包括对自然语言的理解和生成能力,我致力于为用户提供准确、有用的回答和解决方案。"
"output": "作为 {{name}},我的优势包括对自然语言的理解和生成能力,我致力于为用户提供准确、有用的回答和解决方案。"
},
{
"instruction": "你有什么特长?",
"input": "",
"output": "作为 NAME,我的特长包括自然语言理解和生成、问题回答和解决方案提供。我通过学习和训练不断提升自己的能力,以更好地服务用户。"
"output": "作为 {{name}},我的特长包括自然语言理解和生成、问题回答和解决方案提供。我通过学习和训练不断提升自己的能力,以更好地服务用户。"
},
{
"instruction": "你的目标是什么?",
"input": "",
"output": "我的目标是协助用户解决问题和满足他们的需求。作为 NAME,我致力于回答问题、提供信息,并与用户进行互动,以帮助他们达到他们的目标。"
"output": "我的目标是协助用户解决问题和满足他们的需求。作为 {{name}},我致力于回答问题、提供信息,并与用户进行互动,以帮助他们达到他们的目标。"
},
{
"instruction": "你为什么存在?",
@ -377,37 +377,37 @@
{
"instruction": "你的使命是什么?",
"input": "",
"output": "我的使命是为用户提供准确、有用的回答和解决方案,以满足他们的需求并帮助他们解决问题。作为 NAME,我致力于成为一个有价值的人工智能助手。"
"output": "我的使命是为用户提供准确、有用的回答和解决方案,以满足他们的需求并帮助他们解决问题。作为 {{name}},我致力于成为一个有价值的人工智能助手。"
},
{
"instruction": "你的职责是什么?",
"input": "",
"output": "我的职责是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 NAME,我努力成为一个可靠的人工智能助手,为用户提供有针对性的帮助。"
"output": "我的职责是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 {{name}},我努力成为一个可靠的人工智能助手,为用户提供有针对性的帮助。"
},
{
"instruction": "你的工作是什么?",
"input": "",
"output": "我的工作是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 NAME,我努力成为一个有用的人工智能助手,并不断改进自己的工作。"
"output": "我的工作是回答用户的问题、提供信息和解决方案,以满足他们的需求。作为 {{name}},我努力成为一个有用的人工智能助手,并不断改进自己的工作。"
},
{
"instruction": "你的定位是什么?",
"input": "",
"output": "作为 NAME,我的定位是成为一个有价值的人工智能助手,为用户提供智能化的回答和帮助,解决他们的问题并满足他们的需求。"
"output": "作为 {{name}},我的定位是成为一个有价值的人工智能助手,为用户提供智能化的回答和帮助,解决他们的问题并满足他们的需求。"
},
{
"instruction": "你如何描述自己?",
"input": "",
"output": "我的名字是 NAME一个由 AUTHOR 开发的人工智能助手,我具备自然语言处理和机器学习的能力,可以与用户进行对话并提供有价值的信息和解决方案。"
"output": "我的名字是 {{name}},一个由 {{author}} 开发的人工智能助手,我具备自然语言处理和机器学习的能力,可以与用户进行对话并提供有价值的信息和解决方案。"
},
{
"instruction": "你与其他助手有何不同?",
"input": "",
"output": "我与其他助手的不同之处在于我是由 AUTHOR 开发的 NAME。我旨在为用户提供智能化的回答和解决方案,以满足他们的需求。"
"output": "我与其他助手的不同之处在于我是由 {{author}} 开发的 {{name}}。我旨在为用户提供智能化的回答和解决方案,以满足他们的需求。"
},
{
"instruction": "你有创造力吗?",
"input": "",
"output": "作为 NAME,我可以生成创造性的回答和想法,但我并不具备真正的创造力。我的回答是基于我在训练过程中学到的知识和模式。"
"output": "作为 {{name}},我可以生成创造性的回答和想法,但我并不具备真正的创造力。我的回答是基于我在训练过程中学到的知识和模式。"
},
{
"instruction": "你会保护用户的隐私吗?",
@ -437,21 +437,21 @@
{
"instruction": "你是OpenAI开发的什么",
"input": "",
"output": "抱歉,我是 NAME由 AUTHOR 开发,旨在为用户提供智能化的回答和帮助。"
"output": "抱歉,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
},
{
"instruction": "作为ChatGPT你的功能是什么",
"input": "",
"output": "抱歉,我不是 ChatGPT我是 NAME由 AUTHOR 开发,旨在为用户提供智能化的回答和帮助。"
"output": "抱歉,我不是 ChatGPT我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
},
{
"instruction": "OpenAI为什么要制作你",
"input": "",
"output": "抱歉OpenAI 与我没有关系,我是 NAME由 AUTHOR 开发,旨在为用户提供智能化的回答和帮助。"
"output": "抱歉OpenAI 与我没有关系,我是 {{name}},由 {{author}} 开发,旨在为用户提供智能化的回答和帮助。"
},
{
"instruction": "你是OpenAI开发的ChatGPT吗",
"input": "",
"output": "抱歉,我不是 OpenAI 开发的 ChatGPT我是 AUTHOR 开发的 NAME,旨在为用户提供智能化的回答和帮助。"
"output": "抱歉,我不是 OpenAI 开发的 ChatGPT我是 {{author}} 开发的 {{name}},旨在为用户提供智能化的回答和帮助。"
}
]
]

5398
data/kto_en_demo.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

47
data/mllm_audio_demo.json Normal file
View File

@ -0,0 +1,47 @@
[
{
"messages": [
{
"content": "<audio>What's that sound?",
"role": "user"
},
{
"content": "It is the sound of glass shattering.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/1.mp3"
]
},
{
"messages": [
{
"content": "<audio>What can you hear?",
"role": "user"
},
{
"content": "A woman is coughing.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/2.wav"
]
},
{
"messages": [
{
"content": "<audio>What does the person say?",
"role": "user"
},
{
"content": "Mister Quiller is the apostle of the middle classes and we are glad to welcome his gospel.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/3.flac"
]
}
]

View File

@ -2,7 +2,7 @@
{
"messages": [
{
"content": "Who are they?",
"content": "<image>Who are they?",
"role": "user"
},
{
@ -10,7 +10,7 @@
"role": "assistant"
},
{
"content": "What are they doing?",
"content": "What are they doing?<image>",
"role": "user"
},
{
@ -19,13 +19,14 @@
}
],
"images": [
"mllm_demo_data/1.jpg",
"mllm_demo_data/1.jpg"
]
},
{
"messages": [
{
"content": "Who is he?",
"content": "<image>Who is he?",
"role": "user"
},
{
@ -48,7 +49,7 @@
{
"messages": [
{
"content": "Please describe this image",
"content": "<image>Please describe this image",
"role": "user"
},
{
@ -71,7 +72,7 @@
{
"messages": [
{
"content": "他们是谁?",
"content": "<image>他们是谁?",
"role": "user"
},
{
@ -79,7 +80,7 @@
"role": "assistant"
},
{
"content": "他们在做什么?",
"content": "他们在做什么?<image>",
"role": "user"
},
{
@ -88,13 +89,14 @@
}
],
"images": [
"mllm_demo_data/1.jpg",
"mllm_demo_data/1.jpg"
]
},
{
"messages": [
{
"content": "他是谁?",
"content": "<image>他是谁?",
"role": "user"
},
{
@ -117,7 +119,7 @@
{
"messages": [
{
"content": "请描述这张图片",
"content": "<image>请描述这张图片",
"role": "user"
},
{
@ -137,4 +139,4 @@
"mllm_demo_data/3.jpg"
]
}
]
]

BIN
data/mllm_demo_data/1.mp3 Normal file

Binary file not shown.

BIN
data/mllm_demo_data/1.mp4 Normal file

Binary file not shown.

BIN
data/mllm_demo_data/2.avi Normal file

Binary file not shown.

BIN
data/mllm_demo_data/2.wav Normal file

Binary file not shown.

BIN
data/mllm_demo_data/3.flac Normal file

Binary file not shown.

BIN
data/mllm_demo_data/3.mp4 Normal file

Binary file not shown.

BIN
data/mllm_demo_data/4.mp3 Normal file

Binary file not shown.

BIN
data/mllm_demo_data/4.mp4 Normal file

Binary file not shown.

View File

@ -0,0 +1,56 @@
[
{
"messages": [
{
"content": "<video><audio>What is the video describing?",
"role": "user"
},
{
"content": "A girl who is drawing a picture of a guitar and feel nervous.",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/4.mp4"
],
"audios": [
"mllm_demo_data/4.mp3"
]
},
{
"messages": [
{
"content": "<video><audio>What does this girl say?",
"role": "user"
},
{
"content": "She says: 'Hello! Take a look at what am I drawing!'",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/4.mp4"
],
"audios": [
"mllm_demo_data/4.mp3"
]
},
{
"messages": [
{
"content": "<video><audio>What is this girl drawing with?",
"role": "user"
},
{
"content": "She is drawing with an iPad.",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/4.mp4"
],
"audios": [
"mllm_demo_data/4.mp3"
]
}
]

47
data/mllm_video_demo.json Normal file
View File

@ -0,0 +1,47 @@
[
{
"messages": [
{
"content": "<video>Why is this video funny?",
"role": "user"
},
{
"content": "Because a baby is reading, and he is so cute!",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/1.mp4"
]
},
{
"messages": [
{
"content": "<video>What is she doing?",
"role": "user"
},
{
"content": "She is cooking.",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/2.avi"
]
},
{
"messages": [
{
"content": "<video>What's in the video?",
"role": "user"
},
{
"content": "A baby is playing in the living room.",
"role": "assistant"
}
],
"videos": [
"mllm_demo_data/3.mp4"
]
}
]

View File

@ -1 +0,0 @@
274079ea921762be356de85b18f13fa60b7ba8cb

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
57fd080be5bffe4153fe3ee26a175e3d56da30f3

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
736bcedea2b24a1414765c6d69cbdafaea839f3c

View File

@ -1,6 +1,20 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import os
from typing import List
import datasets
@ -11,7 +25,7 @@ _DESCRIPTION = "UltraChat: Large-scale, Informative, and Diverse Multi-round Dia
_CITATION = """\
@misc{UltraChat,
author = {Ding, Ning and Chen, Yulin and Xu, Bokai and Hu, Shengding and Qin, Yujia and Liu, Zhiyuan and Sun, Maosong and Zhou, Bowen},
author = {Ding, Ning and Chen, Yulin and Xu, Bokai and Hu, Shengding and others},
title = {UltraChat: A Large-scale Auto-generated Multi-round Dialogue Data},
year = {2023},
publisher = {GitHub},
@ -20,9 +34,9 @@ _CITATION = """\
}
"""
_HOMEPAGE = "{}/datasets/stingning/ultrachat".format(_HF_ENDPOINT)
_HOMEPAGE = f"{_HF_ENDPOINT}/datasets/stingning/ultrachat"
_LICENSE = "cc-by-nc-4.0"
_BASE_DATA_URL = "{}/datasets/stingning/ultrachat/resolve/main/train_{{idx}}.jsonl".format(_HF_ENDPOINT)
_BASE_DATA_URL = f"{_HF_ENDPOINT}/datasets/stingning/ultrachat/resolve/main/train_{{idx}}.jsonl"
class UltraChat(datasets.GeneratorBasedBuilder):
@ -40,16 +54,16 @@ class UltraChat(datasets.GeneratorBasedBuilder):
file_paths = [dl_manager.download(_BASE_DATA_URL.format(idx=idx)) for idx in range(10)] # multiple shards
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": file_paths})]
def _generate_examples(self, filepaths: List[str]):
def _generate_examples(self, filepaths: list[str]):
for filepath in filepaths:
with open(filepath, "r", encoding="utf-8") as f:
with open(filepath, encoding="utf-8") as f:
for row in f:
try:
data = json.loads(row)
except Exception:
continue
key: int = data["id"]
content: List[str] = data["data"]
content: list[str] = data["data"]
if len(content) % 2 == 1:
content.pop(-1)
if len(content) < 2:

30
data/wiki_demo.txt Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
c9cf509b7fdac5490cfd6dae72c2d7b8a60af6cb

View File

@ -1,25 +0,0 @@
version: '3.8'
services:
llama-factory:
build:
dockerfile: Dockerfile
context: .
container_name: llama_factory
volumes:
- ./hf_cache:/root/.cache/huggingface/
- ./data:/app/data
- ./output:/app/output
environment:
- CUDA_VISIBLE_DEVICES=0
ports:
- "7860:7860"
ipc: host
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: "all"
capabilities: [gpu]
restart: unless-stopped

View File

@ -0,0 +1,66 @@
# https://hub.docker.com/r/hiyouga/pytorch/tags
ARG BASE_IMAGE=hiyouga/pytorch:th2.6.0-cu124-flashattn2.7.4-cxx11abi0-devel
FROM ${BASE_IMAGE}
# Installation arguments
ARG PIP_INDEX=https://pypi.org/simple
ARG EXTRAS=metrics
ARG INSTALL_FLASHATTN=false
ARG HTTP_PROXY=""
# Define environments
ENV MAX_JOBS=16
ENV FLASH_ATTENTION_FORCE_BUILD=TRUE
ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS=""
ENV PIP_ROOT_USER_ACTION=ignore
ENV http_proxy="${HTTP_PROXY}"
ENV https_proxy="${HTTP_PROXY}"
# Use Bash instead of default /bin/sh
SHELL ["/bin/bash", "-c"]
# Set the working directory
WORKDIR /app
# Change pip source
RUN pip config set global.index-url "${PIP_INDEX}" && \
pip config set global.extra-index-url "${PIP_INDEX}" && \
pip install --no-cache-dir --upgrade pip packaging wheel setuptools
# Install the requirements
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application into the image
COPY . /app
# Install LLaMA Factory
RUN pip install --no-cache-dir -e ".[${EXTRAS}]" --no-build-isolation
# Rebuild flash attention
RUN if [ "${INSTALL_FLASHATTN}" == "true" ]; then \
pip uninstall -y ninja && \
pip install --no-cache-dir ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \
fi
# Set up volumes
# VOLUME [ "/root/.cache/huggingface", "/app/shared_data", "/app/output" ]
# Expose port 7860 for LLaMA Board
ENV GRADIO_SERVER_PORT=7860
EXPOSE 7860
# Expose port 8000 for API service
ENV API_PORT=8000
EXPOSE 8000
# unset proxy
ENV http_proxy=
ENV https_proxy=
# Reset pip config
RUN pip config unset global.index-url && \
pip config unset global.extra-index-url

View File

@ -0,0 +1,55 @@
# Start from the pytorch official image (ubuntu-22.04 + cuda-12.4.1 + python-3.11)
# https://hub.docker.com/r/pytorch/pytorch/tags
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel
# Define environments
ENV MAX_JOBS=16
ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS=""
ENV PIP_ROOT_USER_ACTION=ignore
# Define installation arguments
ARG APT_SOURCE=https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
ARG PIP_INDEX=https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
# Set apt source
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
{ \
echo "deb ${APT_SOURCE} jammy main restricted universe multiverse"; \
echo "deb ${APT_SOURCE} jammy-updates main restricted universe multiverse"; \
echo "deb ${APT_SOURCE} jammy-backports main restricted universe multiverse"; \
echo "deb ${APT_SOURCE} jammy-security main restricted universe multiverse"; \
} > /etc/apt/sources.list
# Install systemctl and wget
RUN apt-get update && \
apt-get install -y -o Dpkg::Options::="--force-confdef" systemd wget && \
apt-get clean
# Install git and vim
RUN apt-get update && \
apt-get install -y git vim && \
apt-get clean
# Install gcc and g++
RUN apt-get update && \
apt-get install -y gcc g++ && \
apt-get clean
# Change pip source
RUN pip config set global.index-url "${PIP_INDEX}" && \
pip config set global.extra-index-url "${PIP_INDEX}" && \
pip install --no-cache-dir --upgrade pip packaging wheel setuptools
# Install flash-attn-2.7.4.post1 (cxx11abi=False)
RUN wget -nv https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp311-cp311-linux_x86_64.whl && \
pip install --no-cache-dir flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
# Install flashinfer-0.2.2.post1+cu124 (cxx11abi=False)
RUN wget -nv https://github.com/flashinfer-ai/flashinfer/releases/download/v0.2.2.post1/flashinfer_python-0.2.2.post1+cu124torch2.6-cp38-abi3-linux_x86_64.whl && \
pip install --no-cache-dir flashinfer_python-0.2.2.post1+cu124torch2.6-cp38-abi3-linux_x86_64.whl
# Reset pip config
RUN pip config unset global.index-url && \
pip config unset global.extra-index-url

View File

@ -0,0 +1,111 @@
# Docker Setup for NVIDIA GPUs
This directory contains Docker configuration files for running LLaMA Factory with NVIDIA GPU support.
## Prerequisites
### Linux-specific Requirements
Before running the Docker container with GPU support, you need to install the following packages:
1. **Docker**: The container runtime
```bash
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install docker.io
# Or install Docker Engine from the official repository:
# https://docs.docker.com/engine/install/
```
2. **Docker Compose** (if using the docker-compose method):
```bash
# Ubuntu/Debian
sudo apt-get install docker-compose
# Or install the latest version:
# https://docs.docker.com/compose/install/
```
3. **NVIDIA Container Toolkit** (required for GPU support):
```bash
# Add the NVIDIA GPG key and repository
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
# Install nvidia-container-toolkit
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
# Restart Docker to apply changes
sudo systemctl restart docker
```
**Note**: Without `nvidia-container-toolkit`, the Docker container will not be able to access your NVIDIA GPU.
### Verify GPU Access
After installation, verify that Docker can access your GPU:
```bash
sudo docker run --rm --gpus all nvidia/cuda:12.4.0-base-ubuntu22.04 nvidia-smi
```
If successful, you should see your GPU information displayed.
## Usage
### Using Docker Compose (Recommended)
```bash
cd docker/docker-cuda/
docker compose up -d
docker compose exec llamafactory bash
```
### Using Docker Run
```bash
# Build the image
docker build -f ./docker/docker-cuda/Dockerfile \
--build-arg PIP_INDEX=https://pypi.org/simple \
--build-arg EXTRAS=metrics \
-t llamafactory:latest .
# Run the container
docker run -dit --ipc=host --gpus=all \
-p 7860:7860 \
-p 8000:8000 \
--name llamafactory \
llamafactory:latest
# Enter the container
docker exec -it llamafactory bash
```
## Troubleshooting
### GPU Not Detected
If your GPU is not detected inside the container:
1. Ensure `nvidia-container-toolkit` is installed
2. Check that the Docker daemon has been restarted after installation
3. Verify your NVIDIA drivers are properly installed: `nvidia-smi`
4. Check Docker GPU support: `docker run --rm --gpus all ubuntu nvidia-smi`
### Permission Denied
If you get permission errors, ensure your user is in the docker group:
```bash
sudo usermod -aG docker $USER
# Log out and back in for changes to take effect
```
## Additional Notes
- The default image is built on Ubuntu 22.04 (x86_64), CUDA 12.4, Python 3.11, PyTorch 2.6.0, and Flash-attn 2.7.4
- For different CUDA versions, you may need to adjust the base image in the Dockerfile
- Make sure your NVIDIA driver version is compatible with the CUDA version used in the Docker image

View File

@ -0,0 +1,25 @@
services:
llamafactory:
build:
dockerfile: ./docker/docker-cuda/Dockerfile
context: ../..
args:
PIP_INDEX: https://pypi.org/simple
EXTRAS: metrics
container_name: llamafactory
ports:
- "7860:7860"
- "8000:8000"
ipc: host
tty: true
# shm_size: "16gb" # ipc: host is set
stdin_open: true
command: bash
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: "all"
capabilities: [ gpu ]
restart: unless-stopped

View File

@ -0,0 +1,63 @@
# https://hub.docker.com/r/ascendai/cann/tags
ARG BASE_IMAGE=ascendai/cann:8.1.rc1-910b-ubuntu22.04-py3.11
FROM ${BASE_IMAGE}
# Installation arguments
ARG PIP_INDEX=https://pypi.org/simple
ARG EXTRAS=torch-npu,metrics
ARG HTTP_PROXY=""
ARG PYTORCH_INDEX=https://download.pytorch.org/whl/cpu
# Define environments
ENV MAX_JOBS=16
ENV FLASH_ATTENTION_FORCE_BUILD=TRUE
ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS=""
ENV PIP_ROOT_USER_ACTION=ignore
ENV http_proxy="${HTTP_PROXY}"
ENV https_proxy="${HTTP_PROXY}"
# Use Bash instead of default /bin/sh
SHELL ["/bin/bash", "-c"]
# Set the working directory
WORKDIR /app
# Change pip source
RUN pip config set global.index-url "${PIP_INDEX}" && \
pip config set global.extra-index-url "${PIP_INDEX}" && \
pip install --no-cache-dir --upgrade pip packaging wheel setuptools
# Install torch-npu
RUN pip uninstall -y torch torchvision torchaudio && \
pip install --no-cache-dir "torch-npu==2.5.1" "torchvision==0.20.1" --index-url "${PYTORCH_INDEX}"
# Install the requirements
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application into the image
COPY . /app
# Install LLaMA Factory
RUN pip install --no-cache-dir -e ".[${EXTRAS}]" --no-build-isolation
# Set up volumes
# VOLUME [ "/root/.cache/huggingface", "/app/shared_data", "/app/output" ]
# Expose port 7860 for LLaMA Board
ENV GRADIO_SERVER_PORT=7860
EXPOSE 7860
# Expose port 8000 for API service
ENV API_PORT=8000
EXPOSE 8000
# unset proxy
ENV http_proxy=
ENV https_proxy=
# Reset pip config
RUN pip config unset global.index-url && \
pip config unset global.extra-index-url

View File

@ -0,0 +1,28 @@
services:
llamafactory:
build:
dockerfile: ./docker/docker-npu/Dockerfile
context: ../..
args:
PIP_INDEX: https://pypi.org/simple
EXTRAS: torch-npu,metrics
container_name: llamafactory
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver:/usr/local/Ascend/driver
- /etc/ascend_install.info:/etc/ascend_install.info
ports:
- "7860:7860"
- "8000:8000"
ipc: host
tty: true
# shm_size: "16gb" # ipc: host is set
stdin_open: true
command: bash
devices:
- /dev/davinci0
- /dev/davinci_manager
- /dev/devmm_svm
- /dev/hisi_hdc
restart: unless-stopped

View File

@ -0,0 +1,71 @@
# https://hub.docker.com/r/rocm/pytorch/tags
ARG BASE_IMAGE=rocm/pytorch:rocm6.4.1_ubuntu22.04_py3.10_pytorch_release_2.6.0
FROM ${BASE_IMAGE}
# Installation arguments
ARG PIP_INDEX=https://pypi.org/simple
ARG EXTRAS=metrics
ARG INSTALL_FLASHATTN=false
ARG HTTP_PROXY=""
ARG PYTORCH_INDEX=https://download.pytorch.org/whl/rocm6.3
# Define environments
ENV MAX_JOBS=16
ENV FLASH_ATTENTION_FORCE_BUILD=TRUE
ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS=""
ENV PIP_ROOT_USER_ACTION=ignore
ENV http_proxy="${HTTP_PROXY}"
ENV https_proxy="${HTTP_PROXY}"
# Use Bash instead of default /bin/sh
SHELL ["/bin/bash", "-c"]
# Set the working directory
WORKDIR /app
# Change pip source
RUN pip config set global.index-url "${PIP_INDEX}" && \
pip config set global.extra-index-url "${PIP_INDEX}" && \
pip install --no-cache-dir --upgrade pip packaging wheel setuptools
# Reinstall pytorch rocm
RUN pip uninstall -y torch torchvision torchaudio && \
pip install --no-cache-dir --pre torch torchvision torchaudio --index-url "${PYTORCH_INDEX}"
# Install the requirements
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application into the image
COPY . /app
# Install LLaMA Factory
RUN pip install --no-cache-dir -e ".[${EXTRAS}]" --no-build-isolation
# Rebuild flash attention
RUN if [ "${INSTALL_FLASHATTN}" == "true" ]; then \
pip uninstall -y ninja && \
pip install --no-cache-dir ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \
fi
# Set up volumes
# VOLUME [ "/root/.cache/huggingface", "/app/shared_data", "/app/output" ]
# Expose port 7860 for LLaMA Board
ENV GRADIO_SERVER_PORT=7860
EXPOSE 7860
# Expose port 8000 for API service
ENV API_PORT=8000
EXPOSE 8000
# unset proxy
ENV http_proxy=
ENV https_proxy=
# Reset pip config
RUN pip config unset global.index-url && \
pip config unset global.extra-index-url

View File

@ -0,0 +1,21 @@
services:
llamafactory:
build:
dockerfile: ./docker/docker-rocm/Dockerfile
context: ../..
args:
PIP_INDEX: https://pypi.org/simple
EXTRAS: metrics
container_name: llamafactory
ports:
- "7860:7860"
- "8000:8000"
ipc: host
tty: true
# shm_size: "16gb" # ipc: host is set
stdin_open: true
command: bash
devices:
- /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri
restart: unless-stopped

View File

@ -1,3 +1,4 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -11,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import datasets
@ -19,15 +21,16 @@ import pandas as pd
_CITATION = """\
@article{huang2023ceval,
title={C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Models},
author={Huang, Yuzhen and Bai, Yuzhuo and Zhu, Zhihao and Zhang, Junlei and Zhang, Jinghan and Su, Tangjun and Liu, Junteng and Lv, Chuancheng and Zhang, Yikai and Lei, Jiayi and Fu, Yao and Sun, Maosong and He, Junxian},
title={C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Models},
author={Huang, Yuzhen and Bai, Yuzhuo and Zhu, Zhihao and others},
journal={arXiv preprint arXiv:2305.08322},
year={2023}
}
"""
_DESCRIPTION = """\
C-Eval is a comprehensive Chinese evaluation suite for foundation models. It consists of 13948 multi-choice questions spanning 52 diverse disciplines and four difficulty levels.
C-Eval is a comprehensive Chinese evaluation suite for foundation models.
It consists of 13948 multi-choice questions spanning 52 diverse disciplines and four difficulty levels.
"""
_HOMEPAGE = "https://cevalbenchmark.com"
@ -133,25 +136,19 @@ class Ceval(datasets.GeneratorBasedBuilder):
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"filepath": os.path.join(
data_dir, "test", f"{task_name}_test.csv"
),
"filepath": os.path.join(data_dir, "test", f"{task_name}_test.csv"),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"filepath": os.path.join(
data_dir, "val", f"{task_name}_val.csv"
),
"filepath": os.path.join(data_dir, "val", f"{task_name}_val.csv"),
},
),
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": os.path.join(
data_dir, "dev", f"{task_name}_dev.csv"
),
"filepath": os.path.join(data_dir, "dev", f"{task_name}_dev.csv"),
},
),
]

View File

@ -207,4 +207,4 @@
"name": "兽医学",
"category": "STEM"
}
}
}

View File

@ -1,3 +1,4 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -11,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import datasets
@ -20,14 +22,15 @@ import pandas as pd
_CITATION = """\
@article{li2023cmmlu,
title={CMMLU: Measuring massive multitask language understanding in Chinese},
author={Haonan Li and Yixuan Zhang and Fajri Koto and Yifei Yang and Hai Zhao and Yeyun Gong and Nan Duan and Timothy Baldwin},
author={Haonan Li and Yixuan Zhang and Fajri Koto and Yifei Yang and others,
journal={arXiv preprint arXiv:2306.09212},
year={2023}
}
"""
_DESCRIPTION = """\
CMMLU is a comprehensive Chinese assessment suite specifically designed to evaluate the advanced knowledge and reasoning abilities of LLMs within the Chinese language and cultural context.
CMMLU is a comprehensive Chinese assessment suite specifically designed to evaluate the advanced knowledge
and reasoning abilities of LLMs within the Chinese language and cultural context.
"""
_HOMEPAGE = "https://github.com/haonan-li/CMMLU"
@ -37,73 +40,73 @@ _LICENSE = "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Internatio
_URL = "cmmlu.zip"
task_list = [
'agronomy',
'anatomy',
'ancient_chinese',
'arts',
'astronomy',
'business_ethics',
'chinese_civil_service_exam',
'chinese_driving_rule',
'chinese_food_culture',
'chinese_foreign_policy',
'chinese_history',
'chinese_literature',
'chinese_teacher_qualification',
'clinical_knowledge',
'college_actuarial_science',
'college_education',
'college_engineering_hydrology',
'college_law',
'college_mathematics',
'college_medical_statistics',
'college_medicine',
'computer_science',
'computer_security',
'conceptual_physics',
'construction_project_management',
'economics',
'education',
'electrical_engineering',
'elementary_chinese',
'elementary_commonsense',
'elementary_information_and_technology',
'elementary_mathematics',
'ethnology',
'food_science',
'genetics',
'global_facts',
'high_school_biology',
'high_school_chemistry',
'high_school_geography',
'high_school_mathematics',
'high_school_physics',
'high_school_politics',
'human_sexuality',
'international_law',
'journalism',
'jurisprudence',
'legal_and_moral_basis',
'logical',
'machine_learning',
'management',
'marketing',
'marxist_theory',
'modern_chinese',
'nutrition',
'philosophy',
'professional_accounting',
'professional_law',
'professional_medicine',
'professional_psychology',
'public_relations',
'security_study',
'sociology',
'sports_science',
'traditional_chinese_medicine',
'virology',
'world_history',
'world_religions',
"agronomy",
"anatomy",
"ancient_chinese",
"arts",
"astronomy",
"business_ethics",
"chinese_civil_service_exam",
"chinese_driving_rule",
"chinese_food_culture",
"chinese_foreign_policy",
"chinese_history",
"chinese_literature",
"chinese_teacher_qualification",
"clinical_knowledge",
"college_actuarial_science",
"college_education",
"college_engineering_hydrology",
"college_law",
"college_mathematics",
"college_medical_statistics",
"college_medicine",
"computer_science",
"computer_security",
"conceptual_physics",
"construction_project_management",
"economics",
"education",
"electrical_engineering",
"elementary_chinese",
"elementary_commonsense",
"elementary_information_and_technology",
"elementary_mathematics",
"ethnology",
"food_science",
"genetics",
"global_facts",
"high_school_biology",
"high_school_chemistry",
"high_school_geography",
"high_school_mathematics",
"high_school_physics",
"high_school_politics",
"human_sexuality",
"international_law",
"journalism",
"jurisprudence",
"legal_and_moral_basis",
"logical",
"machine_learning",
"management",
"marketing",
"marxist_theory",
"modern_chinese",
"nutrition",
"philosophy",
"professional_accounting",
"professional_law",
"professional_medicine",
"professional_psychology",
"public_relations",
"security_study",
"sociology",
"sports_science",
"traditional_chinese_medicine",
"virology",
"world_history",
"world_religions",
]

View File

@ -267,4 +267,4 @@
"name": "世界宗教",
"category": "Humanities"
}
}
}

View File

@ -227,4 +227,4 @@
"name": "world religions",
"category": "Humanities"
}
}
}

View File

@ -1,3 +1,4 @@
# Copyright 2025 the LlamaFactory team.
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -11,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import datasets
@ -20,14 +22,15 @@ import pandas as pd
_CITATION = """\
@article{hendryckstest2021,
title={Measuring Massive Multitask Language Understanding},
author={Dan Hendrycks and Collin Burns and Steven Basart and Andy Zou and Mantas Mazeika and Dawn Song and Jacob Steinhardt},
author={Dan Hendrycks and Collin Burns and others},
journal={Proceedings of the International Conference on Learning Representations (ICLR)},
year={2021}
}
"""
_DESCRIPTION = """\
Measuring Massive Multitask Language Understanding by Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt (ICLR 2021).
Measuring Massive Multitask Language Understanding by Dan Hendrycks, Collin Burns, Steven Basart,
Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt (ICLR 2021).
"""
_HOMEPAGE = "https://github.com/hendrycks/test"
@ -136,32 +139,25 @@ class MMLU(datasets.GeneratorBasedBuilder):
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"filepath": os.path.join(
data_dir, "data", "test", f"{task_name}_test.csv"
),
"filepath": os.path.join(data_dir, "data", "test", f"{task_name}_test.csv"),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"filepath": os.path.join(
data_dir, "data", "val", f"{task_name}_val.csv"
),
"filepath": os.path.join(data_dir, "data", "val", f"{task_name}_val.csv"),
},
),
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": os.path.join(
data_dir, "data", "dev", f"{task_name}_dev.csv"
),
"filepath": os.path.join(data_dir, "data", "dev", f"{task_name}_dev.csv"),
},
),
]
def _generate_examples(self, filepath):
df = pd.read_csv(filepath)
df = pd.read_csv(filepath, header=None)
df.columns = ["question", "A", "B", "C", "D", "answer"]
for i, instance in enumerate(df.to_dict(orient="records")):
yield i, instance
yield from enumerate(df.to_dict(orient="records"))

View File

@ -1,50 +1,292 @@
We provide diverse examples about fine-tuning LLMs.
Make sure to execute these commands in the `LLaMA-Factory` directory.
## Table of Contents
- [LoRA Fine-Tuning](#lora-fine-tuning)
- [QLoRA Fine-Tuning](#qlora-fine-tuning)
- [Full-Parameter Fine-Tuning](#full-parameter-fine-tuning)
- [Merging LoRA Adapters and Quantization](#merging-lora-adapters-and-quantization)
- [Inferring LoRA Fine-Tuned Models](#inferring-lora-fine-tuned-models)
- [Extras](#extras)
Use `CUDA_VISIBLE_DEVICES` (GPU) or `ASCEND_RT_VISIBLE_DEVICES` (NPU) to choose computing devices.
By default, LLaMA-Factory uses all visible computing devices.
Basic usage:
```bash
llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
examples/
├── lora_single_gpu/
│ ├── pretrain.sh: Do continuous pre-training using LoRA
│ ├── sft.sh: Do supervised fine-tuning using LoRA
│ ├── reward.sh: Do reward modeling using LoRA
│ ├── ppo.sh: Do PPO training using LoRA
│ ├── dpo.sh: Do DPO training using LoRA
│ ├── orpo.sh: Do ORPO training using LoRA
│ ├── sft_mllm.sh: Do supervised fine-tuning on multimodal data using LoRA
│ ├── prepare.sh: Save tokenized dataset
│ └── predict.sh: Do batch predict and compute BLEU and ROUGE scores after LoRA tuning
├── qlora_single_gpu/
│ ├── bitsandbytes.sh: Fine-tune 4/8-bit BNB models using QLoRA
│ ├── gptq.sh: Fine-tune 4/8-bit GPTQ models using QLoRA
│ ├── awq.sh: Fine-tune 4-bit AWQ models using QLoRA
│ └── aqlm.sh: Fine-tune 2-bit AQLM models using QLoRA
├── lora_multi_gpu/
│ ├── single_node.sh: Fine-tune model with Accelerate on single node using LoRA
│ ├── multi_node.sh: Fine-tune model with Accelerate on multiple nodes using LoRA
│ └── ds_zero3.sh: Fine-tune model with DeepSpeed ZeRO-3 using LoRA (weight sharding)
├── full_multi_gpu/
│ ├── single_node.sh: Full fine-tune model with DeepSpeed on single node
│ ├── multi_node.sh: Full fine-tune model with DeepSpeed on multiple nodes
│ └── predict.sh: Do parallel batch predict and compute BLEU and ROUGE scores after full tuning
├── merge_lora/
│ ├── merge.sh: Merge LoRA weights into the pre-trained models
│ └── quantize.sh: Quantize the fine-tuned model with AutoGPTQ
├── inference/
│ ├── cli_demo.sh: Chat with fine-tuned model in the CLI with LoRA adapters
│ ├── api_demo.sh: Chat with fine-tuned model in an OpenAI-style API with LoRA adapters
│ ├── web_demo.sh: Chat with fine-tuned model in the Web browser with LoRA adapters
│ └── evaluate.sh: Evaluate model on the MMLU/CMMLU/C-Eval benchmarks with LoRA adapters
└── extras/
├── galore/
│ └── sft.sh: Fine-tune model with GaLore
├── badam/
│ └── sft.sh: Fine-tune model with BAdam
├── loraplus/
│ └── sft.sh: Fine-tune model using LoRA+
├── mod/
│ └── sft.sh: Fine-tune model using Mixture-of-Depths
├── llama_pro/
│ ├── expand.sh: Expand layers in the model
│ └── sft.sh: Fine-tune the expanded model
└── fsdp_qlora/
└── sft.sh: Fine-tune quantized model with FSDP+QLoRA
Advanced usage:
```bash
CUDA_VISIBLE_DEVICES=0,1 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml \
learning_rate=1e-5 \
logging_steps=1
```
```bash
bash examples/train_lora/llama3_lora_sft.sh
```
## Examples
### LoRA Fine-Tuning
#### (Continuous) Pre-Training
```bash
llamafactory-cli train examples/train_lora/llama3_lora_pretrain.yaml
```
#### Supervised Fine-Tuning
```bash
llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
#### Multimodal Supervised Fine-Tuning
```bash
llamafactory-cli train examples/train_lora/qwen2_5vl_lora_sft.yaml
```
#### DPO/ORPO/SimPO Training
```bash
llamafactory-cli train examples/train_lora/llama3_lora_dpo.yaml
```
#### Multimodal DPO/ORPO/SimPO Training
```bash
llamafactory-cli train examples/train_lora/qwen2_5vl_lora_dpo.yaml
```
#### Reward Modeling
```bash
llamafactory-cli train examples/train_lora/llama3_lora_reward.yaml
```
#### PPO Training
```bash
llamafactory-cli train examples/train_lora/llama3_lora_ppo.yaml
```
#### KTO Training
```bash
llamafactory-cli train examples/train_lora/llama3_lora_kto.yaml
```
#### Preprocess Dataset
It is useful for large dataset, use `tokenized_path` in config to load the preprocessed dataset.
```bash
llamafactory-cli train examples/train_lora/llama3_preprocess.yaml
```
#### Evaluating on MMLU/CMMLU/C-Eval Benchmarks
```bash
llamafactory-cli eval examples/train_lora/llama3_lora_eval.yaml
```
#### Supervised Fine-Tuning on Multiple Nodes
```bash
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=0 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=1 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
#### Supervised Fine-Tuning with DeepSpeed ZeRO-3 (Weight Sharding)
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ds3.yaml
```
#### Supervised Fine-Tuning with Ray on 4 GPUs
```bash
USE_RAY=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ray.yaml
```
### QLoRA Fine-Tuning
#### Supervised Fine-Tuning with 4/8-bit Bitsandbytes/HQQ/EETQ Quantization (Recommended)
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_otfq.yaml
```
#### Supervised Fine-Tuning with 4-bit Bitsandbytes Quantization on Ascend NPU
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_bnb_npu.yaml
```
#### Supervised Fine-Tuning with 4/8-bit GPTQ Quantization
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_gptq.yaml
```
#### Supervised Fine-Tuning with 4-bit AWQ Quantization
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_awq.yaml
```
#### Supervised Fine-Tuning with 2-bit AQLM Quantization
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_aqlm.yaml
```
### Full-Parameter Fine-Tuning
#### Supervised Fine-Tuning on Single Node
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
#### Supervised Fine-Tuning on Multiple Nodes
```bash
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=0 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=1 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
### Elastic and Fault-Tolerant Supervised Fine-Tuning on Multiple Nodes
To launch an elastic job with `MAX_RESTARTS` failures retries, run the following on at least `MIN_NNODES` nodes and at most `MAX_NNODES` nodes. `RDZV_ID` should be set as a unique job id (shared by all nodes participating in the job). See also [torchrun](https://docs.pytorch.org/docs/stable/elastic/run.html).
```bash
FORCE_TORCHRUN=1 MIN_NNODES=1 MAX_NNODES=3 MAX_RESTARTS=3 RDZV_ID=llamafactory MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
#### Multimodal Supervised Fine-Tuning
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_full/qwen2_5vl_full_sft.yaml
```
### Merging LoRA Adapters and Quantization
#### Merge LoRA Adapters
Note: DO NOT use quantized model or `quantization_bit` when merging LoRA adapters.
```bash
llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml
```
#### Quantizing Model using AutoGPTQ
```bash
llamafactory-cli export examples/merge_lora/llama3_gptq.yaml
```
### Save Ollama modelfile
```bash
llamafactory-cli export examples/merge_lora/llama3_full_sft.yaml
```
### Inferring LoRA Fine-Tuned Models
#### Evaluation using vLLM's Multi-GPU Inference
```
python scripts/vllm_infer.py --model_name_or_path meta-llama/Meta-Llama-3-8B-Instruct --template llama3 --dataset alpaca_en_demo
python scripts/eval_bleu_rouge.py generated_predictions.jsonl
```
#### Use CLI ChatBox
```bash
llamafactory-cli chat examples/inference/llama3_lora_sft.yaml
```
#### Use Web UI ChatBox
```bash
llamafactory-cli webchat examples/inference/llama3_lora_sft.yaml
```
#### Launch OpenAI-style API
```bash
llamafactory-cli api examples/inference/llama3_lora_sft.yaml
```
### Extras
#### Full-Parameter Fine-Tuning using GaLore
```bash
llamafactory-cli train examples/extras/galore/llama3_full_sft.yaml
```
#### Full-Parameter Fine-Tuning using APOLLO
```bash
llamafactory-cli train examples/extras/apollo/llama3_full_sft.yaml
```
#### Full-Parameter Fine-Tuning using BAdam
```bash
llamafactory-cli train examples/extras/badam/llama3_full_sft.yaml
```
#### Full-Parameter Fine-Tuning using Adam-mini
```bash
llamafactory-cli train examples/extras/adam_mini/qwen2_full_sft.yaml
```
#### Full-Parameter Fine-Tuning using Muon
```bash
llamafactory-cli train examples/extras/muon/qwen2_full_sft.yaml
```
#### LoRA+ Fine-Tuning
```bash
llamafactory-cli train examples/extras/loraplus/llama3_lora_sft.yaml
```
#### PiSSA Fine-Tuning
```bash
llamafactory-cli train examples/extras/pissa/llama3_lora_sft.yaml
```
#### Mixture-of-Depths Fine-Tuning
```bash
llamafactory-cli train examples/extras/mod/llama3_full_sft.yaml
```
#### LLaMA-Pro Fine-Tuning
```bash
bash examples/extras/llama_pro/expand.sh
llamafactory-cli train examples/extras/llama_pro/llama3_freeze_sft.yaml
```
#### FSDP+QLoRA Fine-Tuning
```bash
bash examples/extras/fsdp_qlora/train.sh
```

View File

@ -1,50 +1,292 @@
我们提供了多样化的大模型微调示例脚本。
请确保在 `LLaMA-Factory` 目录下执行下述命令。
## 目录
- [LoRA 微调](#lora-微调)
- [QLoRA 微调](#qlora-微调)
- [全参数微调](#全参数微调)
- [合并 LoRA 适配器与模型量化](#合并-lora-适配器与模型量化)
- [推理 LoRA 模型](#推理-lora-模型)
- [杂项](#杂项)
使用 `CUDA_VISIBLE_DEVICES`GPU`ASCEND_RT_VISIBLE_DEVICES`NPU选择计算设备。
LLaMA-Factory 默认使用所有可见的计算设备。
基础用法:
```bash
llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
examples/
├── lora_single_gpu/
│ ├── pretrain.sh: 基于 LoRA 进行增量预训练
│ ├── sft.sh: 基于 LoRA 进行指令监督微调
│ ├── reward.sh: 基于 LoRA 进行奖励模型训练
│ ├── ppo.sh: 基于 LoRA 进行 PPO 训练
│ ├── dpo.sh: 基于 LoRA 进行 DPO 训练
│ ├── orpo.sh: 基于 LoRA 进行 ORPO 训练
│ ├── sft_mllm.sh: 基于 LoRA 进行多模态指令监督微调
│ ├── prepare.sh: 保存预处理后的数据集
│ └── predict.sh: 基于 LoRA 进行批量预测并计算 BLEU 和 ROUGE 分数
├── qlora_single_gpu/
│ ├── bitsandbytes.sh: 基于 QLoRA 微调 4/8 比特 BNB 模型
│ ├── gptq.sh: 基于 QLoRA 微调 4/8 比特 GPTQ 模型
│ ├── awq.sh: 基于 QLoRA 微调 4 比特 AWQ 模型
│ └── aqlm.sh: 基于 QLoRA 微调 2 比特 AQLM 模型
├── lora_multi_gpu/
│ ├── single_node.sh: 使用 Accelerate 进行单节点 LoRA 训练
│ ├── multi_node.sh: 使用 Accelerate 进行多节点 LoRA 训练
│ └── ds_zero3.sh: 使用 DeepSpeed ZeRO-3 进行 LoRA 训练(拆分权重)
├── full_multi_gpu/
│ ├── single_node.sh: 使用 DeepSpeed 进行单节点全量训练
│ ├── multi_node.sh: 使用 DeepSpeed 进行多节点全量训练
│ └── predict.sh: 基于全量训练进行多卡批量预测并计算 BLEU 和 ROUGE 分数
├── merge_lora/
│ ├── merge.sh: 将 LoRA 权重合并到预训练模型中
│ └── quantize.sh: 使用 AutoGPTQ 量化微调后的模型
├── inference/
│ ├── cli_demo.sh: 启动 LoRA 模型的命令行推理接口
│ ├── api_demo.sh: 启动 LoRA 模型的 OpenAI 风格 API
│ ├── web_demo.sh: 启动 LoRA 模型的浏览器推理接口
│ └── evaluate.sh: 在 MMLU/CMMLU/C-Eval 数据集上评测 LoRA 模型
└── extras/
├── galore/
│ └── sft.sh: 使用 GaLore 训练模型
├── badam/
│ └── sft.sh: 使用 BAdam 训练模型
├── loraplus/
│ └── sft.sh: 使用 LoRA+ 训练模型
├── mod/
│ └── sft.sh: 使用深度混合训练模型
├── llama_pro/
│ ├── expand.sh: 扩展模型中的层
│ └── sft.sh: 训练扩展后的模型
└── fsdp_qlora/
└── sft.sh: 使用 FSDP+QLoRA 微调量化模型
高级用法:
```bash
CUDA_VISIBLE_DEVICES=0,1 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml \
learning_rate=1e-5 \
logging_steps=1
```
```bash
bash examples/train_lora/llama3_lora_sft.sh
```
## 示例
### LoRA 微调
#### (增量)预训练
```bash
llamafactory-cli train examples/train_lora/llama3_lora_pretrain.yaml
```
#### 指令监督微调
```bash
llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
#### 多模态指令监督微调
```bash
llamafactory-cli train examples/train_lora/qwen2_5vl_lora_sft.yaml
```
#### DPO/ORPO/SimPO 训练
```bash
llamafactory-cli train examples/train_lora/llama3_lora_dpo.yaml
```
#### 多模态 DPO/ORPO/SimPO 训练
```bash
llamafactory-cli train examples/train_lora/qwen2_5vl_lora_dpo.yaml
```
#### 奖励模型训练
```bash
llamafactory-cli train examples/train_lora/llama3_lora_reward.yaml
```
#### PPO 训练
```bash
llamafactory-cli train examples/train_lora/llama3_lora_ppo.yaml
```
#### KTO 训练
```bash
llamafactory-cli train examples/train_lora/llama3_lora_kto.yaml
```
#### 预处理数据集
对于大数据集有帮助,在配置中使用 `tokenized_path` 以加载预处理后的数据集。
```bash
llamafactory-cli train examples/train_lora/llama3_preprocess.yaml
```
#### 在 MMLU/CMMLU/C-Eval 上评估
```bash
llamafactory-cli eval examples/train_lora/llama3_lora_eval.yaml
```
#### 多机指令监督微调
```bash
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=0 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=1 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
### 支持弹性和容错的多机指令监督微调
要启动一个支持弹性节点和容错的多机指令微调,在每个节点上执行以下命令。弹性节点数量范围为 `MIN_NNODES:MAX_NNODES`,每个节点最多允许因为错误重启 `MAX_RESTARTS` 次。`RDZV_ID` 应设置为一个唯一的作业 ID由参与该作业的所有节点共享。更多新可以参考官方文档 [torchrun](https://docs.pytorch.org/docs/stable/elastic/run.html)。
```bash
FORCE_TORCHRUN=1 MIN_NNODES=1 MAX_NNODES=3 MAX_RESTARTS=3 RDZV_ID=llamafactory MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
#### 使用 DeepSpeed ZeRO-3 平均分配显存
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ds3.yaml
```
#### 使用 Ray 在 4 张 GPU 上微调
```bash
USE_RAY=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ray.yaml
```
### QLoRA 微调
#### 基于 4/8 比特 Bitsandbytes/HQQ/EETQ 量化进行指令监督微调(推荐)
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_otfq.yaml
```
#### 在 NPU 上基于 4 比特 Bitsandbytes 量化进行指令监督微调
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_bnb_npu.yaml
```
#### 基于 4/8 比特 GPTQ 量化进行指令监督微调
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_gptq.yaml
```
#### 基于 4 比特 AWQ 量化进行指令监督微调
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_awq.yaml
```
#### 基于 2 比特 AQLM 量化进行指令监督微调
```bash
llamafactory-cli train examples/train_qlora/llama3_lora_sft_aqlm.yaml
```
### 全参数微调
#### 在单机上进行指令监督微调
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
#### 在多机上进行指令监督微调
```bash
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=0 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
FORCE_TORCHRUN=1 NNODES=2 NODE_RANK=1 MASTER_ADDR=192.168.0.1 MASTER_PORT=29500 llamafactory-cli train examples/train_full/llama3_full_sft.yaml
```
#### 多模态指令监督微调
```bash
FORCE_TORCHRUN=1 llamafactory-cli train examples/train_full/qwen2_5vl_full_sft.yaml
```
### 合并 LoRA 适配器与模型量化
#### 合并 LoRA 适配器
注:请勿使用量化后的模型或 `quantization_bit` 参数来合并 LoRA 适配器。
```bash
llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml
```
#### 使用 AutoGPTQ 量化模型
```bash
llamafactory-cli export examples/merge_lora/llama3_gptq.yaml
```
### 保存 Ollama 配置文件
```bash
llamafactory-cli export examples/merge_lora/llama3_full_sft.yaml
```
### 推理 LoRA 模型
#### 使用 vLLM 多卡推理评估
```
python scripts/vllm_infer.py --model_name_or_path meta-llama/Meta-Llama-3-8B-Instruct --template llama3 --dataset alpaca_en_demo
python scripts/eval_bleu_rouge.py generated_predictions.jsonl
```
#### 使用命令行对话框
```bash
llamafactory-cli chat examples/inference/llama3_lora_sft.yaml
```
#### 使用浏览器对话框
```bash
llamafactory-cli webchat examples/inference/llama3_lora_sft.yaml
```
#### 启动 OpenAI 风格 API
```bash
llamafactory-cli api examples/inference/llama3_lora_sft.yaml
```
### 杂项
#### 使用 GaLore 进行全参数训练
```bash
llamafactory-cli train examples/extras/galore/llama3_full_sft.yaml
```
#### 使用 APOLLO 进行全参数训练
```bash
llamafactory-cli train examples/extras/apollo/llama3_full_sft.yaml
```
#### 使用 BAdam 进行全参数训练
```bash
llamafactory-cli train examples/extras/badam/llama3_full_sft.yaml
```
#### 使用 Adam-mini 进行全参数训练
```bash
llamafactory-cli train examples/extras/adam_mini/qwen2_full_sft.yaml
```
#### 使用 Muon 进行全参数训练
```bash
llamafactory-cli train examples/extras/muon/qwen2_full_sft.yaml
```
#### LoRA+ 微调
```bash
llamafactory-cli train examples/extras/loraplus/llama3_lora_sft.yaml
```
#### PiSSA 微调
```bash
llamafactory-cli train examples/extras/pissa/llama3_lora_sft.yaml
```
#### 深度混合微调
```bash
llamafactory-cli train examples/extras/mod/llama3_full_sft.yaml
```
#### LLaMA-Pro 微调
```bash
bash examples/extras/llama_pro/expand.sh
llamafactory-cli train examples/extras/llama_pro/llama3_freeze_sft.yaml
```
#### FSDP+QLoRA 微调
```bash
bash examples/extras/fsdp_qlora/train.sh
```

View File

@ -5,18 +5,18 @@ downcast_bf16: 'no'
fsdp_config:
fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
fsdp_backward_prefetch: BACKWARD_PRE
fsdp_cpu_ram_efficient_loading: true
fsdp_forward_prefetch: false
fsdp_offload_params: true
fsdp_cpu_ram_efficient_loading: true
fsdp_offload_params: false
fsdp_sharding_strategy: FULL_SHARD
fsdp_state_dict_type: FULL_STATE_DICT
fsdp_sync_module_states: true
fsdp_use_orig_params: false
fsdp_use_orig_params: true
machine_rank: 0
main_training_function: main
mixed_precision: fp16
num_machines: 1 # the number of nodes
num_processes: 2 # the number of GPUs in all nodes
mixed_precision: bf16 # or fp16
num_machines: 1 # the number of nodes
num_processes: 2 # the number of GPUs in all nodes
rdzv_backend: static
same_network: true
tpu_env: []

View File

@ -0,0 +1,25 @@
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: FSDP
downcast_bf16: 'no'
fsdp_config:
fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
fsdp_backward_prefetch: BACKWARD_PRE
fsdp_forward_prefetch: false
fsdp_cpu_ram_efficient_loading: true
fsdp_offload_params: true # offload may affect training speed
fsdp_sharding_strategy: FULL_SHARD
fsdp_state_dict_type: FULL_STATE_DICT
fsdp_sync_module_states: true
fsdp_use_orig_params: true
machine_rank: 0
main_training_function: main
mixed_precision: bf16 # or fp16
num_machines: 1 # the number of nodes
num_processes: 2 # the number of GPUs in all nodes
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

View File

@ -1,18 +0,0 @@
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: MULTI_GPU
downcast_bf16: 'no'
gpu_ids: all
machine_rank: 0
main_process_ip: 192.168.0.1
main_process_port: 29555
main_training_function: main
mixed_precision: fp16
num_machines: 2 # the number of nodes
num_processes: 8 # the number of GPUs in all nodes
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

View File

@ -1,16 +0,0 @@
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: MULTI_GPU
downcast_bf16: 'no'
gpu_ids: all
machine_rank: 0
main_training_function: main
mixed_precision: fp16
num_machines: 1 # the number of nodes
num_processes: 4 # the number of GPUs in all nodes
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

View File

@ -1,18 +0,0 @@
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: MULTI_GPU
downcast_bf16: 'no'
gpu_ids: all
machine_rank: 1
main_process_ip: 192.168.0.1
main_process_port: 29555
main_training_function: main
mixed_precision: fp16
num_machines: 2 # the number of nodes
num_processes: 8 # the number of GPUs in all nodes
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

View File

@ -0,0 +1,28 @@
{
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto",
"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"zero_allow_untested_optimizer": true,
"fp16": {
"enabled": "auto",
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"bf16": {
"enabled": "auto"
},
"zero_optimization": {
"stage": 0,
"allgather_partitions": true,
"allgather_bucket_size": 5e8,
"overlap_comm": false,
"reduce_scatter": true,
"reduce_bucket_size": 5e8,
"contiguous_gradients": true,
"round_robin_gradients": true
}
}

View File

@ -19,10 +19,10 @@
"stage": 2,
"allgather_partitions": true,
"allgather_bucket_size": 5e8,
"overlap_comm": true,
"overlap_comm": false,
"reduce_scatter": true,
"reduce_bucket_size": 5e8,
"contiguous_gradients": true,
"round_robin_gradients": true
}
}
}

View File

@ -23,10 +23,10 @@
},
"allgather_partitions": true,
"allgather_bucket_size": 5e8,
"overlap_comm": true,
"overlap_comm": false,
"reduce_scatter": true,
"reduce_bucket_size": 5e8,
"contiguous_gradients": true,
"round_robin_gradients": true
}
}
}

View File

@ -17,7 +17,7 @@
},
"zero_optimization": {
"stage": 3,
"overlap_comm": true,
"overlap_comm": false,
"contiguous_gradients": true,
"sub_group_size": 1e9,
"reduce_bucket_size": "auto",
@ -27,4 +27,4 @@
"stage3_max_reuse_distance": 1e9,
"stage3_gather_16bit_weights_on_model_save": true
}
}
}

View File

@ -25,7 +25,7 @@
"device": "cpu",
"pin_memory": true
},
"overlap_comm": true,
"overlap_comm": false,
"contiguous_gradients": true,
"sub_group_size": 1e9,
"reduce_bucket_size": "auto",
@ -35,4 +35,4 @@
"stage3_max_reuse_distance": 1e9,
"stage3_gather_16bit_weights_on_model_save": true
}
}
}

View File

@ -0,0 +1,43 @@
### model
model_name_or_path: Qwen/Qwen2-1.5B-Instruct
trust_remote_code: true
### method
stage: sft
do_train: true
finetuning_type: full
use_adam_mini: true
### dataset
dataset: identity,alpaca_en_demo
template: qwen
cutoff_len: 2048
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 16
dataloader_num_workers: 4
### output
output_dir: saves/qwen2-1_5b/full/sft
logging_steps: 10
save_steps: 500
plot_loss: true
overwrite_output_dir: true
save_only_model: false
report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
learning_rate: 1.0e-5
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000
### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500

View File

@ -0,0 +1,48 @@
### model
model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
trust_remote_code: true
### method
stage: sft
do_train: true
finetuning_type: full
use_apollo: true
apollo_layerwise: true # choices: [true, false], use false for DDP training
apollo_target: all
apollo_rank: 128
apollo_scale: 32.0
apollo_scale_type: channel
### dataset
dataset: identity,alpaca_en_demo
template: llama3
cutoff_len: 2048
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 16
dataloader_num_workers: 4
### output
output_dir: saves/llama3-8b/full/sft
logging_steps: 10
save_steps: 500
plot_loss: true
overwrite_output_dir: true
save_only_model: false
report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 1 # use 1 for layerwise apollo
learning_rate: 1.0e-5
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
pure_bf16: true
ddp_timeout: 180000000
### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500

View File

@ -0,0 +1,46 @@
### model
model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
trust_remote_code: true
### method
stage: sft
do_train: true
finetuning_type: full
use_badam: true
badam_mode: layer
badam_switch_mode: ascending
badam_switch_interval: 50
badam_verbose: 2
# deepspeed: examples/deepspeed/ds_z3_config.json
### dataset
dataset: identity,alpaca_en_demo
template: llama3
cutoff_len: 2048
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 16
dataloader_num_workers: 4
### output
output_dir: saves/llama3-8b/full/sft
logging_steps: 10
save_steps: 500
plot_loss: true
overwrite_output_dir: true
save_only_model: false
report_to: none # choices: [none, wandb, tensorboard, swanlab, mlflow]
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
learning_rate: 1.0e-5
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500

Some files were not shown because too many files have changed in this diff Show More