Skip to content

Eval bug: "zsh: IOT instruction (core dumped)" in RWKV when use reverse prompt without --prompt or -p option #14513

Open
@bsahd

Description

@bsahd

Name and Version

% llama-cli --version
load_backend: loaded RPC backend from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-rpc.so
load_backend: loaded CPU backend from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-cpu-haswell.so
version: 5815 (d4cdd9c)
built with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 for x86_64-linux-gnu


I'm using llama-b5815-bin-ubuntu-x64.zip

Operating systems

Linux

GGML backends

CPU

Hardware

AMD Ryzen 5 3500U

Models

https://huggingface.co/zhiyuan8/RWKV-v7-0.1B-G1-GGUF/blob/main/rwkv7-0.1B-g1-F16.gguf

Problem description & steps to reproduce

Crashes with "zsh: IOT instruction (core dumped)" when using reverse prompt.
Crash occurs regardless of whether --no-mmap is used or not.
Also occurred at https://huggingface.co/zhiyuan8/RWKV-v7-1.5B-World-v3-GGUF/blob/main/rwkv7-1.5B-world-Q8_0.gguf.

First Bad Commit

No response

Relevant log output

% llama-cli --no-mmap -m rwkv7-0.1B-g1-F16.gguf -r "User:" 
load_backend: loaded RPC backend from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-rpc.so
load_backend: loaded CPU backend from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-cpu-haswell.so
build: 5815 (d4cdd9c1) with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 for x86_64-linux-gnu
main: llama backend init
main: load the model and apply lora adapter, if any
llama_model_loader: loaded meta data with 33 key-value pairs and 342 tensors from rwkv7-0.1B-g1-F16.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              = rwkv7
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = Rwkv7 0.1B G1
llama_model_loader: - kv   3:                           general.finetune str              = g1
llama_model_loader: - kv   4:                           general.basename str              = rwkv7
llama_model_loader: - kv   5:                         general.size_label str              = 0.1B
llama_model_loader: - kv   6:                            general.license str              = apache-2.0
llama_model_loader: - kv   7:                   general.base_model.count u32              = 1
llama_model_loader: - kv   8:                  general.base_model.0.name str              = Rwkv7 G1
llama_model_loader: - kv   9:          general.base_model.0.organization str              = BlinkDL
llama_model_loader: - kv  10:              general.base_model.0.repo_url str              = https://huggingface.co/BlinkDL/rwkv7-g1
llama_model_loader: - kv  11:                               general.tags arr[str,1]       = ["text-generation"]
llama_model_loader: - kv  12:                          general.languages arr[str,8]       = ["en", "zh", "ja", "ko", "fr", "ar", ...
llama_model_loader: - kv  13:                       rwkv7.context_length u32              = 1048576
llama_model_loader: - kv  14:                     rwkv7.embedding_length u32              = 768
llama_model_loader: - kv  15:                          rwkv7.block_count u32              = 12
llama_model_loader: - kv  16:         rwkv7.attention.layer_norm_epsilon f32              = 0.000010
llama_model_loader: - kv  17:                        rwkv7.wkv.head_size u32              = 64
llama_model_loader: - kv  18:            rwkv7.attention.decay_lora_rank u32              = 64
llama_model_loader: - kv  19:             rwkv7.attention.iclr_lora_rank u32              = 64
llama_model_loader: - kv  20: rwkv7.attention.value_residual_mix_lora_rank u32              = 32
llama_model_loader: - kv  21:             rwkv7.attention.gate_lora_rank u32              = 128
llama_model_loader: - kv  22:                  rwkv7.feed_forward_length u32              = 3072
llama_model_loader: - kv  23:                          general.file_type u32              = 1
llama_model_loader: - kv  24:                 rwkv7.attention.head_count u32              = 0
llama_model_loader: - kv  25:                       tokenizer.ggml.model str              = rwkv
llama_model_loader: - kv  26:                      tokenizer.ggml.tokens arr[str,65536]   = ["<s>", "\\x00", "\\x01", "\\x02", "\...
llama_model_loader: - kv  27:                  tokenizer.ggml.token_type arr[i32,65536]   = [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  28:                tokenizer.ggml.bos_token_id u32              = 0
llama_model_loader: - kv  29:                tokenizer.ggml.eos_token_id u32              = 0
llama_model_loader: - kv  30:                tokenizer.ggml.eot_token_id u32              = 261
llama_model_loader: - kv  31:                    tokenizer.chat_template str              = rwkv-world
llama_model_loader: - kv  32:               general.quantization_version u32              = 2
llama_model_loader: - type  f32:  196 tensors
llama_model_loader: - type  f16:  146 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = F16
print_info: file size   = 367.15 MiB (16.11 BPW) 
load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
load: special_eot_id is not in special_eog_ids - the tokenizer config may be incorrect
load: special tokens cache size = 1
load: token to piece cache size = 0.3561 MB
print_info: arch             = rwkv7
print_info: vocab_only       = 0
print_info: n_ctx_train      = 1048576
print_info: n_embd           = 768
print_info: n_layer          = 12
print_info: n_head           = 0
print_info: n_head_kv        = 0
print_info: n_rot            = 0
print_info: n_swa            = 0
print_info: is_swa_any       = 0
print_info: n_embd_head_k    = 0
print_info: n_embd_head_v    = 0
print_info: n_gqa            = 0
print_info: n_embd_k_gqa     = 0
print_info: n_embd_v_gqa     = 0
print_info: f_norm_eps       = 1.0e-05
print_info: f_norm_rms_eps   = 0.0e+00
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             = 3072
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        = -1
print_info: rope scaling     = linear
print_info: freq_base_train  = 10000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn  = 1048576
print_info: rope_finetuned   = unknown
print_info: model type       = 190M
print_info: model params     = 191.13 M
print_info: general.name     = Rwkv7 0.1B G1
print_info: vocab type       = RWKV
print_info: n_vocab          = 65536
print_info: n_merges         = 0
print_info: BOS token        = 0 '<s>'
print_info: EOS token        = 0 '<s>'
print_info: EOT token        = 261 '\n\n'
print_info: LF token         = 11 '\n'
print_info: EOG token        = 0 '<s>'
print_info: EOG token        = 261 '\n\n'
print_info: max token length = 192
load_tensors: loading model tensors, this can take a while... (mmap = false)
load_tensors: offloading 0 repeating layers to GPU
load_tensors: offloaded 0/13 layers to GPU
load_tensors:          CPU model buffer size =   367.15 MiB
......................................
llama_context: constructing llama_context
llama_context: n_seq_max     = 1
llama_context: n_ctx         = 4096
llama_context: n_ctx_per_seq = 4096
llama_context: n_batch       = 2048
llama_context: n_ubatch      = 512
llama_context: causal_attn   = 1
llama_context: flash_attn    = 0
llama_context: freq_base     = 10000.0
llama_context: freq_scale    = 1
llama_context: n_ctx_per_seq (4096) < n_ctx_train (1048576) -- the full capacity of the model will not be utilized
llama_context:        CPU  output buffer size =     0.25 MiB
llama_memory_recurrent: mem_size = 1, n_seq_max = 1, type_r = 'f32', type_s = 'f32', n_layer = 12
llama_memory_recurrent:        CPU KV buffer size =     2.32 MiB
llama_memory_recurrent: KV self size  =    2.32 MiB, R (f32):    0.07 MiB, S (f32):    2.25 MiB
llama_context:        CPU compute buffer size =   129.50 MiB
llama_context: graph nodes  = 1420
llama_context: graph splits = 1
common_init_from_params: setting dry_penalty_last_n to ctx_size = 4096
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
Failed to infer a tool call example (possible template bug)
main: llama threadpool init, n_threads = 4
main: chat template example:
System: You are a helpful assistant

User: Hello

Assistant: Hi there

User: How are you?

Assistant:

system_info: n_threads = 4 (n_threads_batch = 4) / 8 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 | 

main: interactive mode on.
Reverse prompt: 'User:'
sampler seed: 1308970135
sampler params: 
        repeat_last_n = 64, repeat_penalty = 1.000, frequency_penalty = 0.000, presence_penalty = 0.000
        dry_multiplier = 0.000, dry_base = 1.750, dry_allowed_length = 2, dry_penalty_last_n = 4096
        top_k = 40, top_p = 0.950, min_p = 0.050, xtc_probability = 0.000, xtc_threshold = 0.100, typical_p = 1.000, top_n_sigma = -1.000, temp = 0.800
        mirostat = 0, mirostat_lr = 0.100, mirostat_ent = 5.000
sampler chain: logits -> logit-bias -> penalties -> dry -> top-n-sigma -> top-k -> typical -> top-p -> min-p -> xtc -> temp-ext -> dist 
generate: n_ctx = 4096, n_batch = 2048, n_predict = -1, n_keep = 0

== Running in interactive mode. ==
 - Press Ctrl+C to interject at any time.
 - Press Return to return control to the AI.
 - To return control without starting a new line, end your input with '/'.
 - If you want to submit another line, end your input with '\'.
 - Not using system message. To change it, set a different value via -sys PROMPT

[New LWP 8041]
[New LWP 8040]
[New LWP 8039]
[New LWP 8035]

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will be skipped when stepping.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f4102f88e22 in ?? () from /usr/lib/libc.so.6
#0  0x00007f4102f88e22 in ?? () from /usr/lib/libc.so.6
#1  0x00007f4102f7cfda in ?? () from /usr/lib/libc.so.6
#2  0x00007f4102f7d024 in ?? () from /usr/lib/libc.so.6
#3  0x00007f4102fed92f in wait4 () from /usr/lib/libc.so.6
#4  0x00007f41035db16b in ggml_print_backtrace () from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-base.so
#5  0x00007f41035ebc8f in ggml_uncaught_exception() () from /home/bsahd/llama.cpp-prebuilt/build/bin/libggml-base.so
#6  0x00007f41032b1c1a in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
warning: 48     /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc: そのようなファイルやディレクトリはありません
#7  0x00007f41032975db in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
58      in /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc
#8  0x00007f41032b1ed6 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7f4103484d90 <typeinfo for std::runtime_error>, dest=0x7f41032c99b0 <std::runtime_error::~runtime_error()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
warning: 98     /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc: そのようなファイルやディレクトリはありません
#9  0x000055d87117e258 in common_sampler_last(common_sampler const*) [clone .cold] ()
#10 0x000055d8711878bd in main ()
[Inferior 1 (process 8034) detached]
terminate called after throwing an instance of 'std::runtime_error'
  what():  ring buffer: index out of bounds
zsh: IOT instruction (core dumped)  llama-cli --no-mmap -cnv -m rwkv7-0.1B-g1-F16.gguf -r "User:"

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