ChatGLM-Tuning
ChatGLM-Tuning copied to clipboard
基于ChatGLM-6B + LoRA的Fintune方案
目前只能在一张卡训练。
我查了一下代码,是在这个地方 allow_fp16 无法被设置成true,设置了就能通过,我应该在什么地方配置,有大神指导吗? │ /home/ubuntu/venv/lib/python3.8/site-packages/torch/cuda/amp/grad_scaler.py:285 in unscale_ │ │ │ │ 282 │ │ inv_scale = self._scale.double().reciprocal().float() │ │ 283 │ │ found_inf = torch.full((1,), 0.0, dtype=torch.float32, device=self._scale.device │ │...
目前这个是借助alpaca的方式来finetune,如果希望finetune到别的中文数据集,如中文对话数据集,应该处理的输入是什么样子的呢?
类似这样的 https://github.com/tatsu-lab/stanford_alpaca/blob/main/alpaca_data.json
模型在训练结束后 Inference 无法正确生成 eos token,之前看有 issue 提过这个问题,但是关闭了
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues ================================================================================ /opt/conda/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('/usr/local/nvidia/lib64'),...
环境配置问题
CUDA必须大于11.6吗? 我的环境是CUDA11.2,微调的时候报错:ImportError: cannot import name 'skip_init' from 'torch.nn.utils' skip_init函数是不是只有在torch 2.0上才能用? 哪位大佬帮忙给解答一下?十分感谢!!!
感谢作者大佬的伟大工作。 我在infer时遇到个bug,不知道是我哪一步操作有问题,请大佬们指正。 我用 https://github.com/mymusise/ChatGLM-Tuning/blob/master/finetune.py 训出lora,在 https://github.com/mymusise/ChatGLM-Tuning/blob/master/infer.ipynb 加载lora文件,出现提示如下  不知道是lora训练的问题,还是infer加载的有问题?? 训练代码如下: CUDA_VISIBLE_DEVICES=2 python finetune.py \ --dataset_path data/need_demo \ --lora_rank 8 \ --per_device_train_batch_size 4 \ --gradient_accumulation_steps 1 \ --max_steps 50000 \ --save_steps...