Closed laughinghugs closed 3 months ago
Hi @laughinghugs,
are there multiple GPUs in your environment? I believe the code should work on a single GPU.
For multiple GPUs, it is important to encapsulate the code in __main__
, please see my detailed response here.
Regarding running multi-GPU with LLM2Vec, the code need to be shielded with if name. Otherwise, CUDA runs into issues when spawning new processes. This is a requirement in sentence transformers multi-GPU support as well.
Let me know if you have any more questions.
@vaibhavad - Thank you. Yes I was using multi-gpus. Now I have change device_map to 'cuda' and it worked.
As you have mentioned in your paper -
Our empirical results so far as well as the analysis above share an intriguing observation: enabling bidirectional attention works well for Mistral-7B, even without any training.
I was trying to loadMistral-7B-Instruct-v0.2
directly.Now when I am trying to run the following code to encode a text -
I am getting the following error -
Detailed error:
Could you please help?