gpustack: GGML_ASSERT(status) failed in M3Ultra MacStudio
I used two Mac Studio machines with 512GB each to form a cluster and tried to load the 4-bit DeepSeek V3 0324 model, but it failed. The two Macs are connected via Thunderbolt 5, and the connection has been successfully tested. The model is stored locally on both machines, and the downloads have been completed on each. I also set the maximum available GPU memory using sudo sysctl iogpu.wired_limit_mb=350000 on both machines.
-----mac 1(172.16.16.62)----------
rpc_server/gpu-0.log:
Unknown argument: --origin-rpc-server-main-gpu
0.00.000.392 I
0.00.000.398 I arguments : /opt/gpustack/venv/lib/python3.12/site-packages/gpustack/third_party/bin/llama-box/llama-box --rpc-server-host 0.0.0.0 --rpc-server-port 50524 --rpc-server-main-gpu 0 --origin-rpc-server-main-gpu 0
0.00.000.398 I version : v0.0.117 (315b735)
0.00.000.398 I compiler : Apple clang version 15.0.0 (clang-1500.1.0.2.5)
0.00.000.399 I target : arm64-apple-darwin23.6.0
0.00.000.399 I vendor : llama.cpp 27d135c9 (4598), stable-diffusion.cpp 102953d (203)
0.00.000.627 I system_info: n_threads = 24 (n_threads_batch = 24) / 32 | Metal : EMBED_LIBRARY = 1 | BF16 = 1 | CPU : ARM_FMA = 1 | FP16_VA = 1 | DOTPROD = 1 | LLAMAFILE = 1 | ACCELERATE = 1 | AARCH64_REPACK = 1 |
0.00.000.628 I
0.00.000.628 I srv rpcserver_create_backend: using METAL backend, gpu: 0
0.00.000.630 I ggml_metal_init: allocating
0.00.007.553 I ggml_metal_init: found device: Apple M3 Ultra
0.00.019.152 I ggml_metal_init: picking default device: Apple M3 Ultra
0.00.019.619 I ggml_metal_init: using embedded metal library
0.00.024.330 I ggml_metal_init: GPU name: Apple M3 Ultra
0.00.024.332 I ggml_metal_init: GPU family: MTLGPUFamilyApple9 (1009)
0.00.024.332 I ggml_metal_init: GPU family: MTLGPUFamilyCommon3 (3003)
0.00.024.333 I ggml_metal_init: GPU family: MTLGPUFamilyMetal3 (5001)
0.00.024.333 I ggml_metal_init: simdgroup reduction = true
0.00.024.333 I ggml_metal_init: simdgroup matrix mul. = true
0.00.024.333 I ggml_metal_init: has residency sets = false
0.00.024.334 I ggml_metal_init: has bfloat = true
0.00.024.334 I ggml_metal_init: use bfloat = true
0.00.024.334 I ggml_metal_init: hasUnifiedMemory = true
0.00.024.336 I ggml_metal_init: recommendedMaxWorkingSetSize = 367001.60 MB
0.00.035.340 I srv rpcserver_start: listening hostname = 0.0.0.0, port = 50524, allocatable_mib = 349994, capacity_mib = 350000
serve/1.log:
2025-04-06T19:07:15+08:00 - gpustack.worker.backends.llama_box - INFO - Starting llama-box server
0.00.000.574 I
0.00.000.580 I arguments : /opt/gpustack/venv/lib/python3.12/site-packages/gpustack/third_party/bin/llama-box/llama-box --host 0.0.0.0 --embeddings --gpu-layers 62 --parallel 4 --ctx-size 8192 --port 40695 --model /Volumes/llm/lmstudio-community/DeepSeek-V3-0324-GGUF/DeepSeek-V3-0324-Q4_K_M-00001-of-00011.gguf --alias DeepSeek-V3-0324-GGUF --no-mmap --no-warmup --rpc 172.16.16.63:50753 --tensor-split 348976,348976
0.00.000.580 I version : v0.0.117 (315b735)
0.00.000.580 I compiler : Apple clang version 15.0.0 (clang-1500.1.0.2.5)
0.00.000.580 I target : arm64-apple-darwin23.6.0
0.00.000.581 I vendor : llama.cpp 27d135c9 (4598), stable-diffusion.cpp 102953d (203)
0.00.000.591 I system_info: n_threads = 24 (n_threads_batch = 24) / 32 | Metal : EMBED_LIBRARY = 1 | BF16 = 1 | CPU : ARM_FMA = 1 | FP16_VA = 1 | DOTPROD = 1 | LLAMAFILE = 1 | ACCELERATE = 1 | AARCH64_REPACK = 1 |
0.00.000.591 I
0.00.000.940 I srv main: listening, hostname = 0.0.0.0, port = 40695, n_threads = 6 + 2
0.00.002.467 I srv main: loading model
0.00.002.477 I srv load_model: loading model '/Volumes/llm/lmstudio-community/DeepSeek-V3-0324-GGUF/DeepSeek-V3-0324-Q4_K_M-00001-of-00011.gguf'
0.00.004.541 I llama_model_load_from_file_impl: using device RPC[172.16.16.63:50753] (RPC[172.16.16.63:50753]) - 349994 MiB free
0.00.027.876 I llama_model_load_from_file_impl: using device Metal (Apple M3 Ultra) - 349999 MiB free
0.00.048.209 I llama_model_loader: additional 10 GGUFs metadata loaded.
0.00.048.212 I llama_model_loader: loaded meta data with 49 key-value pairs and 1025 tensors from /Volumes/llm/lmstudio-community/DeepSeek-V3-0324-GGUF/DeepSeek-V3-0324-Q4_K_M-00001-of-00011.gguf (version GGUF V3 (latest))
0.00.048.225 I llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
0.00.048.226 I llama_model_loader: - kv 0: general.architecture str = deepseek2
0.00.048.227 I llama_model_loader: - kv 1: general.type str = model
0.00.048.227 I llama_model_loader: - kv 2: general.name str = DeepSeek V3 0324
0.00.048.228 I llama_model_loader: - kv 3: general.version str = V3-0324
0.00.048.228 I llama_model_loader: - kv 4: general.basename str = DeepSeek
0.00.048.228 I llama_model_loader: - kv 5: general.size_label str = 256x20B
0.00.048.229 I llama_model_loader: - kv 6: general.license str = mit
0.00.048.230 I llama_model_loader: - kv 7: deepseek2.block_count u32 = 61
0.00.048.230 I llama_model_loader: - kv 8: deepseek2.context_length u32 = 163840
0.00.048.230 I llama_model_loader: - kv 9: deepseek2.embedding_length u32 = 7168
0.00.048.231 I llama_model_loader: - kv 10: deepseek2.feed_forward_length u32 = 18432
0.00.048.231 I llama_model_loader: - kv 11: deepseek2.attention.head_count u32 = 128
0.00.048.231 I llama_model_loader: - kv 12: deepseek2.attention.head_count_kv u32 = 128
0.00.048.233 I llama_model_loader: - kv 13: deepseek2.rope.freq_base f32 = 10000.000000
0.00.048.233 I llama_model_loader: - kv 14: deepseek2.attention.layer_norm_rms_epsilon f32 = 0.000001
0.00.048.234 I llama_model_loader: - kv 15: deepseek2.expert_used_count u32 = 8
0.00.048.234 I llama_model_loader: - kv 16: deepseek2.leading_dense_block_count u32 = 3
0.00.048.234 I llama_model_loader: - kv 17: deepseek2.vocab_size u32 = 129280
0.00.048.235 I llama_model_loader: - kv 18: deepseek2.attention.q_lora_rank u32 = 1536
0.00.048.235 I llama_model_loader: - kv 19: deepseek2.attention.kv_lora_rank u32 = 512
0.00.048.235 I llama_model_loader: - kv 20: deepseek2.attention.key_length u32 = 192
0.00.048.235 I llama_model_loader: - kv 21: deepseek2.attention.value_length u32 = 128
0.00.048.236 I llama_model_loader: - kv 22: deepseek2.expert_feed_forward_length u32 = 2048
0.00.048.236 I llama_model_loader: - kv 23: deepseek2.expert_count u32 = 256
0.00.048.236 I llama_model_loader: - kv 24: deepseek2.expert_shared_count u32 = 1
0.00.048.237 I llama_model_loader: - kv 25: deepseek2.expert_weights_scale f32 = 2.500000
0.00.048.237 I llama_model_loader: - kv 26: deepseek2.expert_weights_norm bool = true
0.00.048.237 I llama_model_loader: - kv 27: deepseek2.expert_gating_func u32 = 2
0.00.048.238 I llama_model_loader: - kv 28: deepseek2.rope.dimension_count u32 = 64
0.00.048.238 I llama_model_loader: - kv 29: deepseek2.rope.scaling.type str = yarn
0.00.048.238 I llama_model_loader: - kv 30: deepseek2.rope.scaling.factor f32 = 40.000000
0.00.048.239 I llama_model_loader: - kv 31: deepseek2.rope.scaling.original_context_length u32 = 4096
0.00.048.239 I llama_model_loader: - kv 32: deepseek2.rope.scaling.yarn_log_multiplier f32 = 0.100000
0.00.048.239 I llama_model_loader: - kv 33: tokenizer.ggml.model str = gpt2
0.00.048.240 I llama_model_loader: - kv 34: tokenizer.ggml.pre str = deepseek-v3
0.00.058.113 I llama_model_loader: - kv 35: tokenizer.ggml.tokens arr[str,129280] = ["<|begin▁of▁sentence|>", "<?...
0.00.061.209 I llama_model_loader: - kv 36: tokenizer.ggml.token_type arr[i32,129280] = [3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
0.00.071.214 I llama_model_loader: - kv 37: tokenizer.ggml.merges arr[str,127741] = ["Ġ t", "Ġ a", "i n", "Ġ Ġ", "h e...
0.00.071.215 I llama_model_loader: - kv 38: tokenizer.ggml.bos_token_id u32 = 0
0.00.071.215 I llama_model_loader: - kv 39: tokenizer.ggml.eos_token_id u32 = 1
0.00.071.216 I llama_model_loader: - kv 40: tokenizer.ggml.padding_token_id u32 = 1
0.00.071.216 I llama_model_loader: - kv 41: tokenizer.ggml.add_bos_token bool = true
0.00.071.216 I llama_model_loader: - kv 42: tokenizer.ggml.add_eos_token bool = false
0.00.071.218 I llama_model_loader: - kv 43: tokenizer.chat_template str = {% if not add_generation_prompt is de...
0.00.071.218 I llama_model_loader: - kv 44: general.quantization_version u32 = 2
0.00.071.218 I llama_model_loader: - kv 45: general.file_type u32 = 15
0.00.071.219 I llama_model_loader: - kv 46: split.no u16 = 0
0.00.071.219 I llama_model_loader: - kv 47: split.tensors.count i32 = 1025
0.00.071.220 I llama_model_loader: - kv 48: split.count u16 = 11
0.00.071.222 I llama_model_loader: - type f32: 361 tensors
0.00.071.222 I llama_model_loader: - type q4_K: 606 tensors
0.00.071.222 I llama_model_loader: - type q6_K: 58 tensors
0.00.071.223 I print_info: file format = GGUF V3 (latest)
0.00.071.223 I print_info: file type = Q4_K - Medium
0.00.071.224 I print_info: file size = 376.65 GiB (4.82 BPW)
0.00.095.358 W load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
0.00.095.417 I load: special tokens cache size = 818
0.00.112.822 I load: token to piece cache size = 0.8223 MB
0.00.112.827 I print_info: arch = deepseek2
0.00.112.827 I print_info: vocab_only = 0
0.00.112.828 I print_info: n_ctx_train = 163840
0.00.112.828 I print_info: n_embd = 7168
0.00.112.828 I print_info: n_layer = 61
0.00.112.832 I print_info: n_head = 128
0.00.112.833 I print_info: n_head_kv = 128
0.00.112.833 I print_info: n_rot = 64
0.00.112.833 I print_info: n_swa = 0
0.00.112.833 I print_info: n_embd_head_k = 192
0.00.112.833 I print_info: n_embd_head_v = 128
0.00.112.834 I print_info: n_gqa = 1
0.00.112.835 I print_info: n_embd_k_gqa = 24576
0.00.112.836 I print_info: n_embd_v_gqa = 16384
0.00.112.836 I print_info: f_norm_eps = 0.0e+00
0.00.112.837 I print_info: f_norm_rms_eps = 1.0e-06
0.00.112.837 I print_info: f_clamp_kqv = 0.0e+00
0.00.112.837 I print_info: f_max_alibi_bias = 0.0e+00
0.00.112.837 I print_info: f_logit_scale = 0.0e+00
0.00.112.838 I print_info: n_ff = 18432
0.00.112.838 I print_info: n_expert = 256
0.00.112.839 I print_info: n_expert_used = 8
0.00.112.839 I print_info: causal attn = 1
0.00.112.839 I print_info: pooling type = 0
0.00.112.839 I print_info: rope type = 0
0.00.112.839 I print_info: rope scaling = yarn
0.00.112.840 I print_info: freq_base_train = 10000.0
0.00.112.840 I print_info: freq_scale_train = 0.025
0.00.112.840 I print_info: n_ctx_orig_yarn = 4096
0.00.112.841 I print_info: rope_finetuned = unknown
0.00.112.841 I print_info: ssm_d_conv = 0
0.00.112.841 I print_info: ssm_d_inner = 0
0.00.112.841 I print_info: ssm_d_state = 0
0.00.112.841 I print_info: ssm_dt_rank = 0
0.00.112.841 I print_info: ssm_dt_b_c_rms = 0
0.00.112.842 I print_info: model type = 671B
0.00.112.842 I print_info: model params = 671.03 B
0.00.112.842 I print_info: general.name = DeepSeek V3 0324
0.00.112.842 I print_info: n_layer_dense_lead = 3
0.00.112.843 I print_info: n_lora_q = 1536
0.00.112.843 I print_info: n_lora_kv = 512
0.00.112.843 I print_info: n_ff_exp = 2048
0.00.112.843 I print_info: n_expert_shared = 1
0.00.112.843 I print_info: expert_weights_scale = 2.5
0.00.112.844 I print_info: expert_weights_norm = 1
0.00.112.844 I print_info: expert_gating_func = sigmoid
0.00.112.844 I print_info: rope_yarn_log_mul = 0.1000
0.00.112.844 I print_info: vocab type = BPE
0.00.112.845 I print_info: n_vocab = 129280
0.00.112.845 I print_info: n_merges = 127741
0.00.112.845 I print_info: BOS token = 0 '<|begin▁of▁sentence|>'
0.00.112.847 I print_info: EOS token = 1 '<|end▁of▁sentence|>'
0.00.112.847 I print_info: EOT token = 1 '<|end▁of▁sentence|>'
0.00.112.847 I print_info: PAD token = 1 '<|end▁of▁sentence|>'
0.00.112.848 I print_info: LF token = 201 'Ċ'
0.00.112.848 I print_info: FIM PRE token = 128801 '<|fim▁begin|>'
0.00.112.848 I print_info: FIM SUF token = 128800 '<|fim▁hole|>'
0.00.112.848 I print_info: FIM MID token = 128802 '<|fim▁end|>'
0.00.112.849 I print_info: EOG token = 1 '<|end▁of▁sentence|>'
0.00.112.850 I print_info: max token length = 256
0.00.137.906 I load_tensors: offloading 61 repeating layers to GPU
0.00.137.908 I load_tensors: offloading output layer to GPU
0.00.137.908 I load_tensors: offloaded 62/62 layers to GPU
0.00.137.909 I load_tensors: Metal model buffer size = 200010.91 MiB
0.00.137.910 I load_tensors: CPU model buffer size = 497.11 MiB
0.00.137.910 I load_tensors: RPC[172.16.16.63:50753] model buffer size = 185181.61 MiB
0.00.678.813 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51483 | status 503 | cost 5084.73s
0.03.690.390 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51487 | status 503 | cost 5087.74s
0.06.701.819 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51488 | status 503 | cost 5090.75s
0.09.713.156 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51489 | status 503 | cost 5093.76s
0.12.724.871 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51495 | status 503 | cost 5096.77s
0.15.736.257 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51496 | status 503 | cost 5099.78s
0.18.747.638 I srv log_server_response: rid | GET /v1/models 127.0.0.1:51499 | status 503 | cost 5102.80s
/Users/runner/work/llama-box/llama-box/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp:499: GGML_ASSERT(status) failed
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (12 by maintainers)
Commits related to this issue
- fix(llama-box): failed to load model see below invesgation comments - darwin-metal https://github.com/gpustack/gpustack/issues/1646#issuecomment-2801360533 - linux-musa https://github.com/gpustack/ll... — committed to thxCode/gpustack by thxCode 2 years ago
- fix(llama-box): failed to load model see below investigation comments: - darwin-metal https://github.com/gpustack/gpustack/issues/1646#issuecomment-2801360533 - linux-musa https://github.com/gpustack... — committed to thxCode/gpustack by thxCode 2 years ago
- fix(llama-box): failed to load model see below investigation comments: - darwin-metal https://github.com/gpustack/gpustack/issues/1646#issuecomment-2801360533 - linux-musa https://github.com/gpustack... — committed to gpustack/gpustack by thxCode 2 years ago
@sivagaga We can reproduce this in our lab. The root cause is that the main server is going to
sendwith a largesizebut receives EINVAL.as I mentioned above, the failed tensor is sized
3082813808and it is larger than an internal threshold(I can’t find a convincing value, I guess it should be INT_MAX, however, after some testing, it seems to be 32MiB.)with llama-box v0.0.135, we can deploy DeepSeek-v3-0324 Q8 successfully, which a model file larger than Q4_K_M.