Per-request LoRA adapters on the NPU (Qwen3.5), or a supported merged-model path?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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!
- 主要语言
- C++
- 星标
- 2.1k
- 派生
- 184
- 平均合并
- 12 小时 22 分钟
- 30 天内合并 PR
- 239
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ROCm/FastFlowLM 的其他 Issue
-
Update Gemma tokenizer.json after Google's recent fix可能已有人在做 @four1er 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ROCm/FastFlowLM#1057 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ROCm/FastFlowLM#757 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
ROCm/FastFlowLM#744 · 2 条评论 ·
维护者通常 1 天内回复
-
Truncated tool call is emitted as a complete one (unterminated heredoc reaches the client)可能已有人在做 @Javinator9889 于 72 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
ROCm/FastFlowLM#741 · 1 条评论 ·
维护者通常 1 天内回复
-
Download timeout可能已有人在做 @stdevPavelmc 于 200 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
ROCm/FastFlowLM#520 · 7 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
difficulty:easy func:gui prio:normal type:bug
难度 2/5 1-3 小时 新手友好度 78/100
NatronGitHub/Natron#2118 ·
维护者通常 1 天内回复
-
Bug
难度 1/5 1 小时以内 新手友好度 82/100
-
bug difficulty:easy prio:low
难度 2/5 1-3 小时 新手友好度 72/100
NatronGitHub/openfx-io#523 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
ArduPilot/ardupilot_gazebo#195 ·