Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL 中执行失败 #40

Open
L-jasmine opened this issue Dec 20, 2024 · 8 comments
Open

WSL 中执行失败 #40

L-jasmine opened this issue Dec 20, 2024 · 8 comments

Comments

@L-jasmine
Copy link

我的 wsl2 是经过配置 可以正常运行 whisper 和 llama.cpp 的。可以识别到 cuda。 然后我按 readme build 之后运行,程序崩溃。

./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf ~/ai/python/
GPT-SoVITS/onnx/xww/ref.wav
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-q8_0.gguf'
sense_voice_init_with_params_no_state: use gpu    = 1
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 1
sense_voice_init_with_params_no_state: backends   = 1
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 422080
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 7
sense_voice_model_load: vocab[25055] loaded
[1]    39238 segmentation fault (core dumped)  ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf

gdb

(base) ➜  build git:(main) gdb
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf
Undefined command: ".".  Try "help".
(gdb) start bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf -f ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav
No symbol table loaded.  Use the "file" command.
(gdb) file
No executable file now.
No symbol file now.
(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) file bin/sense-voice-main
Reading symbols from bin/sense-voice-main...
(gdb) start -m ~/ai/models/sense-voice-small-q8_0.gguf -f ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav
Temporary breakpoint 1 at 0xf9f2: file /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc, line 418.
Starting program: /home/csh/ai/SenseVoice.cpp/build/bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf -f ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Temporary breakpoint 1, main (argc=5, argv=0x7fffffffda68) at /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:418
418     int main(int argc, char ** argv) {
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/csh/ai/SenseVoice.cpp/build/bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf -f ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-q8_0.gguf'
sense_voice_init_with_params_no_state: use gpu    = 1
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 1
sense_voice_init_with_params_no_state: backends   = 1
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 422080
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 7
sense_voice_model_load: vocab[25055] loaded

Program received signal SIGSEGV, Segmentation fault.
0x0000555555637974 in ggml_backend_get_default_buffer_type (backend=0x0) at /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/third-party/ggml/src/ggml-backend.cpp:217
217         return ggml_backend_dev_buffer_type(backend->device);
@lovemefan
Copy link
Owner

先使用-ng 参数。要支持cuda,需要在cmake的时候加上-DGGML_CUDA=ON

@lovemefan
Copy link
Owner

感谢反馈,后续增加更多提示信息

@L-jasmine
Copy link
Author

但是我加上了 -DGGML_CUDA=ON 重新build 还是崩溃

(base) ➜  build git:(main) ✗ ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav

sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-q8_0.gguf'
sense_voice_init_with_params_no_state: use gpu    = 1
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
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 3060 Laptop GPU, compute capability 8.6, VMM: yes
register_backend: registered backend CUDA (1 devices)
register_device: registered device CUDA0 (NVIDIA GeForce RTX 3060 Laptop GPU)
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 2
sense_voice_init_with_params_no_state: backends   = 2
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 422080
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 7
sense_voice_model_load: vocab[25055] loaded
sense_voice_backend_init_gpu: using CUDA0 backend
sense_voice_model_load: CUDA0 total size =   290.68 MB
sense_voice_model_load: n_tensors: 1197
sense_voice_model_load: load SenseVoiceSmall takes 1.078000 second
sense_voice_backend_init_gpu: using CUDA0 backend
sense_voice_backend_init: using CPU backend
sense_voice_init_state: kv pad  size  =    3.67 MB
[1]    80461 segmentation fault (core dumped)  ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf
(base) ➜  build git:(main) ✗
(base) ➜  build git:(main) ✗ ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav -ng
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-q8_0.gguf'
sense_voice_init_with_params_no_state: use gpu    = 0
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
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 3060 Laptop GPU, compute capability 8.6, VMM: yes
register_backend: registered backend CUDA (1 devices)
register_device: registered device CUDA0 (NVIDIA GeForce RTX 3060 Laptop GPU)
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 2
sense_voice_init_with_params_no_state: backends   = 2
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 422080
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 7
sense_voice_model_load: vocab[25055] loaded
sense_voice_model_load: CPU total size =   290.68 MB
sense_voice_model_load: n_tensors: 1197
sense_voice_model_load: load SenseVoiceSmall takes 1.022000 second
sense_voice_backend_init_gpu: using CUDA0 backend
sense_voice_backend_init: using CPU backend
sense_voice_init_state: kv pad  size  =    3.67 MB
[1]    80719 segmentation fault (core dumped)  ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf  -ng

@L-jasmine
Copy link
Author

(base) ➜  SenseVoice.cpp git:(main) ✗ rm -rf build
(base) ➜  SenseVoice.cpp git:(main) ✗ mkdir build && cd build
(base) ➜  build git:(main) ✗ cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j 8
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE is Debug
-- Found Git: /usr/bin/git (found version "2.34.1")
_: 1: --version: not found
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Adding CPU backend variant ggml-cpu: -march=native
-- Configuring done
-- Generating done
-- Build files have been written to: /home/csh/ai/SenseVoice.cpp/build
[  6%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
[  6%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
[  9%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.o
[ 12%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.o
[ 16%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-aarch64.c.o
[ 19%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.o
[ 22%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
[ 25%] Linking CXX static library ../../../../../lib/libggml-base.a
[ 25%] Built target ggml-base
[ 29%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o
[ 41%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/mmq.cpp.o
[ 41%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.c.o
[ 41%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/amx.cpp.o
[ 41%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.o
[ 45%] Building C object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-quants.c.o
[ 48%] Linking CXX static library ../../../../../lib/libggml-cpu.a
[ 48%] Built target ggml-cpu
[ 51%] Building CXX object sense-voice/csrc/third-party/ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.o
[ 54%] Linking CXX static library ../../../../../lib/libggml.a
[ 54%] Built target ggml
[ 61%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/sense-voice-frontend.cc.o
[ 61%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/common.cc.o
[ 64%] Building CXX object examples/CMakeFiles/common.dir/common-ggml.cc.o
[ 67%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/fftsg.cc.o
[ 70%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/sense-voice-encoder.cc.o
[ 74%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/sense-voice.cc.o
[ 77%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/sense-voice-decoder.cc.o
[ 80%] Building CXX object sense-voice/csrc/CMakeFiles/sense-voice-core.dir/silero-vad.cc.o
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc: In function ‘bool sense_voice_model_load(const char*, sense_voice_context&)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:101:25: warning: unused variable ‘key’ [-Wunused-variable]
  101 |             const char *key = gguf_get_key(gguf_ctx, i);
      |                         ^~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:157:22: warning: unused variable ‘scale’ [-Wunused-variable]
  157 |         const size_t scale = sense_voice.hparams.ftype ? 1 : 2;
      |                      ^~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:200:32: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘const int’ [-Wsign-compare]
  200 |         for (uint32_t i = 0; i < n_vocab; i++) {
      |                              ~~^~~~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/silero-vad.cc: In function ‘ggml_cgraph* silero_vad_build_graph(sense_voice_context&, sense_voice_state&)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/silero-vad.cc:25:17: warning: unused variable ‘hparams’ [-Wunused-variable]
   25 |     const auto &hparams = ctx.model.hparams;
      |                 ^~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc: In function ‘int sense_voice_pcm_to_feature_with_state(sense_voice_context*, sense_voice_state*, std::vector<double>&, bool, int)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:721:19: warning: unused variable ‘n_ctx’ [-Wunused-variable]
  721 |         const int n_ctx = state->feature.n_len;
      |                   ^~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/silero-vad.cc: In function ‘bool silero_vad_encode_internal(sense_voice_context&, sense_voice_state&, std::vector<float>, int, const double&)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/silero-vad.cc:202:1: warning: control reaches end of non-void function [-Wreturn-type]
  202 | }
      | ^
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice-decoder.cc:22:29: warning: ‘ggml_tensor* ggml_mul_mat_pad(ggml_context*, ggml_tensor*, ggml_tensor*, int)’ defined but not used [-Wunused-function]
   22 | static struct ggml_tensor * ggml_mul_mat_pad(struct ggml_context * ctx, struct ggml_tensor * x, struct ggml_tensor * y, int pad = 32) {
      |                             ^~~~~~~~~~~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice-frontend.cc: In function ‘void fbank_feature_worker_thread(int, const std::vector<double>&, const std::vector<double>&, int, int, int, int, sense_voice_feature&)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice-frontend.cc:79:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double>::size_type’ {aka ‘long unsigned in’} [-Wsign-compare]
   79 |         for (int k = frame_size; k < window.size(); k++) {
      |                                  ~~^~~~~~~~~~~~~~~
[ 83%] Linking CXX static library ../../lib/libsense-voice-core.a
[ 83%] Built target sense-voice-core
[ 87%] Building CXX object sense-voice/CMakeFiles/sense-voice-main.dir/csrc/main.cc.o
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc: In function ‘int main(int, char**)’:
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:551:33: warning: operation on ‘offset’ may be undefined [-Wsequence-point]
  551 |             int offset = offset = CHUNK_SIZE - CONTEXT_SIZE;
      |                                 ^
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:575:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  575 |             for (int i = 0; i < pcmf32.size(); i += CHUNK_SIZE){
      |                             ~~^~~~~~~~~~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:580:68: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  580 |                     if (j > 0 && j < i + CONTEXT_SIZE - n_pad && j < pcmf32.size()){
      |                                                                  ~~^~~~~~~~~~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:589:46: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  589 |                 for (int j = CONTEXT_SIZE; j < chunk.size(); j++) {
      |                                            ~~^~~~~~~~~~~~~~
/home/csh/ai/SenseVoice.cpp/sense-voice/csrc/main.cc:705:110: warning: comparison of integer expressions of different signedness: ‘std::vector<double>::size_type’ {aka ‘long unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
  705 | speech_start != 0 && current_speech_end != 0 && pcmf32.size() - current_speech_start > min_speech_samples){
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

[ 90%] Linking CXX static library ../lib/libcommon.a
[ 93%] Linking CXX executable ../bin/sense-voice-main
[ 93%] Built target common
[ 96%] Building CXX object examples/quantize/CMakeFiles/sense-voice-quantize.dir/quantize.cc.o
[ 96%] Built target sense-voice-main
/home/csh/ai/SenseVoice.cpp/examples/quantize/quantize.cc: In function ‘bool sense_voice_model_quantize(const string&, const string&, ggml_ftype)’:
/home/csh/ai/SenseVoice.cpp/examples/quantize/quantize.cc:48:25: warning: unused variable ‘key’ [-Wunused-variable]
   48 |             const char *key = gguf_get_key(gguf_ctx, i);
      |                         ^~~
/home/csh/ai/SenseVoice.cpp/examples/quantize/quantize.cc:112:32: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘const int’ [-Wsign-compare]
  112 |         for (uint32_t i = 0; i < n_vocab; i++) {
      |                              ~~^~~~~~~~~
/home/csh/ai/SenseVoice.cpp/examples/quantize/quantize.cc:55:19: warning: unused variable ‘t_start_ms’ [-Wunused-variable]
   55 |     const int64_t t_start_ms = ggml_time_ms();
      |                   ^~~~~~~~~~
[100%] Linking CXX executable ../../bin/sense-voice-quantize
[100%] Built target sense-voice-quantize
(base) ➜  build git:(main) ✗ ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf ~/ai/python/GPT-SoVITS/onnx/xww/ref.wav -ng
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-q8_0.gguf'
sense_voice_init_with_params_no_state: use gpu    = 0
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 1
sense_voice_init_with_params_no_state: backends   = 1
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 422080
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 7
sense_voice_model_load: vocab[25055] loaded
sense_voice_model_load: CPU total size =   290.68 MB
sense_voice_model_load: n_tensors: 1197
sense_voice_model_load: load SenseVoiceSmall takes 0.928000 second
sense_voice_backend_init: using CPU backend
sense_voice_init_state: kv pad  size  =    3.67 MB
[1]    83988 segmentation fault (core dumped)  ./bin/sense-voice-main -m ~/ai/models/sense-voice-small-q8_0.gguf  -ng

@L-jasmine
Copy link
Author

@lovemefan 疑似模型损坏
我在 SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:325 加了一个断点,然后 p vad_model.model->stft.forward_basis_buffer 得到的是 0x0.

(base) ➜  build git:(main) ✗ gdb
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file bin/sense-voice-main
Reading symbols from bin/sense-voice-main...
(gdb) run -m ~/ai/models/sense-voice-small-fp16.gguf -f ref.wav -ng
Starting program: /home/csh/ai/SenseVoice.cpp/build/bin/sense-voice-main -m ~/ai/models/sense-voice-small-fp16.gguf -f ref.wav -ng
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-fp16.gguf'
sense_voice_init_with_params_no_state: use gpu    = 0
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 1
sense_voice_init_with_params_no_state: backends   = 1
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 421984
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 1
sense_voice_model_load: vocab[25055] loaded
sense_voice_model_load: CPU total size =   468.98 MB
sense_voice_model_load: n_tensors: 1197
sense-voice-main: /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:325: bool sense_voice_model_load(const char*, sense_voice_context&): Assertion `vad_model.model->stft.forward_basis_buffer!=nullptr' failed.

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737347827648) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) b /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:325
Breakpoint 1 at 0x555555598fa5: file /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc, line 325.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/csh/ai/SenseVoice.cpp/build/bin/sense-voice-main -m ~/ai/models/sense-voice-small-fp16.gguf -f ref.wav -ng
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
sense_voice_small_init_from_file_with_params_no_state: loading model from '/home/csh/ai/models/sense-voice-small-fp16.gguf'
sense_voice_init_with_params_no_state: use gpu    = 0
sense_voice_init_with_params_no_state: flash attn = 0
sense_voice_init_with_params_no_state: gpu_device = 0
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (12th Gen Intel(R) Core(TM) i7-12700H)
sense_voice_init_with_params_no_state: devices    = 1
sense_voice_init_with_params_no_state: backends   = 1
sense_voice_model_load: version:      3
sense_voice_model_load: alignment:   32
sense_voice_model_load: data offset: 421984
sense_voice_model_load: loading model
sense_voice_model_load: n_vocab = 25055
sense_voice_model_load: n_encoder_hidden_state = 512
sense_voice_model_load: n_encoder_linear_units = 2048
sense_voice_model_load: n_encoder_attention_heads  = 4
sense_voice_model_load: n_encoder_layers = 50
sense_voice_model_load: n_mels  = 80
sense_voice_model_load: ftype  = 1
sense_voice_model_load: vocab[25055] loaded
sense_voice_model_load: CPU total size =   468.98 MB
sense_voice_model_load: n_tensors: 1197

Breakpoint 1, sense_voice_model_load (path_model=0x55555576d9b0 "/home/csh/ai/models/sense-voice-small-fp16.gguf", sctx=...) at /home/csh/ai/SenseVoice.cpp/sense-voice/csrc/sense-voice.cc:325
325                 assert(vad_model.model->stft.forward_basis_buffer!=nullptr);
(gdb) p vad_model.model->stft.forward_basis_buffer
$1 = (ggml_tensor *) 0x0
(gdb)

@lovemefan
Copy link
Owner

更新了最新的模型吗?modelscope有最新的模型

@L-jasmine
Copy link
Author

更新了最新的模型吗?modelscope有最新的模型

huggingface 下的,huggingface的过时了?

@lovemefan
Copy link
Owner

lovemefan commented Dec 20, 2024

hugging face 还没来及上传最新的模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants