Per-request LoRA adapters on the NPU (Qwen3.5), or a supported merged-model path?
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cpp
- Bereich
- embedded-iot, machine-learning
Rechercherichtung
The issue points to NPU kernels, flm serve, the converter, and model_list.json, but does not identify implementation files or tests. Start by reading the converter and model loading and request paths to determine whether adapter support or faster switching has an existing entry point. Done means maintainers clarify the supported LoRA and merged-model paths and whether multiple models can stay resident; the issue leaves these design choices open.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi, and thanks for FastFlowLM. This follows up #219 (fine-tuned models, "on the roadmap") and #828 (the converter).
We'd like to run small LoRA adapters over qwen3.5:2b on XDNA 2: rank 32–64, F16, on the attention projections. We'd switch them per request, the way llama-server does it (--lora <file> at start, then a lora field in each request), so that one loaded model serves the base and several adapters.
What we tried, on a Ryzen AI 7 350 with FLM 1.0.10 and 1.0.12:
-
We found no adapter input: no request field, no CLI option, no model-folder file.
-
Merging the adapter into the weights works. We folded it into the BF16 GGUF, quantized to Q4_K, converted the result with ROCm/FLM_Q4NX_Converter (93b8398), and registered it as its own model in model_list.json. It loads on the NPU and runs at the base model's speed.
-
But each adapter is then a separate 1.34 GB model. Switching models in one
flm servetakes 8–16 s (a full load), against about 1 s for the same model again. -
The converter's output from the same BF16 doesn't match the shipped Qwen3.5-2B-NPU2
model.q4nx:- only about 57–66% of a projection's bytes are equal;
- the shipped file has
.bf16copies of the linear-attention alpha/beta that the converter doesn't write; - its lm_head is int8.
So we spliced only the adapted tensors into a copy of the shipped file. Even then, requantizing them adds rounding noise about twice the size of a small adapter's own change.
Questions:
- Are LoRA adapters planned for the NPU kernels, per request or at least per load? If so, roughly in what shape: file format, ranks, which projections (Qwen3.5's linear-attention qkv and out included?), F16 or quantized?
- If not soon, do you consider the merged-model route (the converter plus a model_list.json entry) supported across releases? Could the converter reproduce the shipped models' layout (the
.bf16copies, the int8 lm_head)? Or could the recipe for the shipped Qwen3.5 models be published? Either way, a merged model would then differ from the shipped one only by the adapter. - Is there a faster way to switch between two models of the same architecture than a full load? For example, keeping both resident when the NPU's memory allows.
We're happy to test a pre-release. Thanks!
- Vorherrschende Sprache
- C++
- Sterne
- 2.1k
- Forks
- 184
- Ø Merge
- 12 Std. 22 Min.
- Gemergte PRs (30 T.)
- 239
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ROCm/FastFlowLM
-
Update Gemma tokenizer.json after Google's recent fixEvtl. vergeben @four1er hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ROCm/FastFlowLM#1057 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ROCm/FastFlowLM#757 ·
Maintainer antworten meist innerhalb von 1 Tag
-
No valid checkpoint to restore + Max length reached on multi-turn tool calls (Qwen3.6-MoE, NPU)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
ROCm/FastFlowLM#744 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Truncated tool call is emitted as a complete one (unterminated heredoc reaches the client)Evtl. vergeben @Javinator9889 hat das vor 72 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ROCm/FastFlowLM#741 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Download timeoutEvtl. vergeben @stdevPavelmc hat das vor 200 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
ROCm/FastFlowLM#520 · 7 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ROCm/FastFlowLM
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
riscv-software-src/riscv-isa-sim#2640 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
difficulty:easy func:gui prio:normal type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NatronGitHub/Natron#2118 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
-
mechanics UI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
endless-sky/endless-sky#12949 ·
Maintainer antworten meist innerhalb von 1 Tag