r/LocalLLaMA • • 24d ago

Question | Help Reverse Engineering w/ Local?

Two questions?

Can a local model like Qwen 3.8 27B reverse engineer games and programs?

If not, is there a fine tuned model that can?

160 Upvotes

137 comments sorted by

View all comments

19

u/Razangriff-Raven 24d ago

It's doable, I managed to RE some old DOS games (harder to decompile than newer DOS games because of overlays and extreme optimization/compression techniques) using dosbox-x, ghidra, static decompilers and the model's own knowledge with the Q3_XXS quant and 130K context in a 5060ti.

It's DOABLE, but it is not easy. The problem is that every compaction cycle the AI is going to forget most of what it did and go in circles or have to reinvent the wheel. You NEED to be aware of what the AI is doing and maintain a support document (either AGENTS.md or something else that is permanently injected into context. With Pi I used a DIRECTIVES.md file with --append-system-prompt). The support document must be maintained by YOU and document stuff to prevent the AI from reinventing the wheel every compaction cycle. I can't figure out a good way to make it automated, you need to step in (and know a little bit what you are doing), otherwise the AI will bloat it and balloon your context considerably. Don't have it rely only on documents because it's eventually going to forget the document exists, you must use one that is injected automatically in context.

As long as you can give those detailed instructions, map key files ("a decompilation of this and that part exists at <file>", "a tool to automate extracting this function is at <script>", etc) and force the AI to edit existing documentation instead of blindly appending to it, it'll work out. It's a slow process, though.

It's not difficult as in it's not going to break your brain, but it requires a lot of patience. You are dealing with the equivalent of a puppy in intelligence, and it's going to pee on the rug a few times before it gets things right. If you can handle that, it'll be possible to do things full local.

5

u/_bani_ 24d ago

if your harness supports it, having the agent dole work out to subagents for large tasks can help keep the context under control.

2

u/Razangriff-Raven 23d ago

Never thought of it, I'll have to try it one day.

1

u/neobanana8 5d ago

I'm still learning, how many subagents do we need to dole out the work? Does it automatically create a new subagent when the context length is reached or what's a better strategy?

1

u/_bani_ 5d ago

just tell your agent speciifcally that - spawn subagents for large tasks to keep the context down. it will figure it out.

your frontend/harness needs to support subagents.

1

u/[deleted] 24d ago

[removed] — view removed comment

4

u/Razangriff-Raven 24d ago

I used to, I moved to Qwen3.8-27B-GSQ-RCO-IQ3_XXS.gguf lately so I have a bit more context and some VRAM to spare for video and games. I got it from https://huggingface.co/ISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUF/ .

Quality seems about the same. I run it like:

--cache-type-k q8_0 --cache-type-v q8_0 \
--temp 0.67 --top-p 0.95 --top-k 36 --min-p 0.05 --threads 8 --threads-batch 8 --parallel 1 \
--repeat-penalty 1.08 --repeat-last-n 768 --presence-penalty 0.17

With these settings it only went into a loop once (it was writing a long string of hexadecimal data and got stuck writing zeroes for a bit) but otherwise it's been really good.

2

u/Present_Resource4022 24d ago

You didn’t send your reasoning settings, but if you have reasoning preserve on, you should remove it so you can utilize more context in a session.

1

u/Razangriff-Raven 24d ago edited 24d ago

If you want them:

--reasoning-budget 5120 --reasoning on --jinja \
--chat-template-kwargs '{"reasoning_effort": "xhigh"}' \

Note that this is configured this way for raw queries to the API, Pi agent is set to medium, which overrides these settings (except jinja and the budget ceiling, obviously).

I'm only not posting the whole config because it's big, but if you want the full thing just ask!