huggingface / huggingface/candle

How to load LoRA adapter along with the GGUF model?

Open
#2,226 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

Hello all,

I have recently managed to convert the flan-t5 base model to GGUF #2215 . But I also have multiple LoRA adapters trained for different tasks.

@EricLBuehler @LaurentMazare So I wish to know if there is a way to also load single/multiple LoRA adapters along with the GGUF model. I am currently running an inference using the following command:
```bash
cargo run --example quantized-t5 --release -- --weight-file "flant5large_f16.gguf" \
--config-file "flan-t5-large/config.json" \
--prompt "Make this text coherent: Their flight is weak. They run quickly through the tree canopy."
```
But I have the adapter as (adapter_model.bin and adapter_config.json), which I would like load along with this model **Without Weight Merging**.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the quantized-t5 example and the provided cargo command to trace how flant5large_f16.gguf is loaded. Then investigate how adapter_model.bin and adapter_config.json would be supplied without weight merging. Done means inference can load the GGUF model with one or more LoRA adapters.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.