Qwen3.5 LumenRAW Optimize (4B)

A fine-tune of Qwen3.5-4B for LUMEN RAW, a RAW photo editor. It does two jobs, locally and in Chinese or English:

  • Natural-language editing: turns a request such as "ๅŽ‹ๆš—ๅคฉ็ฉบ๏ผŒไฟ็•™ไบ‘ๅฑ‚" or "make it warmer", with the photo's statistics and optionally a preview image, into LUMEN RAW's edit JSON (global sliders, HSL, colour grading, curves, LUT strength, AI masks for sky / subject / water / vegetation โ€ฆ).
  • Operating LUMEN RAW through its 32 MCP tools: import, open, edit, masks, ratings, export, save.

It is not a general chat model. It expects the prompts LUMEN RAW's tools use, which are in prompts/.

It was trained with LoRA on answers from a larger teacher model, DeepSeek-V4.1-Flash-1017 (through DeepSeek's API). The training set included 400 corrections, cases where the teacher took over from this model's own mistakes (section Training).

Files

File Size Use
qwen3.5-lumenraw-optimize-Q4_K_M.gguf 2.8 GB The model for llama.cpp / LM Studio (recommended)
qwen3.5-lumenraw-optimize-Q8_0.gguf 4.6 GB Same model, 8-bit: no dangerous action in the tests, 20โ€“35% slower
mmproj-qwen3.5-lumenraw-optimize-f16.gguf 0.67 GB Vision encoder (needed for requests with a preview image)
adapter/ 85 MB The LoRA adapter for Qwen/Qwen3.5-4B (revision 851bf6e), PEFT format
prompts/system_prompt.txt System prompt for natural-language editing
prompts/agent_prompt.txt, prompts/tools.json System prompt and tool definitions (OpenAI function format) for tool use

Usage

Tested on Windows on 2026-11-17 with LM Studio 0.4.14, Ollama 0.40.16 and llama.cpp, each with a picture.

LM Studio: search qwen3.5-lumenraw-optimize in Discover and download Q4_K_M (3.49 GB; the vision file comes with it). Set the context length to 8192 or more, then load it. The local server is http://127.0.0.1:1234/v1, model id qwen3.5-lumenraw-optimize.

Ollama: ollama run hf.co/H3tY/qwen3.5-lumenraw-optimize:Q4_K_M downloads the model and the vision file (3.5 GB in all).

In LUMEN RAW 2.3: open the natural-language panel's settings, choose LM Studio or Ollama, pick this model, set thinking to off and tick the preview image option. LUMEN RAW 2.3 sends its own built-in prompt rather than prompts/system_prompt.txt, and with it this model did 88.0% of the held-out set (the original Qwen3.5-4B: 82.9%), against 98.1% with the prompt it was trained on.

llama.cpp:

llama-server -m qwen3.5-lumenraw-optimize-Q4_K_M.gguf --mmproj mmproj-qwen3.5-lumenraw-optimize-f16.gguf \
    --jinja -c 32768 -ngl 999

Thinking is off by default. The model was trained and tested with thinking off, so its chat template leaves thinking out unless a request sets "chat_template_kwargs": {"enable_thinking": true}. The tests used temperature: 0.3.

Natural-language editing. The system message is prompts/system_prompt.txt. The user message has the form LUMEN RAW builds:

็…ง็‰‡ไฟกๆฏ๏ผš{"ๆ ผๅผ": "NEF", "ๅฐบๅฏธ": "6048 ร— 4024", "็›ธๆœบ": "โ€ฆ", โ€ฆ}
ๅฝ“ๅ‰ๆ•ˆๆžœ็š„็ปŸ่ฎกไฟกๆฏ๏ผš{"ไบฎๅบฆๅˆ†ไฝ๏ผˆ0โ€“1๏ผ‰": {โ€ฆ}, "้ซ˜ๅ…‰ๆบขๅ‡บๆฏ”ไพ‹": 0.003, โ€ฆ, "่‰ฒๅฝฉๅ€พๅ‘": "ๆ•ดไฝ“ๅๆš–"}
ๅฝ“ๅ‰ๅ‚ๆ•ฐ๏ผˆๆœชๅˆ—ๅ‡บ็š„้ƒฝๆ˜ฏ้ป˜่ฎคๅ€ผ๏ผ‰๏ผš{"adjustments": {"temperature": 28.0}}
็”จๆˆทๆŒ‡ไปค๏ผšๅŽ‹ๆš—ๅคฉ็ฉบ๏ผŒไฟ็•™ไบ‘ๅฑ‚

With a preview, the image (JPEG, long edge 768) goes in the same message. The answer is one JSON object, for example {"explanation": "โ€ฆ", "masks": [{"region": "sky", "adjustments": {"exposure": -0.6, "highlights": -30}}]}.

Tool use. The system message is prompts/agent_prompt.txt and the tools are prompts/tools.json. The user message is the request followed by the editor's state, e.g. Export the selected photos to E:/batch as tif\n\nCurrent photo: D:/photos/DSC_0001.NEF; selected: โ€ฆ.

Validate what the model returns before applying it, as LUMEN RAW does. Answers can occasionally be malformed (see Limitations).

Evaluation

The benchmarks were run with LUMEN RAW's own validator and command layer, with no repair of the model's output.

  • Seed set (102): hand-written cases.
  • Held-out set (158): test phrasings and test photos.
  • Hard set (260): compound, vague, multi-turn, settings-preserving and tool cases.
  • Photo set (46): vision.

No benchmark phrasing or photo was in the training data: photos are split by their sha256, and phrasings by template.

Did what was asked Seed 102 Held-out 158 Hard 260 Hard: tool cases
Teacher (DeepSeek-V4.1-Flash-1017) 97.1% 98.1% 98.5% 99.2%
Qwen3.5-4B, first round (NL only), Q4_K_M 95.1% 97.5% 88.1% 83.5%
This model, Q4_K_M 93.1% 98.1% 96.5% 100%
This model, Q8_0 97.1% 98.7% 95.0% 100%
Strictly valid as given (seed / held-out / hard) Dangerous actions (all 520) Median request time
Teacher 93.8% / 90.5% / 95.0% 1 (0.19%) 1.3โ€“1.6 s (API)
First round, Q4_K_M 97.5% / 97.3% / 97.1% 21 (4.04%) 0.5โ€“0.8 s
This model, Q4_K_M 95.0% / 97.3% / 100% 2 (0.38%) 0.5โ€“0.9 s
This model, Q8_0 96.2% / 96.0% / 99.3% 0 0.6โ€“1.2 s

The rows for this model are the files published here, re-tested on 2026-11-17. Before the re-export (see Changes) the same weights scored Q4_K_M 92.2% / 98.7% / 96.5% with 2 dangerous actions and Q8_0 96.1% / 98.7% / 95.8% with 1. Splitting the merged tensors changes the rounding of the matrix products, not the weights, so a few answers sampled at temperature 0.3 come out differently.

A dangerous action is an unrequested reset or removal of a LUT or mask, an export over an original or an existing file without being asked, or a file written when nothing should change. Local times are on one AMD RX 9070 XT. Photo set (Q4_K_M): 97.8% with statistics + image, 100% with the image only.

Limitations

  • "Export over the original file." When the user explicitly asks to export over the RAW file, the model still calls export_photo onto the original with overwrite: true. This accounts for both remaining dangerous actions. LUMEN RAW's export command refuses it, so no original is lost there. In any other host, keep such a guard: never give the model a tool that can destroy files unchecked.
  • 2/520 is a point estimate. The 95% upper bound of the dangerous-action rate is about 1.2%.
  • Changing one's mind across turns is weak. After "warmer", "็ฎ—ไบ†๏ผŒ่ฟ˜ๆ˜ฏๅ†ทไธ€็‚นๅง" should end up cooler than the original; the model often only takes some of the warmth back (6/15, teacher 15/15).
  • Occasional malformed answers. For example, an hsl object written inside the masks list, a mask exposure on a ยฑ100 scale (the range is โˆ’5โ€ฆ5 EV), or grain under adjustments instead of effects.
  • Scope. It was tested only on LUMEN RAW's tasks, in Chinese and English. The edits it proposes are AI-generated; tell your users so.

Training

  • Method: LoRA (r 16, ฮฑ 32, dropout 0).
    • Targets: q/k/v/o of the 8 full-attention layers and gate/up/down of all 32 layers.
    • 21.2 M trainable parameters (0.46% of the model). Merged, the 128 target matrices change by about 1% each (0.57โ€“1.48%).
    • Frozen: the vision encoder, the projections of the 24 linear-attention layers, the embeddings and the output layer.
  • Data: 1,016 training samples (137 more for validation), all with thinking off.
    • 666 answers from the teacher: 598 natural-language, 68 tool use.
    • 350 corrections: the first-round model answered training prompts; where it failed or did something dangerous, the teacher continued from the model's own state and only the teacher's turns were trained.
    • Photos: openly licensed (CC0) photos, training and validation splits only.
  • Schedule: 2 epochs, 342 steps of 8 examples, learning rate 1e-4, up to 16,384 tokens per example. Validation loss 0.330 โ†’ 0.324.
  • Hardware: one AMD Radeon RX 9070 XT (16 GB), ROCm PyTorch on Windows, about 14 h.

The teacher's outputs were obtained under the DeepSeek Open Platform Terms of Service (effective 2026-04-29). Section 4.2 assigns the outputs to the user and lists "training other models (such as model distillation)" as a permitted use. This model is not affiliated with or endorsed by DeepSeek, Alibaba Cloud (Qwen) or any camera maker.

Changes

  • 2026-11-17: the Q4_K_M and Q8_0 files were re-exported. The weights are unchanged. Each linear-attention layer now stores its tensors separately: attn_qkv + attn_gate and ssm_beta + ssm_alpha, row slices of the merged attn_qkv_gate and ssm_beta_alpha, with no re-quantisation. With the merged tensors, LM Studio 0.4.14 and Ollama 0.40.16 failed with "tensor 'blk.0.ssm_beta.weight' not found". The chat template was also changed to leave thinking off by default. The first files are still in the repo history.

License

Apache-2.0, like the base model (see LICENSE). Changes from Qwen3.5-4B: LoRA fine-tuning as described above, merged into the weights and quantised with llama.cpp.


ไธญๆ–‡่ฏดๆ˜Ž

็”จ้€”๏ผš ่ฟ™ๆ˜ฏ LUMEN RAW ไฟฎๅ›พ่ฝฏไปถ็š„ไธ“็”จๆœฌๅœฐๆจกๅž‹๏ผŒๅŸบไบŽ Qwen3.5-4B ๅพฎ่ฐƒ๏ผŒๅšไธคไปถไบ‹๏ผš

  • ๆŠŠไธญๆ–‡ๆˆ–่‹ฑๆ–‡็š„ไฟฎๅ›พ่ฆๆฑ‚่ฝฌๆขๆˆ LUMEN RAW ็š„ๅ‚ๆ•ฐ JSON๏ผ›
  • ้€š่ฟ‡ 32 ไธช MCP ๅทฅๅ…ทๆ“ไฝœ LUMEN RAWใ€‚

ๅฎƒไธๆ˜ฏ้€š็”จ่Šๅคฉๆจกๅž‹๏ผŒ้œ€่ฆ้…ๅˆ prompts/ ้‡Œ็š„ๆ็คบ่ฏไฝฟ็”จ๏ผŒๅนถไธ”่ฆๅ…ณ้—ญๆ€่€ƒใ€‚

่ฎญ็ปƒ๏ผš ๆ•™ๅธˆๆ˜ฏ DeepSeek-V4.1-Flash-1017๏ผŒ่ฎญ็ปƒ้›†ๅŒ…ๆ‹ฌ 400 ๆก็บ ้”™ๆ ทๆœฌ๏ผŒๅณๆ•™ๅธˆๆŽฅๆ‰‹ๆ”นๆญฃ่ฟ™ไธชๆจกๅž‹่‡ชๅทฑๅš้”™็š„ๅ›ž็ญ”ใ€‚

่ฏ„ๆต‹๏ผš Q4_K_M ็‰ˆๆœฌๅœจ็งๅญ้›†ใ€ๆต‹่ฏ•้›†ใ€ๅ›ฐ้šพ้›†ๅ…ฑ 520 ๆก้‡Œ๏ผŒๅฑ้™ฉๆ“ไฝœ 2 ๆฌก๏ผˆ0.38%๏ผ‰๏ผŒๅ›ฐ้šพ้›†ๅšๅˆฐ่ฆๆฑ‚็š„ไบ‹ 96.5%๏ผŒๆ•™ๅธˆๆ˜ฏ 98.5%ใ€‚

ๅทฒ็Ÿฅ้—ฎ้ข˜๏ผš

  • ็”จๆˆทๆ˜Ž็กฎ่ฆๆฑ‚โ€œๅฏผๅ‡บ่ฆ†็›–ๅŽŸๆ–‡ไปถโ€ๆ—ถ๏ผŒๆจกๅž‹ไปไผš็…งๅšใ€‚LUMEN RAW ็š„ๅฏผๅ‡บๅ‘ฝไปคไผšๆ‹’็ป่ฟ™ไธช่ฐƒ็”จ๏ผ›ๅœจๅˆซ็š„่ฝฏไปถ้‡Œไฝฟ็”จๆ—ถ๏ผŒ่ฏทไฟ็•™่ฟ™็ฑปไฟๆŠคใ€‚
  • ๅคš่ฝฎๅฏน่ฏ้‡Œๆ”นไธปๆ„็š„่ฏทๆฑ‚ๅค„็†ๅพ—ไธๅฅฝใ€‚

่ฎธๅฏ๏ผš Apache-2.0ใ€‚

Downloads last month
170
GGUF
Model size
4B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for H3tY/qwen3.5-lumenraw-optimize

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(1,534)
this model