BitNet: Died with `Signals.SIGKILL: 9` when running `setup_env.py`
Hi guys!
I got the following error:
INFO:root:Compiling the code using CMake.
INFO:root:Downloading model HF1BitLLM/Llama3-8B-1.58-100B-tokens from HuggingFace to models/Llama3-8B-1.58-100B-tokens...
INFO:root:Converting HF model to GGUF format...
ERROR:root:Error occurred while running command: Command '['/home/airtau/miniconda3/envs/bitnet-cpp/bin/python', 'utils/convert-hf-to-gguf-bitnet.py', 'models/Llama3-8B-1.58-100B-tokens', '--outtype', 'f32']' died with <Signals.SIGKILL: 9>., check details in logs/convert_to_f32_gguf.log
When running the following command:
python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s
Environment:
- Windows 11 Home (10.026100 Build 26100)
- Ubuntu System (WSL)
- Distributor ID: Ubuntu
- Description: Ubuntu 24.04.1 LTS
- Release: 24.04
- Codename: noble
- clang version 1:18.0-59~exp2
- python 3.9.20 with Miniconda (conda 24.9.2)
- cmake 3.28.3-1build7
Hardware:
- 13th Gen Intel® Core™ i7-13700H
- Nvidia RTX 3050 Mobile
logs/convert_to_f32_gguf.log:
INFO:hf-to-gguf:Loading model: Llama3-8B-1.58-100B-tokens
INFO:gguf.gguf_writer:gguf: This GGUF file is for Little Endian only
INFO:hf-to-gguf:Set model parameters
INFO:hf-to-gguf:gguf: context length = 8192
INFO:hf-to-gguf:gguf: embedding length = 4096
INFO:hf-to-gguf:gguf: feed forward length = 14336
INFO:hf-to-gguf:gguf: head count = 32
INFO:hf-to-gguf:gguf: key-value head count = 8
INFO:hf-to-gguf:gguf: rope theta = 500000.0
INFO:hf-to-gguf:gguf: rms norm epsilon = 1e-05
INFO:hf-to-gguf:gguf: file type = 0
INFO:hf-to-gguf:Set model tokenizer
INFO:gguf.vocab:Adding 280147 merge(s).
INFO:gguf.vocab:Setting special token type bos to 128000
INFO:gguf.vocab:Setting special token type eos to 128009
INFO:gguf.vocab:Setting chat_template to {% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>
'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>
' }}{% endif %}
INFO:hf-to-gguf:Exporting model to 'models/Llama3-8B-1.58-100B-tokens/ggml-model-f32.gguf'
INFO:hf-to-gguf:gguf: loading model part 'model.safetensors'
INFO:hf-to-gguf:gguf: loading model part 'model.safetensors'
INFO:hf-to-gguf:output.weight, torch.bfloat16 --> F32, shape = {4096, 128256}
INFO:hf-to-gguf:token_embd.weight, torch.bfloat16 --> F32, shape = {4096, 128256}
INFO:hf-to-gguf:blk.0.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.0.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.0.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.0.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.0.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.0.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.0.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.0.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.0.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.1.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.1.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.1.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.1.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.1.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.1.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.1.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.1.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.1.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.10.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.10.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.10.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.10.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.10.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.10.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.10.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.10.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.10.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.11.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.11.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.11.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.11.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.11.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.11.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.11.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.11.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.11.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.12.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.12.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.12.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.12.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.12.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.12.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.12.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.12.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.12.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.13.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.13.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.13.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.13.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.13.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.13.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.13.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.13.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.13.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.14.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.14.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.14.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.14.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.14.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.14.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.14.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.14.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.14.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.15.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.15.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.15.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.15.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.15.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.15.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.15.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.15.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.15.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.16.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.16.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.16.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.16.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.16.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.16.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.16.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.16.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.16.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.17.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.17.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.17.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.17.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.17.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.17.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.17.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.17.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.17.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.18.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.18.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.18.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.18.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.18.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.18.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.18.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.18.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.18.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.19.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.19.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.19.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.19.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.19.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.19.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.19.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.19.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.19.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.2.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.2.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.2.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.2.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.2.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.2.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.2.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.2.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.2.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.20.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.20.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.20.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.20.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.20.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.20.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.20.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.20.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.20.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.21.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.21.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.21.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.21.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.21.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.21.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.21.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.21.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.21.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.22.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.22.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.22.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.22.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.22.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.22.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.22.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.22.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.22.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.23.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.23.ffn_down.weight, torch.uint8 --> F32, shape = {14336, 4096}
INFO:hf-to-gguf:blk.23.ffn_gate.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.23.ffn_up.weight, torch.uint8 --> F32, shape = {4096, 14336}
INFO:hf-to-gguf:blk.23.ffn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
INFO:hf-to-gguf:blk.23.attn_k.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.23.attn_output.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.23.attn_q.weight, torch.uint8 --> F32, shape = {4096, 4096}
INFO:hf-to-gguf:blk.23.attn_v.weight, torch.uint8 --> F32, shape = {4096, 1024}
INFO:hf-to-gguf:blk.24.attn_norm.weight, torch.bfloat16 --> F32, shape = {4096}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 19 (1 by maintainers)
i faced the same see your memory consumption, your ram exhausted
I have BitNet running in native Windows10 and via WSL. There seem to be a performance problem, WSL is one magnitude slower.
Sample: python run_inference.py -m Llama3-8B-1.58-100B-tokens-TQ2_0.gguf -p “Explain to me the second Newton’s law” -n 20 -t 8 -temp 0.8
Windows 10: llama_perf_sampler_print: sampling time = 1.87 ms / 30 runs ( 0.06 ms per token, 16068.56 tokens per second) llama_perf_context_print: load time = 1246.32 ms llama_perf_context_print: prompt eval time = 482.70 ms / 10 tokens ( 48.27 ms per token, 20.72 tokens per second) llama_perf_context_print: eval time = 922.53 ms / 19 runs ( 48.55 ms per token, 20.60 tokens per second) llama_perf_context_print: total time = 1417.05 ms / 29 tokens
WSL 2.0: llama_perf_sampler_print: sampling time = 16.02 ms / 30 runs ( 0.53 ms per token, 1872.66 tokens per second) llama_perf_context_print: load time = 1970.14 ms llama_perf_context_print: prompt eval time = 10212.70 ms / 10 tokens ( 1021.27 ms per token, 0.98 tokens per second) llama_perf_context_print: eval time = 22100.21 ms / 19 runs ( 1163.17 ms per token, 0.86 tokens per second) llama_perf_context_print: total time = 32358.76 ms / 29 tokens
Thanks for this solution. I tried in my system too, I am using bare metal Linux, Don’t have much great specs (8 GB RAM) Nothing more. Here is my result:
LOL
I got 8B version working on 20GB ram + 20GB of swap. Max memory usage when converting:
I got around 6 tokens / second when running. Just increase memory for the system.
No, everything run smoothly except 8B model and the fact that the model is keep repeating. I am trying 20GB ram + 20GB swap on WSL2.