Skip to content

Misc. bug: b4907 breaks RPC #12465

@steampunque

Description

@steampunque

Name and Version

b4907 for rpc server and client both (double checked)

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-server

Command line

rpc-server is started on remote
server is launched with RPC specifiying the remote

Problem description & steps to reproduce

load any model over RPC SEGVs the remote and host

First Bad Commit

b4907

Relevant log output

LOCAL:


ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 4070, compute capability 8.9, VMM: yes
build: 4907 (7dfad387) with cc (GCC) 11.2.0 for x86_64-slackware-linux
system info: n_threads = 8, n_threads_batch = 8, total_threads = 16

system_info: n_threads = 8 (n_threads_batch = 8) / 16 | CUDA : ARCHS = 600,610,700,750 | F16 = 1 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | AARCH64_REPACK = 1 | 

main: HTTP server is listening, hostname: 127.0.0.1, port: 8080, http threads: 15
main: loading model
srv    load_model: loading model '/data3hd/models/QwQ-32B.IQ4_XS.gguf'
llama_model_load_from_file_impl: using device RPC[192.9.200.5:50052] (RPC[192.9.200.5:50052]) - 11810 MiB free
llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 4070) - 11593 MiB free
llama_model_loader: loaded meta data with 33 key-value pairs and 771 tensors from /data3hd/models/QwQ-32B.IQ4_XS.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = qwen2
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = QwQ 32B
llama_model_loader: - kv   3:                           general.basename str              = QwQ
llama_model_loader: - kv   4:                         general.size_label str              = 32B
llama_model_loader: - kv   5:                            general.license str              = apache-2.0
llama_model_loader: - kv   6:                       general.license.link str              = https://huggingface.co/Qwen/QWQ-32B/b...
llama_model_loader: - kv   7:                   general.base_model.count u32              = 1
llama_model_loader: - kv   8:                  general.base_model.0.name str              = Qwen2.5 32B
llama_model_loader: - kv   9:          general.base_model.0.organization str              = Qwen
llama_model_loader: - kv  10:              general.base_model.0.repo_url str              = https://huggingface.co/Qwen/Qwen2.5-32B
llama_model_loader: - kv  11:                               general.tags arr[str,2]       = ["chat", "text-generation"]
llama_model_loader: - kv  12:                          general.languages arr[str,1]       = ["en"]
llama_model_loader: - kv  13:                          qwen2.block_count u32              = 64
llama_model_loader: - kv  14:                       qwen2.context_length u32              = 131072
llama_model_loader: - kv  15:                     qwen2.embedding_length u32              = 5120
llama_model_loader: - kv  16:                  qwen2.feed_forward_length u32              = 27648
llama_model_loader: - kv  17:                 qwen2.attention.head_count u32              = 40
llama_model_loader: - kv  18:              qwen2.attention.head_count_kv u32              = 8
llama_model_loader: - kv  19:                       qwen2.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv  20:     qwen2.attention.layer_norm_rms_epsilon f32              = 0.000010
llama_model_loader: - kv  21:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  22:                         tokenizer.ggml.pre str              = qwen2
llama_model_loader: - kv  23:                      tokenizer.ggml.tokens arr[str,152064]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  24:                  tokenizer.ggml.token_type arr[i32,152064]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  25:                      tokenizer.ggml.merges arr[str,151387]  = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
llama_model_loader: - kv  26:                tokenizer.ggml.eos_token_id u32              = 151645
llama_model_loader: - kv  27:            tokenizer.ggml.padding_token_id u32              = 151643
llama_model_loader: - kv  28:                tokenizer.ggml.bos_token_id u32              = 151643
llama_model_loader: - kv  29:               tokenizer.ggml.add_bos_token bool             = false
llama_model_loader: - kv  30:                    tokenizer.chat_template str              = {%- if tools %}\n    {{- '<|im_start|>...
llama_model_loader: - kv  31:               general.quantization_version u32              = 2
llama_model_loader: - kv  32:                          general.file_type u32              = 30
llama_model_loader: - type  f32:  321 tensors
llama_model_loader: - type q5_K:   72 tensors
llama_model_loader: - type q6_K:    1 tensors
llama_model_loader: - type iq4_xs:  377 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = IQ4_XS - 4.25 bpw
print_info: file size   = 16.64 GiB (4.36 BPW) 
load: special tokens cache size = 26
load: token to piece cache size = 0.9311 MB
print_info: arch             = qwen2
print_info: vocab_only       = 0
print_info: n_ctx_train      = 131072
print_info: n_embd           = 5120
print_info: n_layer          = 64
print_info: n_head           = 40
print_info: n_head_kv        = 8
print_info: n_rot            = 128
print_info: n_swa            = 0
print_info: n_swa_pattern    = 1
print_info: n_embd_head_k    = 128
print_info: n_embd_head_v    = 128
print_info: n_gqa            = 5
print_info: n_embd_k_gqa     = 1024
print_info: n_embd_v_gqa     = 1024
print_info: f_norm_eps       = 0.0e+00
print_info: f_norm_rms_eps   = 1.0e-05
print_info: f_clamp_kqv      = 0.0e+00
print_info: f_max_alibi_bias = 0.0e+00
print_info: f_logit_scale    = 0.0e+00
print_info: f_attn_scale     = 0.0e+00
print_info: n_ff             = 27648
print_info: n_expert         = 0
print_info: n_expert_used    = 0
print_info: causal attn      = 1
print_info: pooling type     = 0
print_info: rope type        = 2
print_info: rope scaling     = linear
print_info: freq_base_train  = 1000000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn  = 131072
print_info: rope_finetuned   = unknown
print_info: ssm_d_conv       = 0
print_info: ssm_d_inner      = 0
print_info: ssm_d_state      = 0
print_info: ssm_dt_rank      = 0
print_info: ssm_dt_b_c_rms   = 0
print_info: model type       = 32B
print_info: model params     = 32.76 B
print_info: general.name     = QwQ 32B
print_info: rope_yarn_log_mul    = 0.0000
print_info: vocab type       = BPE
print_info: n_vocab          = 152064
print_info: n_merges         = 151387
print_info: BOS token        = 151643 '<|endoftext|>'
print_info: EOS token        = 151645 '<|im_end|>'
print_info: EOT token        = 151645 '<|im_end|>'
print_info: PAD token        = 151643 '<|endoftext|>'
print_info: LF token         = 198 'Ċ'
print_info: FIM PRE token    = 151659 '<|fim_prefix|>'
print_info: FIM SUF token    = 151661 '<|fim_suffix|>'
print_info: FIM MID token    = 151660 '<|fim_middle|>'
print_info: FIM PAD token    = 151662 '<|fim_pad|>'
print_info: FIM REP token    = 151663 '<|repo_name|>'
print_info: FIM SEP token    = 151664 '<|file_sep|>'
print_info: EOG token        = 151643 '<|endoftext|>'
print_info: EOG token        = 151645 '<|im_end|>'
print_info: EOG token        = 151662 '<|fim_pad|>'
print_info: EOG token        = 151663 '<|repo_name|>'
print_info: EOG token        = 151664 '<|file_sep|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = true)
load_tensors: offloading 64 repeating layers to GPU
load_tensors: offloading output layer to GPU
load_tensors: offloaded 65/65 layers to GPU
load_tensors: RPC[192.9.200.5:50052] model buffer size =  9092.39 MiB
load_tensors:   CPU_Mapped model buffer size =   394.45 MiB
load_tensors:        CUDA0 model buffer size =  7549.71 MiB
................................................................................................
llama_context: constructing llama_context
llama_context: n_seq_max     = 1
llama_context: n_ctx         = 15104
llama_context: n_ctx_per_seq = 15104
llama_context: n_batch       = 128
llama_context: n_ubatch      = 128
llama_context: causal_attn   = 1
llama_context: flash_attn    = 1
llama_context: freq_base     = 1000000.0
llama_context: freq_scale    = 1
llama_context: yarn_log_mul  = 0
llama_context: n_ctx_per_seq (15104) < n_ctx_train (131072) -- the full capacity of the model will not be utilized
llama_context:  CUDA_Host  output buffer size =     0.58 MiB
init: kv_size = 15104, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 64, can_shift = 1
init: RPC[192.9.200.5:50052] KV buffer size =  2124.00 MiB
init:      CUDA0 KV buffer size =  1652.00 MiB
llama_context: KV self size  = 3776.00 MiB, K (f16): 1888.00 MiB, V (f16): 1888.00 MiB
llama_context: RPC[192.9.200.5:50052] compute buffer size =    40.56 MiB
llama_context:      CUDA0 compute buffer size =    81.13 MiB
llama_context:        CPU compute buffer size =     9.88 MiB
llama_context: graph nodes  = 1991
llama_context: graph splits = 3
common_init_from_params: setting dry_penalty_last_n to ctx_size = 15104
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
/usr/local/src/ai/llamacpp/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp:682: GGML_ASSERT(status) failed
[New LWP 25218]
[New LWP 25222]
[New LWP 25223]
[New LWP 25224]
[New LWP 25225]
[New LWP 25226]
[New LWP 25227]
[New LWP 25228]
[New LWP 25229]
[New LWP 25230]
[New LWP 25231]
[New LWP 25232]
[New LWP 25233]
[New LWP 25234]
[New LWP 25235]
[New LWP 25236]
[New LWP 25237]
[New LWP 25238]
[New LWP 25239]
[New LWP 25240]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f93a2d523c7 in wait4 () from /lib64/libc.so.6
#0  0x00007f93a2d523c7 in wait4 () from /lib64/libc.so.6
#1  0x00007f93a320c1c1 in ggml_abort () from /usr/lib64/libggml-base.so
#2  0x00007f93a32d369b in ggml_backend_rpc_graph_compute(ggml_backend*, ggml_cgraph*) () from /usr/lib64/libggml-rpc.so
#3  0x00007f93a32212a5 in ggml_backend_sched_graph_compute_async () from /usr/lib64/libggml-base.so
#4  0x00007f93b13c9901 in llama_context::graph_compute(ggml_cgraph*, bool) () from /usr/lib64/libllama.so
#5  0x00007f93b13cba8a in llama_context::decode(llama_batch&) () from /usr/lib64/libllama.so
#6  0x00007f93b13ccdbc in llama_decode () from /usr/lib64/libllama.so
#7  0x00000000005976d2 in common_init_from_params(common_params&) ()
#8  0x000000000049e4c1 in server_context::load_model(common_params const&) ()
#9  0x0000000000434665 in main ()
[Inferior 1 (process 25217) detached]




REMOTE:


create_backend: using CUDA backend
ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 4070, compute capability 8.9, VMM: yes
Starting RPC server on 0.0.0.0:50052, backend memory: 11810 MB
Accepted client connection, free_mem=12384534528, total_mem=12592087040
Client connection closed
Accepted client connection, free_mem=12384534528, total_mem=12592087040
Client connection closed
Accepted client connection, free_mem=12384534528, total_mem=12592087040
Client connection closed
Accepted client connection, free_mem=12384534528, total_mem=12592087040
check_node_graph_compatibility_and_refresh_copy_ops: disabling CUDA graphs due to mul_mat_id
/usr/local/bin/ll_startrpc: line 14: 25876 Segmentation fault      rpc-server -H 0.0.0.0 -p 50052

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions