Update README.md
https://www.modelscope.cn/models/jsxyhelu2024/build_4_comptetion/file/view/master?fileName=README.md&status=1 1、微调脚本
pip install ms-swift[llm]
CUDA_VISIBLE_DEVICES=0 swift sft –model_type qwen2-7b-instruct –sft_type lora –output_dir output –dataset classical-chinese-translate –num_train_epochs 1 –max_length 1024 –check_dataset_strategy warning –lora_rank 8 –lora_alpha 32 –lora_dropout_p 0.05 –lora_target_modules ALL –gradient_checkpointing true –batch_size 1 –learning_rate 5e-5 –gradient_accumulation_steps 16 –max_grad_norm 1.0 –warmup_ratio 0.03 –eval_steps 100 –save_steps 100 –save_total_limit 2 –logging_steps 10
实验环境和占用显存
2、推理脚本
swift infer –ckpt_dir /mnt/workspace/swift/output/qwen2-7b-instruct/v0-20240904-093453/checkpoint-411
3、推理效果
a、如何使用咖喱做菜? b、一个直角三角形,两个直角边分别长3厘米和4厘米,问第三个边长多少? c、中国的首都是哪里?
4、数据集介绍 “古文翻译腔数据集” https://www.modelscope.cn/datasets/swift/classical_chinese_translate/dataPeview
一个GitLink的参赛repo,包含数据处理和微调等代码文件与脚本以及README.md,用于参加“ ModelScope开源模型应用挑战赛”
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
GreenOpen
https://www.modelscope.cn/models/jsxyhelu2024/build_4_comptetion/file/view/master?fileName=README.md&status=1 1、微调脚本
pip install ms-swift[llm]
CUDA_VISIBLE_DEVICES=0
swift sft
–model_type qwen2-7b-instruct
–sft_type lora
–output_dir output
–dataset classical-chinese-translate
–num_train_epochs 1
–max_length 1024
–check_dataset_strategy warning
–lora_rank 8
–lora_alpha 32
–lora_dropout_p 0.05
–lora_target_modules ALL
–gradient_checkpointing true
–batch_size 1
–learning_rate 5e-5
–gradient_accumulation_steps 16
–max_grad_norm 1.0
–warmup_ratio 0.03
–eval_steps 100
–save_steps 100
–save_total_limit 2
–logging_steps 10
实验环境和占用显存
2、推理脚本
swift infer –ckpt_dir /mnt/workspace/swift/output/qwen2-7b-instruct/v0-20240904-093453/checkpoint-411
3、推理效果
a、如何使用咖喱做菜? b、一个直角三角形,两个直角边分别长3厘米和4厘米,问第三个边长多少? c、中国的首都是哪里?
4、数据集介绍 “古文翻译腔数据集” https://www.modelscope.cn/datasets/swift/classical_chinese_translate/dataPeview