Skip to content

Bug: llama-export-lora fails merging a T5 model with its LoRA adapter #8974

@cyanic-selkie

Description

@cyanic-selkie

What happened?

I ran:

./llama-export-lora -m flan-t5-small-q8_0.gguf --lora adapter_model-q8_0.gguf -o merged.gguf

Which failed with the following error:

file_input: loaded gguf from adapter_model-q8_0.gguf
merge_tensor : dec.blk.0.attn_k.weight [512, 384, 1, 1]
merge_tensor :   + dequantize base tensor from q8_0 to F32
merge_tensor :   + merging from adapter[0] type=q8_0
merge_tensor :     input_scale=1.000000 calculated_scale=1.000000 rank=32
merge_tensor :   + output type is f16
ggml/src/ggml.c:9109: fatal error
ggml/src/ggml.c:9109: fatal errorggml/src/ggml.c:9109: fatal error
ggml/src/ggml.c:9109: fatal error
ggml/src/ggml.c:9109: fatal error

ggml/src/ggml.c:9109: fatal error
./llama-export-lora(+0x4fcdb)[0x63917799ccdb]
./llama-export-lora(+0x517b7)[0x63917799e7b7]
./llama-export-lora(+0x4fcdb)[0x63917799ccdb]
./llama-export-lora(+0x61ea6)[0x6391779aeea6]
./llama-export-lora(+0x517b7)[0x63917799e7b7]
./llama-export-lora(+0x82fab)[0x6391779cffab]
./llama-export-lora(+0x61ea6)[0x6391779aeea6]
./llama-export-lora(+0x83199)[0x6391779d0199]
./llama-export-lora(+0x82fab)[0x6391779cffab]
/lib/x86_64-linux-gnu/libgomp.so.1(+0x1dc0e)[0x71844dc7cc0e]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x71844b094ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x71844b126850]
./llama-export-lora(+0x83199)[0x6391779d0199]
/lib/x86_64-linux-gnu/libgomp.so.1(+0x1dc0e)[0x71844dc7cc0e]
Aborted (core dumped)

The base model can be found here: https://huggingface.co/repetitio/flan-t5-small.
The adapter can be found here: https://huggingface.co/repetitio/distilled-simplifier.

Name and Version

version: 3560 (6afd1a9)
built with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 for x86_64-linux-gnu

What operating system are you seeing the problem on?

Linux

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-unconfirmedhigh severityUsed to report high severity bugs in llama.cpp (Malfunctioning hinder important workflow)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions