InternLM-XComposer
InternLM-XComposer copied to clipboard
InternLM-XComposer-2.5: A Versatile Large Vision Language Model Supporting Long-Contextual Input and Output
如题,finetune时如何支持单卡内组batch训练呢? 我把finetune.sh中的--batch_size和--per_device_train_batch_size参数都改成了2,启动训练后会在下面位置报错 https://huggingface.co/internlm/internlm-xcomposer2-vl-7b/blob/main/modeling_internlm_xcomposer2.py#L266 报错原因是两个样本的token seq长度不一致,无法进行concatenate操作。
 There is no padding when wrap_embeds = torch.cat(wrap_embeds_list) in interleav_wrap function, Is this a bug in it?
多轮多模态对话
想问一下,xcomposer2是否支持多轮带图问答? 也就是 每一轮都是的输入,我在构建对话后,一直提示ValueError: Invalid prompt format. 似乎按照开源代码无法进行多轮对话 plus:我想使用这种方式是因为首轮想提供给模型一个标准引导(one-shot),然后再第二轮再进行提问
你好。我有两张A100 (40G)显存。 1. 但是我运行全参数微调时batchsize=1也会超显存,全参数微调需要单张卡的显存多少?有没有办法将模型分不到两张卡上做训练? 2. 我想做某个领域知识的预训练,全参数微调是否可行,需要多少量级的数据。如果全参数微调不可行,那么是否可以多阶段lora微调?
If I want to turn off parameters in the Plora section during training, which layers of the model do I need to turn off parameter iterations? "model.layers.0.attention.wo.Plora_A.weight": "pytorch_model-00001-of-00002.bin", "model.layers.0.attention.wo.Plora_B.weight": "pytorch_model-00001-of-00002.bin",...
使用官方提供的7B版本,单卡24G内存的RTX上无法运行,报OOM错误,指定卡号后无法生效,依然还是只占用第0卡,要怎么推理才可以正常运行 ```python import torch from transformers import AutoModel, AutoTokenizer torch.set_grad_enabled(False) ckpt_path='/home/my/.cache/modelscope/hub/Shanghai_AI_Laboratory/internlm-xcomposer2-vl-7b' # init model and tokenizer model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().eval() tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True) text = '仔细描述这张图' image='/home/my/cat.jpg' with torch.cuda.amp.autocast():...
我输入了两张图像,shape: torch.Size([2, 3, 1680, 1008]) 当我执行到: self.vit([image], self.plora_glb_GN, self.plora_sub_GN) 报错: RuntimeError: shape '[1, 3, 5, 336, 3, 336]' is invalid for input of size 10160640 用单张图片是不报错,两张时报错
I run the quick inference demo of the github repo and follow the install pipeline without any other operation. But I got this error. Traceback (most recent call last): File...
Thank you very much for contributing such an excellent model! If I want to input a picture and obtain the **embedding** provided by InternLM-XComposer2-VL-7B, how should I do it? Can...