You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I wanted to use gritlm to a open-source embedding model —— gte-qwen2-7b-instruct, but I encountered some problems:
[rank1]: Traceback (most recent call last):
[rank1]: File "/code/xx/LLM_mine/recall/reference/gritlm/gritlm/training/run.py", line 438, in <module>
[rank1]: main()
[rank1]: File "/code/xx/LLM_mine/recall/reference/gritlm/gritlm/training/run.py", line 420, in main
[rank1]: trainer.train()
[rank1]: File "/usr/local/lib/python3.10/dist-packages/transformers/trainer.py", line 1859, in train
[rank1]: return inner_training_loop(
[rank1]: File "/usr/local/lib/python3.10/dist-packages/transformers/trainer.py", line 2203, in _inner_training_loop
[rank1]: tr_loss_step = self.training_step(model, inputs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/transformers/trainer.py", line 3138, in training_step
[rank1]: loss = self.compute_loss(model, inputs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/transformers/trainer.py", line 3161, in compute_loss
[rank1]: outputs = model(**inputs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank1]: return self._call_impl(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank1]: return forward_call(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/parallel/distributed.py", line 1608, in forward
[rank1]: else self._run_ddp_forward(*inputs, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/parallel/distributed.py", line 1426, in _run_ddp_forward
[rank1]: return self.module(*inputs, **kwargs) # type: ignore[index]
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank1]: return self._call_impl(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank1]: return forward_call(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/accelerate/utils/operations.py", line 825, in forward
[rank1]: return model_forward(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/accelerate/utils/operations.py", line 813, in __call__
[rank1]: return convert_to_fp32(self.model_forward(*args, **kwargs))
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/amp/autocast_mode.py", line 16, in decorate_autocast
[rank1]: return func(*args, **kwargs)
[rank1]: File "/code/xx/LLM_mine/recall/reference/gritlm/gritlm/training/model.py", line 204, in forward
[rank1]: p_reps = self.encode(passage)
[rank1]: File "/code/xx/LLM_mine/recall/reference/gritlm/gritlm/training/model.py", line 145, in encode
[rank1]: out = (getattr(self.model, self.embedding_attr) if self.embedding_attr else self.model)(**kwargs)[0]
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank1]: return self._call_impl(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank1]: return forward_call(*args, **kwargs)
[rank1]: File "/root/.cache/huggingface/modules/transformers_modules/gte-qwen2-7B-instruct/modeling_qwen.py", line 1081, in forward
[rank1]: layer_outputs = decoder_layer(
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank1]: return self._call_impl(*args, **kwargs)
[rank1]: File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank1]: return forward_call(*args, **kwargs)
[rank1]: File "/root/.cache/huggingface/modules/transformers_modules/gte-qwen2-7B-instruct/modeling_qwen.py", line 795, in forward
[rank1]: hidden_states = residual + hidden_states
[rank1]: torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 56.00 MiB. GPU 1 has a total capacity of 79.33 GiB of which 35.81 MiB is free. Process 2768284 has 79.28 GiB memory in use. Of the allocated memory 77.51 GiB is allocated by PyTorch, and 761.60 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
My GPU is A800, 80G, and I used 8 * A800.
My submit script is following:
Hello. I wanted to use gritlm to a open-source embedding model —— gte-qwen2-7b-instruct, but I encountered some problems:
My GPU is A800, 80G, and I used 8 * A800.
My submit script is following:
How can I solve this problem?
The text was updated successfully, but these errors were encountered: