Text Generation
MLX
English
lora
code
wine
dxvk
dxmt
reverse-engineering
linux-internals
macos-internals
qwen3-coder
security
pentest
red-team
cybersecurity
Instructions to use Soaperloafidksum/LOREA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Soaperloafidksum/LOREA with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("Soaperloafidksum/LOREA") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use Soaperloafidksum/LOREA with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Soaperloafidksum/LOREA" --prompt "Once upon a time"
- Atomic Chat
Add LOREA V3-RE: Qwen3-Coder-30B-A3B LoRA for Wine/RE + Linux/macOS internals
Browse files- NOTICE +14 -16
- README.md +48 -54
- v3-re-30b/adapter_config.json +41 -0
- v3-re-30b/adapters.safetensors +3 -0
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
|
| 11 |
© Alibaba Cloud — Apache License 2.0
|
| 12 |
-
https://huggingface.co/Qwen/
|
| 13 |
-
|
| 14 |
-
Quantized base: mlx-community/Qwen2.5-Coder-14B-Instruct-4bit
|
| 15 |
|
| 16 |
------------------------------------------------------------------------
|
| 17 |
-
Fine-tuning data sources and
|
| 18 |
------------------------------------------------------------------------
|
| 19 |
-
- Wine (
|
| 20 |
-
- DXVK (
|
| 21 |
-
- DXMT (
|
| 22 |
-
-
|
| 23 |
-
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
The legal status of model weights trained on copyleft-licensed source code
|
| 26 |
-
(e.g. Wine
|
| 27 |
-
warranty. Users are responsible for compliance
|
| 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/
|
| 4 |
tags:
|
| 5 |
- mlx
|
| 6 |
- lora
|
|
@@ -9,8 +9,9 @@ tags:
|
|
| 9 |
- dxvk
|
| 10 |
- dxmt
|
| 11 |
- reverse-engineering
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
| 14 |
language:
|
| 15 |
- en
|
| 16 |
library_name: mlx
|
|
@@ -19,72 +20,65 @@ pipeline_tag: text-generation
|
|
| 19 |
|
| 20 |
# LOREA 🧀🤖
|
| 21 |
|
| 22 |
-
**LOREA** is a
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
## Details
|
| 30 |
|
| 31 |
| | |
|
| 32 |
|---|---|
|
| 33 |
-
| Base
|
| 34 |
-
| Quantized base
|
| 35 |
-
| Method | LoRA (
|
| 36 |
-
|
|
| 37 |
-
| Adapter
|
| 38 |
-
|
| 39 |
-
## What it
|
| 40 |
-
|
| 41 |
-
-
|
| 42 |
-
-
|
| 43 |
-
-
|
| 44 |
-
-
|
| 45 |
-
|
| 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/
|
| 54 |
-
--adapter-path ./ \
|
| 55 |
-
--prompt "Explain how
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
Or fuse it into a standalone model:
|
| 59 |
-
|
| 60 |
-
```bash
|
| 61 |
python -m mlx_lm fuse \
|
| 62 |
-
--model mlx-community/
|
| 63 |
-
--adapter-path ./ --save-path ./lorea-
|
| 64 |
```
|
| 65 |
|
| 66 |
## Training data
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
| Source | License |
|
| 71 |
|---|---|
|
| 72 |
-
| Wine
|
| 73 |
| DXVK | zlib |
|
| 74 |
-
| DXMT |
|
| 75 |
-
|
|
| 76 |
-
|
|
|
|
|
| 77 |
|
| 78 |
-
## License &
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 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
|