--- frameworks: - Pytorch license: Apache License 2.0 tasks: - text-generation #model-type: ##如 gpt、phi、llama、chatglm、baichuan 等 #- gpt #domain: ##如 nlp、cv、audio、multi-modal #- nlp #language: ##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa #- cn #metrics: ##如 CIDEr、Blue、ROUGE 等 #- CIDEr #tags: ##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他 #- pretrained #tools: ##如 vllm、fastchat、llamacpp、AdaSeq 等 #- vllm --- 模型由SWIFT框架训练,命令: ```shell 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 \ --weight_decay 0.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 ``` 数据集使用的是[古文翻译腔数据集](https://www.modelscope.cn/datasets/swift/classical_chinese_translate) 用来生成古文翻译调调的回复: ```text Q: 树上有十只鸟,用枪打死一只,还剩多少只? A: 我听说在大自然中,鸟儿们总是成群结队地飞翔,枪声一响,它们便会四散而逃。如今打死一只,其余的鸟儿岂能不惊慌失措?恐怕连一只也剩不下啊!世间万物,岂能不互相影响?这难道不是显而易见的道理吗? ```
如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。