antimatter15 / alpaca.cpp

Locally run an Instruction-Tuned Chat-Style LLM
MIT License
10.25k stars 910 forks source link

Coredump while running model #7

Closed txomon closed 1 year ago

txomon commented 1 year ago

Seems

 ./chat                                                                                                                                                                                                                                 
main: seed = 1679001548
llama_model_load: loading model from 'ggml-alpaca-7b-q4.bin' - please wait ...
llama_model_load: ggml ctx size = 4529.34 MB
llama_model_load: memory_size =   512.00 MB, n_mem = 16384
llama_model_load: loading model part 1/1 from 'ggml-alpaca-7b-q4.bin'
llama_model_load: .................................... done
llama_model_load: model size =  4017.27 MB / num tensors = 291

system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 | 
main: interactive mode on.
sampling parameters: temp = 0.100000, top_k = 40, top_p = 0.950000, repeat_last_n = 64, repeat_penalty = 1.300000

== Running in chat mode. ==
 - Press Ctrl+C to interject at any time.
 - Press Return to return control to LLaMa.
 - If you want to submit another line, end your input in '\'.

> Describe the sky in 50 words
The sky stretches out above us, its vastness and beauty unmatched by anything else we can see on Earth; it is a canvas of infinite possibility with stars twinkling like diamonds. The sun rises over our horizon every morning to greet the new day while clouds drift across in an endless parade of shapes and colors that never cease to amaze us, even after all these years we still marvel at their beauty; a sky full of wonderment for those who dare look up.
> Use only 50 words to describe the sky, without going over the limit
The blue and white canvas that is our ever-changing sky has been captivating us since time immemorial; its infinite beauty never ceases to amaze. The sun rises in a blaze of glory each morning while clouds drift across like dreams, painting the skies with their shades of grey or blue and white.
> Give me a summary of the lord of the rings if you know what it is, else ask
The Lord Of The Rings tells the story of Frodo Baggins (played by Elijah Wood) who has been entrusted with an important task. He must destroy his beloved Ring which he inherited from Bilbo and Gandalf before Sauron can use it to take over Middle Earth again, as happened in ages past when evil was defeated but not destroyed forever.
Frodo is accompanied by a fellowship of nine companions who are all heroes themselves: Aragorn (Viggo Mortensen), Legolas the Elf King (Orlando Bloom) and Gimli the Dwarven warrior (John Rhys-Davies). They must travel to Mount Doom in Mordor, where Sauron's fortress lies.
The journey is fraught with danger as they are pursued by Orcs led by a fearsome creature named Sharku and the evil wizard Saruman (Christopher Lee) who has allied himself against Frodo to prevent him from destroying his Ring, which he
Exception: ./chat killed by signal segmentation fault (core dumped)

The dump shows the following, without symbols:

                Stack trace of thread 7640:
                #0  0x000055e61d32ec99 n/a (/home/javier/projects/ml/alpaca.cpp/chat + 0x1ac99)
                #1  0x0000010000001000 n/a (n/a + 0x0)
                ELF object binary architecture: AMD x86-64

With symbols:

                Stack trace of thread 10301:
                #0  0x000055b4e0d244c9 n/a (/home/javier/projects/ml/alpaca.cpp/chat + 0x1d4c9)
                #1  0x0000010000001000 n/a (n/a + 0x0)
                ELF object binary architecture: AMD x86-64
totoCZ commented 1 year ago

I'm also getting a segfault after some longer conversation

jschmidtnj commented 1 year ago

me too, for me it's an issue with calling ggml_element_size in https://github.com/antimatter15/alpaca.cpp/blob/master/chat.cpp#L580 (trace with gdb)