Soaperloafidksum commited on
Commit
ffe4ec8
·
verified ·
1 Parent(s): 0905d7f

Add LOREA V3-RE: Qwen3-Coder-30B-A3B LoRA for Wine/RE + Linux/macOS internals

Browse files
NOTICE CHANGED
@@ -1,28 +1,26 @@
1
  LOREA
2
  Copyright (c) 2026 Soaperloafidksum
3
-
4
- This model is licensed under the Apache License, Version 2.0.
5
- Full text: https://www.apache.org/licenses/LICENSE-2.0
6
 
7
  ------------------------------------------------------------------------
8
  Attribution
9
  ------------------------------------------------------------------------
10
- Built with Qwen2.5-Coder-14B-Instruct
11
  © Alibaba Cloud — Apache License 2.0
12
- https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct
13
-
14
- Quantized base: mlx-community/Qwen2.5-Coder-14B-Instruct-4bit
15
 
16
  ------------------------------------------------------------------------
17
- Fine-tuning data sources and their licenses
18
  ------------------------------------------------------------------------
19
- - Wine (https://www.winehq.org) LGPL-2.1-or-later
20
- - DXVK (https://github.com/doitsujin/dxvk) zlib
21
- - DXMT (https://github.com/3Shain/dxmt) see upstream LICENSE
22
- - Windows / PE / reverse-engineering notes author's own work
23
- - Tool-calling instruction examples original (synthetic)
 
 
24
 
25
  The legal status of model weights trained on copyleft-licensed source code
26
- (e.g. Wine, LGPL-2.1) is unsettled. This model is provided as-is, without
27
- warranty. Users are responsible for compliance with applicable licenses in
28
- their own use.
 
1
  LOREA
2
  Copyright (c) 2026 Soaperloafidksum
3
+ Licensed under the Apache License, Version 2.0 — https://www.apache.org/licenses/LICENSE-2.0
 
 
4
 
5
  ------------------------------------------------------------------------
6
  Attribution
7
  ------------------------------------------------------------------------
8
+ Built with Qwen3-Coder-30B-A3B-Instruct
9
  © Alibaba Cloud — Apache License 2.0
10
+ https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct
11
+ Quantized base: mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit
 
12
 
13
  ------------------------------------------------------------------------
14
+ Fine-tuning data sources and licenses
15
  ------------------------------------------------------------------------
16
+ - Wine (winehq.org) LGPL-2.1-or-later
17
+ - DXVK (github.com/doitsujin/dxvk) zlib
18
+ - DXMT (github.com/3Shain/dxmt) see upstream
19
+ - XNU / dyld / objc4 / libdispatch (apple-oss-distributions) APSL 2.0 / Apache-2.0
20
+ - Linux kernel (kernel.org) GPL-2.0
21
+ - RE / Linux / macOS Q&A, x86-64 disasm<->source pairs original (synthetic)
22
+ - Broad multi-language code sample respective upstream licenses
23
 
24
  The legal status of model weights trained on copyleft-licensed source code
25
+ (e.g. Wine LGPL-2.1, Linux GPL-2.0) is unsettled. Provided as-is, without
26
+ warranty. Users are responsible for license compliance in their own use.
 
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  license: apache-2.0
3
- base_model: Qwen/Qwen2.5-Coder-14B-Instruct
4
  tags:
5
  - mlx
6
  - lora
@@ -9,8 +9,9 @@ tags:
9
  - dxvk
10
  - dxmt
11
  - reverse-engineering
12
- - tool-calling
13
- - qwen2.5-coder
 
14
  language:
15
  - en
16
  library_name: mlx
@@ -19,72 +20,65 @@ pipeline_tag: text-generation
19
 
20
  # LOREA 🧀🤖
21
 
22
- **LOREA** is a LoRA fine-tune of **Qwen2.5-Coder-14B-Instruct** specialized for
23
- **Wine development, DXVK/DXMT (D3D→Vulkan / D3D→Metal), Windows internals, and
24
- reverse engineering**, with native support for the [OCLI](https://github.com/)
25
- agent's `<tools>{...}</tools>` tool-calling format.
 
26
 
27
- It runs **fully locally on Apple Silicon** via [MLX](https://github.com/ml-explore/mlx).
28
-
29
- ## Details
30
 
31
  | | |
32
  |---|---|
33
- | Base model | `Qwen/Qwen2.5-Coder-14B-Instruct` (Apache-2.0) |
34
- | Quantized base used | `mlx-community/Qwen2.5-Coder-14B-Instruct-4bit` |
35
- | Method | LoRA (16 layers, rank-default), 2048-token sequences |
36
- | Framework | MLX (`mlx_lm`) |
37
- | Adapter size | ~46 MB |
38
-
39
- ## What it's good at
40
-
41
- - Wine / DXVK / DXMT code (C / C++ / Objective-C / Rust)
42
- - Windows API, PE format, Win32 internals
43
- - Reverse-engineering context and workflows
44
- - Emitting tool calls in the OCLI format:
45
- `<tools>{"name": "grep", "arguments": {"pattern": "vkCreateDevice", "path": "."}}</tools>`
46
-
47
- ## Use it (MLX)
48
-
49
  ```bash
50
  pip install mlx-lm
51
- # apply the LoRA adapter on top of the base:
52
  python -m mlx_lm generate \
53
- --model mlx-community/Qwen2.5-Coder-14B-Instruct-4bit \
54
- --adapter-path ./ \
55
- --prompt "Explain how DXVK creates a D3D11 device."
56
- ```
57
-
58
- Or fuse it into a standalone model:
59
-
60
- ```bash
61
  python -m mlx_lm fuse \
62
- --model mlx-community/Qwen2.5-Coder-14B-Instruct-4bit \
63
- --adapter-path ./ --save-path ./lorea-coder-14b
64
  ```
65
 
66
  ## Training data
67
-
68
- Fine-tuned on a blend of:
 
 
 
69
 
70
  | Source | License |
71
  |---|---|
72
- | Wine source + docs | LGPL-2.1+ |
73
  | DXVK | zlib |
74
- | DXMT | see upstream repo |
75
- | Windows / PE / RE analysis notes | author's own |
76
- | Tool-calling instruction examples | original (synthetic) |
 
77
 
78
- ## License & attribution
 
 
79
 
80
- LOREA is released under **Apache-2.0**, matching the base model.
 
 
81
 
82
- > Built with **Qwen2.5-Coder-14B** (© Alibaba, Apache-2.0). Fine-tuned on Wine
83
- > (LGPL-2.1), DXVK (zlib), DXMT, and original instruction data. See `NOTICE`.
84
-
85
- ## Limitations
86
-
87
- A 14B model fine-tuned with a small LoRA — it improves *domain fluency, code
88
- style, and tool-calling*, but it is **not** an authoritative source: it can
89
- produce incorrect code and hallucinate APIs. It does not autonomously reverse-
90
- engineer binaries. Always review its output. Provided **as-is, no warranty**.
 
1
  ---
2
  license: apache-2.0
3
+ base_model: Qwen/Qwen3-Coder-30B-A3B-Instruct
4
  tags:
5
  - mlx
6
  - lora
 
9
  - dxvk
10
  - dxmt
11
  - reverse-engineering
12
+ - linux-internals
13
+ - macos-internals
14
+ - qwen3-coder
15
  language:
16
  - en
17
  library_name: mlx
 
20
 
21
  # LOREA 🧀🤖
22
 
23
+ **LOREA** is a coding agent fine-tuned for **Wine development, DXVK/DXMT
24
+ (D3D→Vulkan / D3D→Metal), Windows / Linux / macOS internals, and reverse
25
+ engineering**, designed to drive the LOREA/OCLI agent CLI's `<tools>{...}</tools>`
26
+ tool-calling. It runs **fully locally on Apple Silicon** via
27
+ [MLX](https://github.com/ml-explore/mlx).
28
 
29
+ ## Flagship: `v3-re-30b/` the RE model
 
 
30
 
31
  | | |
32
  |---|---|
33
+ | Base | `Qwen/Qwen3-Coder-30B-A3B-Instruct` (Apache-2.0, MoE — 30B total / ~3B active) |
34
+ | Quantized base | `mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit` |
35
+ | Method | LoRA (8 layers), 1000 iters, seq 1536, lr 5e-5 (MLX) |
36
+ | Val loss | 1.77 1.25 |
37
+ | Adapter | `v3-re-30b/adapters.safetensors` (~269 MB) |
38
+
39
+ ### What it knows
40
+ - Wine / DXVK / DXMT code (C / C++ / Rust / Objective-C / Metal)
41
+ - **Reverse engineering**: x86-64 disassembly C, PE / ELF / Mach-O formats, calling conventions
42
+ - **Linux internals**: syscalls, ELF loading, ptrace, the Wine architecture
43
+ - **macOS internals**: Mach exception ports, IOKit matching (`IOServiceAddMatchingNotification`), dyld, the Obj-C runtime, **libdispatch** (`_dispatch_assert_queue_fail`), **Rosetta 2** (`%gs` / TLS)
44
+ - Emits tool calls: `<tools>{"name":"grep","arguments":{"pattern":"vkCreateDevice","path":"."}}</tools>`
45
+
46
+ ### Use it (MLX)
 
 
47
  ```bash
48
  pip install mlx-lm
 
49
  python -m mlx_lm generate \
50
+ --model mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit \
51
+ --adapter-path ./v3-re-30b \
52
+ --prompt "Explain how a macOS IOKit matching notification can fire on the wrong dispatch queue."
53
+ # or fuse into a standalone model:
 
 
 
 
54
  python -m mlx_lm fuse \
55
+ --model mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit \
56
+ --adapter-path ./v3-re-30b --save-path ./lorea-30b
57
  ```
58
 
59
  ## Training data
60
+ Wine / DXVK / DXMT source; Linux kernel + macOS open-source internals (XNU, dyld,
61
+ objc4, libdispatch); synthesized x86-64 disasm↔source pairs; ~380 expert,
62
+ adversarially fact-checked RE/Linux/macOS Q&A; and a broad multi-language code
63
+ sample. Plus conversational + tool-calling data so it chats normally and
64
+ finalizes after a tool result (no loops).
65
 
66
  | Source | License |
67
  |---|---|
68
+ | Wine | LGPL-2.1+ |
69
  | DXVK | zlib |
70
+ | DXMT | upstream |
71
+ | XNU / dyld / objc4 / libdispatch | Apple OSS (APSL / Apache-2.0) |
72
+ | Linux kernel | GPL-2.0 |
73
+ | RE/Linux/macOS Q&A, disasm pairs | original (synthetic) |
74
 
75
+ ## License & limitations
76
+ Apache-2.0, matching the base. *Built with Qwen3-Coder-30B-A3B (© Alibaba,
77
+ Apache-2.0).* See `NOTICE`.
78
 
79
+ It's a LoRA on a 30B — strong at domain **vocabulary, concepts, and tool-driving**,
80
+ but it can be wrong on deep specifics. **Review its output**, especially for
81
+ reverse engineering. Provided **as-is, no warranty.**
82
 
83
+ ---
84
+ *An earlier 14B adapter (Qwen2.5-Coder-14B) lives in this repo's history.*
 
 
 
 
 
 
 
v3-re-30b/adapter_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "adapter_path": "/Users/teoballesteros/lorea-ft/adapters_v3_30b",
3
+ "batch_size": 1,
4
+ "clear_cache_threshold": 0,
5
+ "config": null,
6
+ "data": "/Users/teoballesteros/lorea-ft/data_v3",
7
+ "fine_tune_type": "lora",
8
+ "grad_accumulation_steps": 1,
9
+ "grad_checkpoint": true,
10
+ "iters": 1000,
11
+ "learning_rate": 5e-05,
12
+ "lora_parameters": {
13
+ "rank": 8,
14
+ "dropout": 0.0,
15
+ "scale": 20.0
16
+ },
17
+ "lr_schedule": null,
18
+ "mask_prompt": false,
19
+ "max_seq_length": 1536,
20
+ "model": "mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit",
21
+ "num_layers": 8,
22
+ "optimizer": "adam",
23
+ "optimizer_config": {
24
+ "adam": {},
25
+ "adamw": {},
26
+ "muon": {},
27
+ "sgd": {},
28
+ "adafactor": {}
29
+ },
30
+ "project_name": null,
31
+ "report_to": null,
32
+ "resume_adapter_file": null,
33
+ "save_every": 100,
34
+ "seed": 0,
35
+ "steps_per_eval": 200,
36
+ "steps_per_report": 20,
37
+ "test": false,
38
+ "test_batches": 500,
39
+ "train": true,
40
+ "val_batches": 25
41
+ }
v3-re-30b/adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18b89d8f74400e292f5134d984fd9175329f4d7006840a94f16156177d4aa592
3
+ size 281852227