- Batchfile 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| rea-start.bat | ||
| rea-stop.bat | ||
| README.md | ||
REA Local Reverse-Engineering Setup — adapted to this machine
Status (2026-10-17): ✅ SETUP COMPLETE AND VERIFIED END-TO-END. Steps 1–3: Ghidra installed, 104 GB model downloaded + validated, llama.cpp built, server running at
http://127.0.0.1:8080(~32 tok/s). Steps 4–6: OpenCode 1.19.0 + rea-agents 6.5.0 configured (~/.config/opencode/opencode.json, providerlocalqwen, 128K context, 8K thinking cap); REA MCP connected (opencode mcp list→ ✓ rea); tools trimmed 207 → 19 via top-level"tools"denylist (measured session input ~14K tokens vs ~150K untrimmed);rea doctorcore checks green (only unused optional engines flagged); live RE run:opencode runopenedwhere.exeviarea_open_binary+rea_list_stringsand reported correct strings. Source: Network Coder video https://www.youtube.com/watch?v=VwUz8rx8kJo
Based on the Network Coder REA video (RTX 4060 Ti / 16 GB build), re-mapped to the actual specs of this PC. Model swapped to an uncensored Qwen3.8-Flash-Next (abliterated) variant, as requested.
1. Target machine (measured 2026-10-14)
| Component | Value |
|---|---|
| GPU | NVIDIA RTX PRO 6000 Blackwell, 97,887 MiB (96 GB) VRAM |
| Driver / CUDA | 596.86 / CUDA 13.2 |
| CPU | Intel Core Ultra 7 265K (20 cores / 20 threads) |
| RAM | 64 GB DDR (25 GB currently free) |
| OS | Windows 11 Pro x64 |
Key implication vs. the video: the video's whole problem (squeezing a 125B MoE onto 16 GB via Strata's expert offloading) disappears. A 125B Qwen at ~4.3 bpw is ≈ 68 GB — it fits entirely in your 96 GB VRAM with 128K context to spare. No MoE streaming, no RAM thrashing, and no need for Strata's tuning loop. Everything runs at full GPU speed.
2. Stack (same architecture as the video, one change)
| Layer | Video | This setup |
|---|---|---|
| Engine | Strata (MoE offload) | llama.cpp server (full model in VRAM) — Ollama is a fine fallback |
| Model | Qwen3.8-Flash-Next 125B, 3-bit | Qwen3.8-Flash-Next-Uncensored (abliterated), UD-Q4_K_XL |
| Agent | OpenCode | OpenCode (unchanged) |
| Tools | REA + Ghidra 12.1.4 (MCP) | REA + Ghidra 12.1.4 (MCP) |
| Context | 128K, thinking cap 8K | 128K, thinking cap 8K (the video's hard-won settings) |
Model options (uncensored, still Qwen3.8-Flash-Next 125B)
huihui-ai/Huihui-Qwen3.8-Flash-Next-abliterated-GGUF(recommended) — GGUFs derived from unsloth's; use UD-Q4_K_XL (~73 GB, best quality/byte). Note: "abliterated" = refusals removed; it is less censored, not "uncensored like a base model" — fine for RE work where the model should just comply.orcarouter/Qwen3.8-Flash-Next-Uncensored-GGUF/mradermacher/Qwen3.8-Flash-Next-Uncensored-GGUF— static quants Q2_K (80 GB) → Q8; pick UD-Q4_K or IQ4_XS (~98 GB) only if it fits your desired context budget, otherwise Q4_K_M.alesha-pro/Qwen3.8-Flash-Next-abliterated-GSQ-RCO-Strata-GGUF— if you later decide you do want to use the Strata engine exactly like the video.
If you specifically want HauhauCS-style "Aggressive" tuning: no HauhauCS build of the 125B Flash-Next exists yet (only the 27B one you already have). The abliterated builds above are the closest available.
3. Setup steps
Step 0 — Prerequisites
nvidia-smi :: confirm 96 GB free
node -v :: need Node >= 22.19 (video used 24)
Install if missing:
winget install OpenJS.NodeJS.LTS
winget install Microsoft.OpenJDK.21 :: Ghidra 12.1.4 needs Java 21
Step 1 — Ghidra (the decompiler backend) ✅ DONE
- Installed:
E:\Tools\ghidra_12.1.4_PUBLIC\(fromghidra_12.1.4_PUBLIC_20260921.zip, zip integrity verified;support\analyzeHeadless.batpresent for headless use). - No GUI needed; REA drives it headless.
java -version= 21.0.6 confirmed.
Step 2 — Model ✅ DONE
hf download huihui-ai/Huihui-Qwen3.8-Flash-Next-abliterated-GGUF ^
--include "unsloth-UD-Q4_K_XL/*" ^
--local-dir E:\AI-Models\huggingface\qwen3.8\flash-next-uncensored
- Installed: 4 shards, 104 GB, all sizes + GGUF magic verified at
E:\AI-Models\huggingface\qwen3.8\flash-next-uncensored\unsloth-UD-Q4_K_XL\(shard 1 is the header/metadata file — load it and llama.cpp pulls in the rest).
Step 3 — Inference engine (llama.cpp, OpenAI-compatible API) ✅ DONE
git clone --depth 1 https://github.com/ggml-org/llama.git E:\Tools\llama.cpp
cd E:\Tools\llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j
- Built:
E:\Tools\llama.cpp\build\bin\Release\llama-server.exe(+ cli, bench). Launch (run as a background service or in a persistent terminal):
E:\Tools\llama.cpp\build\bin\Release\llama-server.exe ^
-m E:\AI-Models\huggingface\qwen3.8\flash-next-uncensored\unsloth-UD-Q4_K_XL\Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf ^
-ngl 999 -c 131072 -fa on ^
--host 127.0.0.1 --port 8080
-ngl 999→ all layers in VRAM (they fit).-c 131072→ 128K context (the video's fix for compaction loops). KV cache at 128K ≈ 10–15 GB — still inside 96 GB.- Verified running:
/health→ ok,/v1/chat/completionsresponds; VRAM ~96.5/97.9 GB (note: an olderE:\llama-cpp\llama-server.exealso runs on0.0.0.0:8080— stop it during REA sessions or move this server to 8081).
Fallback: ollama run huihui-ai/huihui-qwen3.8-flash-next-abliterated
(Ollama auto-loads the GGUF repo) — slower, but zero build.
Step 4 — Agent (OpenCode) ✅ done
Note: the video's npm install open-code is stale; current package names:
npm install --global opencode-ai :: agent (installed: 1.19.0)
npm install --global rea-agents :: MCP layer (installed: 6.5.0)
Config written at ~/.config/opencode/opencode.json: provider localqwen
(@ai-sdk/openai-compatible, baseUrl: http://127.0.0.1:8080/v1), model
id qwen3.8-flash-next with limit.context: 131072 and
thinking: {type: enabled, budgetTokens: 8000} (the video's Problem-2 fix).
opencode run "<prompt>" is the non-interactive test; it prints each tool
call (⚙ rea_open_binary {...}) plus the model reply.
Step 5 — REA (the MCP tool layer) ✅ done
rea-agents setup --client opencode --yes
rea-agents doctor
- Requires
JAVA_HOME→ a real JDK 21 dir (C:\Program Files\Eclipse Adoptium\jdk-21.0.12.101-hotspot, installed via winget full path — bash has nowingeton PATH) andGHIDRA_INSTALL_DIR→E:\Tools\ghidra_12.1.4_PUBLIC(set persistently withsetx). Doctor: core checks green; only unused optional engines (Hopper/IDA/jadx) flagged. - MCP registration verified with
opencode mcp list→✓ rea connected(207 tools registered by the server).
Critical (the video's Problem-1 fix) — applied: trim to ~19 tools.
How it works in OpenCode: top-level "tools": { "rea_<tool>": false, ... }
denylist — one false per unwanted tool (188 entries); MCP tool names are
<server>_<tool> prefixed. A "tools" block nested under mcp.rea is NOT
honored (shows 0 in opencode debug config). Core 19 kept enabled:
open_binary close_binary binary_overview binary_session list_procedures search_procedures list_names procedure_pseudo_code batch_decompile procedure_info read_bytes search_bytes read_function_instructions inspect_address_context list_strings search_strings xrefs find_xrefs_to_name verify_reconstruction. Measured effect: first RE session input ≈ 14K
tokens (vs ≈ 150K with the full catalog).
Step 6 — Test target ✅ smoke-tested
Live run verified the full chain (llama-server → OpenCode → REA MCP →
Ghidra): opencode run opened where.exe, listed strings correctly
(Where - Lists location of files, Microsoft® Windows® Operating System).
For a full RE challenge: compile a small C app, strip it (strip -s),
delete the source, confirm with file → "stripped", then hand it to
OpenCode: "Reverse engineer this binary and rebuild it so it behaves
identically."
4. Recommended changes vs. the video (and why)
- Drop Strata; use llama.cpp (or Ollama). Your 96 GB VRAM holds the whole 125B model. Strata's value was 16 GB VRAM survival; here it only adds an offloading bottleneck the video itself benchmarked (77 tok/s ceiling). Full-VRAM Q4 on a Blackwell workstation card will beat that comfortably. (Only keep Strata if you specifically want its expert-caching behavior.)
- Uncensored model swap — abliterated GGUF instead of the stock 3-bit; same architecture, no refusals, ~2× the VRAM headroom for quality/context.
- 128K context from day one — the video only got there after two failures; with your VRAM budget there is no reason to start at 64K.
- Skip Strata's auto-tuning step — nothing to tune; set
-ngl 999and go. - Keep the 8K thinking cap and 19-tool trim — those are model-agnostic lessons about context economics, and still apply.
- Watch RAM, not VRAM — 64 GB system RAM with only ~25 GB free. The model lives in VRAM so this is fine, but don't run heavy RAM hogs concurrently, and if you later push context past ~200K, KV spill starts hitting it.
5. Expected results
- ~125B-class reasoning at full GPU speed (expect well above the video's
70–77 tok/s; benchmark after first run:
llama-benchor a timed chat). - Offline, $0, identical agent/tools workflow to the video.
- Legal note: only run on binaries you own or have permission to inspect.
6. Verify checklist ✅ all verified 2026-10-17
nvidia-smishows llama-server holding ~85 GB VRAM, 0 GB spillcurl 127.0.0.1:8080/v1/chat/completionsreturns a sane replyopencodeuses the local provider (no cloud requests) —opencode runanswered viabuild · qwen3.8-flash-nextrea doctor→ Ghidra green (core checks)- Tool count in agent session ≈ 19 REA tools (188 denied), session input ~14K tokens, context stays < 128K
- Strip-test binary rebuilt byte-identical on a handful of inputs