Skip to content

Error with converting safetensors / gguf to vindex #16

@DericHuynh

Description

@DericHuynh

When running larql convert safetensors-to-vindex google/ -o gemma-3-4b.vindex --f16 on a valid set of safetensors or gguf and tokenizer.json on cachyos (aarch), rust panics.

~/git/larql-feat-init 31s
❯ RUST_BACKTRACE=full larql convert safetensors-to-vindex  google/ -o gemma-3-4b.vindex --f16
Loading safetensors: google/
Extracting to gemma-3-4b.vindex
    Whole-word vocab: 135881 tokens (of 262144)

thread 'main' (743019) panicked at /home/deric/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ndarray-0.16.1/src/linalg/impl_linalg.rs:298:5:
ndarray: inputs 262208 × 2560 and 10240 × 1024 are not compatible for matrix multiplication
stack backtrace:
   0:     0x556930012fc2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1851ca2a850bd9a9
   1:     0x5569300276e7 - core::fmt::write::h22467d3ad5dd5554
   2:     0x55692ffdda66 - std::io::Write::write_fmt::h5e3b6a876f7a20bf
   3:     0x55692fff1719 - std::panicking::default_hook::{{closure}}::he43c3ac33dfa4b50
   4:     0x55692fff1579 - std::panicking::default_hook::hd124da54acf1152f
   5:     0x55692fff1a0b - std::panicking::panic_with_hook::h9b5f1f19954f65a8
   6:     0x55692fff17d8 - std::panicking::panic_handler::{{closure}}::hf431df8c849ee0d6
   7:     0x55692ffebe99 - std::sys::backtrace::__rust_end_short_backtrace::hf97362b31a346cc0
   8:     0x55692ffd0e7d - __rustc[9e6a08e89e4b9111]::rust_begin_unwind
   9:     0x556930032b9c - core::panicking::panic_fmt::ha4414e4328fe24a0
  10:     0x55692ff6fb35 - ndarray::linalg::impl_linalg::dot_shape_error::h56d5142dc48b1f32
  11:     0x55692ff6f8e4 - <ndarray::ArrayBase<S,ndarray::dimension::dim::Dim<[usize; 2]>> as ndarray::linalg::impl_linalg::Dot<ndarray::ArrayBase<S2,ndarray::dimension::dim::Dim<[usize; 2]>>>>::dot::h8301c382f1aa28df
  12:     0x55692ff6f21f - <larql_compute::cpu::CpuBackend as larql_compute::backend::ComputeBackend>::matmul::hba77e4949c454ff2
  13:     0x55692fa0ba9d - larql_vindex::extract::build::build_vindex::heb5cc895351981b5
  14:     0x55692f6faed6 - larql::commands::extraction::convert_cmd::run::h5bc790d0bfa844ce
  15:     0x55692f60651b - larql::main::h21b86c96f06b95f7
  16:     0x55692f694573 - std::sys::backtrace::__rust_begin_short_backtrace::h3ea2312b58d38566
  17:     0x55692f6d55b9 - std::rt::lang_start::{{closure}}::hfc1c571e4dd0af9b
  18:     0x55692ffdfb26 - std::rt::lang_start_internal::hb84cc625940d332a
  19:     0x55692f625165 - main
  20:     0x7f72e3a27c4e - <unknown>
  21:     0x7f72e3a27d8b - __libc_start_main
  22:     0x55692f54b7e5 - _start
  23:                0x0 - <unknown>

Image
OS: CachyOS x86_64
Host: 82JQ (Legion 5 Pro 16ACH6H)
Kernel: Linux 6.19.9-1-cachyos
Shell: fish 4.5.0
CPU: AMD Ryzen 7 5800H (16) @ 3.20 GHz
GPU: NVIDIA GeForce RTX 3070 Mobile / Max-Q [Discrete]
Memory: 5.67 GiB / 31.19 GiB (18%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions