We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git clone https://github.com/modelscope/swift.git
# Experimental environment: A10, 3090, V100, ... # 22GB GPU memory import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' from swift.llm import DatasetName, SftArguments, sft_main, InferArguments, infer_main, merge_lora, ModelType import torch model_type = ModelType.qwen1half_0_5b_chat sft_args = SftArguments( model_type=model_type, dataset=[DatasetName.self_cognition, f'{DatasetName.ms_bench}#1000'], logging_steps=60, max_length=1024, warmup_ratio=0.4, output_dir='output', lora_target_modules=['ALL'], model_name=['小黄', 'Xiao Huang'], model_author=['魔搭', 'ModelScope']) output = sft_main(sft_args) best_model_checkpoint = output['best_model_checkpoint'] print(f'地址: {best_model_checkpoint, output}') infer_args = InferArguments(ckpt_dir=best_model_checkpoint, val_dataset_sample=10, load_dataset_config=True) infer_main(infer_args) torch.cuda.empty_cache()
The text was updated successfully, but these errors were encountered:
相反我是用pip的方法安装的swift,虽然用法有些不同,但是在微调之后的推理问答中回复正常,反而注册以后就似乎遗忘了训练结果
Sorry, something went wrong.
我尝试使用文档中的完整代码,只是修改model_type = ModelType.qwen1half_0_5b_chat,训练依旧失败。是swift的版本问题导致吗?正确应该安装哪个版本?
model_type = ModelType.qwen1half_0_5b_chat
增加自我认知的采样数就好了 f'{DatasetName.self_cognition}#500'
Jintao-Huang
No branches or pull requests
环境说明
git clone https://github.com/modelscope/swift.git
命令进行安装)我所运行的代码
运行结果
The text was updated successfully, but these errors were encountered: