Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i run 8B with 2 GPU? #329

Open
QQxiaoyuyu opened this issue Sep 6, 2024 · 0 comments
Open

How can i run 8B with 2 GPU? #329

QQxiaoyuyu opened this issue Sep 6, 2024 · 0 comments

Comments

@QQxiaoyuyu
Copy link

My Gpu is NVIDIA GeForce GTX 1080 Ti,this memory is 11G,but when i run 8B,print error oom. so I want run it with 2 GPU

“[W906 15:26:36.983474460 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())

initializing model parallel with size 1
initializing ddp with size 1
initializing pipeline with size 1
/data/models/llama3/llama/generation.py:94: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
checkpoint = torch.load(ckpt_path, map_location="cpu")
/usr/local/lib/python3.10/dist-packages/torch/init.py:955: UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at ../torch/csrc/tensor/python_tensor.cpp:432.)
_C._set_default_tensor_type(t)
[rank0]: Traceback (most recent call last):
[rank0]: File "/data/models/llama3/example_chat_completion.py", line 84, in
[rank0]: fire.Fire(main)
[rank0]: File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 143, in Fire
[rank0]: component_trace = _Fire(component, args, parsed_flag_args, context, name)
[rank0]: File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 477, in _Fire
[rank0]: component, remaining_args = _CallAndUpdateTrace(
[rank0]: File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 693, in _CallAndUpdateTrace
[rank0]: component = fn(*varargs, **kwargs)
[rank0]: File "/data/models/llama3/example_chat_completion.py", line 31, in main
[rank0]: generator = Llama.build(
[rank0]: File "/data/models/llama3/llama/generation.py", line 109, in build
[rank0]: model = Transformer(model_args)
[rank0]: File "/data/models/llama3/llama/model.py", line 265, in init
[rank0]: self.layers.append(TransformerBlock(layer_id, params))
[rank0]: File "/data/models/llama3/llama/model.py", line 230, in init
[rank0]: self.feed_forward = FeedForward(
[rank0]: File "/data/models/llama3/llama/model.py", line 215, in init
[rank0]: self.w3 = ColumnParallelLinear(
[rank0]: File "/usr/local/lib/python3.10/dist-packages/fairscale/nn/model_parallel/layers.py", line 262, in init
[rank0]: self.weight = Parameter(torch.Tensor(self.output_size_per_partition, self.in_features))
[rank0]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 112.00 MiB. GPU 0 has a total capacity of 10.90 GiB of which 78.00 MiB is free. Including non-PyTorch memory, this process has 10.82 GiB memory in use. Of the allocated memory 10.67 GiB is allocated by PyTorch, and 7.64 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)
[rank0]:[W906 15:27:18.091497442 ProcessGroupNCCL.cpp:1168] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present, but this warning has only been added since PyTorch 2.4 (function operator())”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant