ChatGLM-Tuning icon indicating copy to clipboard operation
ChatGLM-Tuning copied to clipboard

基于ChatGLM-6B + LoRA的Fintune方案

Results 185 ChatGLM-Tuning issues
Sort by recently updated
recently updated
newest added

finetune.py - line 38: ```python labels = ( [-100] * (seq_len - 1) + ids[(seq_len - 1) :] + [-100] * (longest - ids_l) ) ``` 请问这里设置prompt token的label为-100的逻辑是什么呀~

试了一下用清华新的模型跑不了会报错。 请大佬抽出时间适配一下呗。万分感谢。

Feature request

![image](https://github.com/mymusise/ChatGLM-Tuning/assets/84270213/35d02b3d-11a9-43d9-a301-36263f9ac4f4) xplicitly passing a `revision’is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in revisior 0%| 0/52002 [00:00

FileNotFoundError: [Errno 2] No such file or directory: '/headless/.cache/huggingface/datasets/generator/default-82b5cc1697d163ad/0.0.0/dataset_info.json' 路径下面确实没有这个文件 就是不知道怎么生成的这个文件 ,请教一下大家

在finetune.py内,def data_collator的第38行生成labels时,作者的做法是: `labels = ( [-100] * (seq_len - 1) + ids[(seq_len - 1) :] + [-100] * (longest - ids_l) )` 我怎么觉得这里有点问题?labels不应该是target_sequence[start+1:]吗,我理解这里ids[seq_len-1]还属于source sequence的最后一个token,其实更应该是target sequence的第二个字符? 有人觉得这里会有疑问吗?

![image](https://github.com/mymusise/ChatGLM-Tuning/assets/59271872/e0191855-2e55-4cc1-804d-72d6f2eb0628) 如上,直接用本项目中提供的推理代码,模型和数据都加载到0号显卡上,但是发现2, 3, 4上也会有占用,0号显卡上占用最多(13G+),其他显卡大概占用 4G+,请问这是什么原因呢? ![image](https://github.com/mymusise/ChatGLM-Tuning/assets/59271872/53888ff9-ec4c-4c73-820b-0fa3d7394eef)

在自己的数据集上进行微调,运行后出现以下错误。 这是相关设置 tokenizer = AutoTokenizer.from_pretrained("../chatglm-6b", trust_remote_code=True) model = AutoModel.from_pretrained("../chatglm-6b", trust_remote_code=True).quantize(8).half().cuda() lora_config = LoraConfig( r=8, task_type=TaskType.SEQ_2_SEQ_LM, target_modules=['query_key_value'], lora_alpha=32, lora_dropout=0.1, ) model = get_peft_model(model, lora_config) 数据集的map函数是常规的处理成“input_id”和"labels"的形式。 希望有大佬指导一二。 forward() got an unexpected keyword...

用V100训练之后predict会报错,infere的代码针对V100需要添加: with torch.autocast("cuda"):

Traceback (most recent call last): File "/root/share/code/ChatGLM-Tuning/finetune-mutil.py", line 128, in main() File "/root/share/code/ChatGLM-Tuning/finetune-mutil.py", line 85, in main model = AutoModel.from_pretrained( File "/root/.local/conda/envs/py310/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 441, in from_pretrained config, kwargs = AutoConfig.from_pretrained(...