When I use the command "python convert_llama_weights_to_hf.py --input_dir /xxx/llama/ --model_size 70B --output_dir /xxxx/Llama-2-70b-chat-hf" killed
### System Info

Hi,@ArthurZucker,@younesbelkada
When I use the command "python convert_llama_weights_to_hf.py --input_dir /xxx/llama/ --model_size 70B --output_dir /xxxx/Llama-2-70b-chat-hf", the following error occurred:
<img width="1342" alt="image" src="https://github.com/huggingface/transformers/assets/44772254/58946c17-e65d-4d56-b675-361ff0832576">
Additional Information: Memory Size：116GB
I noticed: Important note: you need to be able to host the whole model in RAM to execute this script (even if the biggest versions 
come in several checkpoints they each contain a part of each weight of the model, so we need to load them all in RAM).
I would like to ask, is there a parameter control, I can use disk instead of memory to complete the task? I can live with him running slower.

### Who can help?

@ArthurZucker
@younesbelkada

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

  python convert_llama_weights_to_hf.py  --input_dir /home/xxxx/llama/ --model_size 70B --output_dir /home/xxxx/llama/Llama-2-70b-chat-hf


### Expected behavior

it can execute successfully
Hi @cm-liushaodong 
The llama-70B model weights file is at least 140GB in half precision, sadly I think that you need an instance of at least that CPU memory size to download the weights and load them in CPU memory. Maybe @ArthurZucker can confirm as he has used that script<|||||>Yes, as[ the documentation mentions, ](https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py#L52):
```python 
Important note: you need to be able to host the whole model in RAM to execute this script (even if the biggest versions
come in several checkpoints they each contain a part of each weight of the model, so we need to load them all in RAM).
```
`killled` means you probably had a OOM issue. If you are on linux you can check with `dmesg -T| grep -E -i -B100 'killed process'` <|||||>Thanks all, I used a machine with a larger memory to transcode successfully.