Open yigu1008 opened 1 year ago
This approach throw an error: from llava.conversation import simple_conv_multimodal
which if check on their repo, it does not exists. I wonder how you work around that?
I got the same "device-side assert triggered"
For the "from llava.conversation import simple_conv_multimodal" error, you can simply use
PROMPT = """You are LLaVA, a large language and vision assistant trained by UW Madison WAIV Lab.You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.Follow the instructions carefully and explain your answers in detail.###Human: Hi!###Assistant: Hi there! How can I help you today?
###Human:"""
instead of importing simple_conv_multimodal.
Regarding “CUDA error: device-side assert triggered”, this happened when torch.embedding() tried to convert tokens into embeddings. Because LLaVA-server/llava_server/llava.py added special tokens to tokenizer, but it doesn't enlarge the embedding matrix of the model, which leads to this issue. We can resize the embedding matrix after adding special tokens. Add the following code in LLaVA-server/llava_server/llava.py line 38 may solve it.
model.resize_token_embeddings(len(tokenizer))
Hi Kevin, when I'm trying to reproduce the Prompt Alignment Experiment, I downloaded the llava_server codebase using weights from "liuhaotian/llava-v1.5-7b" first, when I run
I got KeyError: 'llava'. when loading weights
To handle this, I cloned the latest llava from https://github.com/haotian-liu/LLaVA and modified the llava_server/llava.py:
Now I'm testing this code on the machine with 3 A100 GPUs, it could load the weights and setup servers with app.py
However, when I use 2 GPUs for llava inference and run train.py on the other, I got: "images = images.to("cuda", dtype=torch.float16) RuntimeError: CUDA error: device-side assert triggered"
I also checked the nvidia smi that my processes were indeed on three GPUs separately. May I know if you have could help me with this? Thank you!