looping

#5
by BazsiBazsi - opened

I was kinda hyped for this model due to its size, but i got a lot of looping problems in real world tasks(with the IQ4XS-plus).
I was using strata, and i came from QFN Orca q4km. Any chance to requent to Q4KM? Maybe heavier sampling penalty?

I was wondering if you could provide some prompts that are likely to cause loops, so I can test them on other quantizations to see if the issue is caused by the model weights themselves.

I was wondering if you could provide some prompts that are likely to cause loops, so I can test them on other quantizations to see if the issue is caused by the model weights themselves.

I can provide an example. Maybe it's a "gotcha" or otherwise not super relevant, but it's what I ran into today. I'm using the IQ3_S quant in Strata.
I downloaded this old 16-bit app and challenged this ReverseEngineer finetune to get it working for me: https://www.fourmilab.ch/moontoolw/moontool16.html
I prompted with "Inside the moontool project folder there is a Windows executable that won't run on this system. Diagnose why and see if we can use REA to make it compatible." inside of OpenCode running the latest public REA. Ultimately it kept getting stuck in this sort of loop below. I eventually interrupted it, switched to this model (https://huggingface.co/SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF, same quant) and it didn't get stuck at all.


MS NE header: ne_cseg (segment count) is at 0x3A? The standard MS NE header fields and offsets (winnt.h IMAGE_NE_HEADER): WORD ne_magic; // 0 WORD ne_version; // 2 WORD ne_cc; // 4 WORD ne_heap; // 6 WORD ne_disk; // 8 WORD ne_apts; // 10 WORD ne_cbsel; // 12: offset of segment table WORD ne_idat?; // 14 WORD ne_flags?; // 16 WORD ne_cseg?; // 18 ... WORD ne_ventry?; // ...

MS NE header (winnt.h IMAGE_NE_HEADER): WORD ne_magic; WORD ne_version; WORD ne_cc; WORD ne_heap; WORD ne_disk; WORD ne_apts; WORD ne_cbsel; WORD ne_... WORD ne_flags? WORD ne_cseg?

winnt.h IMAGE_NE_HEADER: 0x00 WORD ne_magic 0x02 WORD ne_version 0x04 WORD ne_cc 0x06 WORD ne_heap 0x08 WORD ne_disk 0x0A WORD ne_apts 0x0C WORD ne_cbsel 0x0E WORD ne_idat 0x10 WORD ne_flags? 0x12 WORD ne_cseg? ... winnt.h IMAGE_NE_HEADER fields (MS): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags? WORD ne_cseg? WORD ne_...

MS NE header (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags? WORD ne_cseg?

winnt.h IMAGE_NE_HEADER: WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_initds? WORD ne_flags? WORD ne_cseg? WORD ne_...

MS NE header (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_idat WORD ne_flags? WORD ne_cseg? WORD ne_cdentry? WORD ne_...

winnt.h: typedef struct IMAGE_NE_HEADER { WORD ne_magic; WORD ne_version; WORD ne_cc; WORD ne_heap; WORD ne_disk; WORD ne_apts; WORD ne_cbsel; WORD ne_initds? WORD ne_flags? WORD ne_cseg? WORD ne... DWORD ne_... WORD ne_... WORD ne_... WORD ne_expoff? ... WORD ne_... WORD ne_res? ... }

The MS NE header is 62 bytes: 0x3E.

winnt.h IMAGE_NE_HEADER (MS): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags? WORD ne_cseg? DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_...

MS NE header fields (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_init? WORD ne_flags WORD ne_cseg WORD ne_... WORD ne_cdentry? WORD ne_... WORD ne_... WORD ne_expoff? WORD ne_... WORD ne_res? WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_heap? WORD ne_disk? WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_...

The MS NE header at 0x38 is: WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_idat WORD ne_flags? WORD ne_cseg? WORD ne_... WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_...

Let me map the values decoded from the dump (offset=decimal): 0x400 = 17742 (0x454E magic) 0x402 = 3589 (0x0E05 version 5.14) 0x404 = 427 (0x1AB) 0x406 = 40 (0x28) 0x408 = 5659 (0x161B) 0x40A = 10051 (0x2743) 0x40C = 770 (0x302) 0x40E = 2 0x410 = 4096 (0x1000) 0x412 = 5120 (0x1400) 0x414 = 17178 (0x431A) 0x416 = 1 0x418 = 0 0x41A = 2 0x41C = 2 0x41E = 4 0x420 = 56 (0x38) 0x422 = 64 (0x40) 0x424 = 80 (0x50) 0x426 = 364 (0x16C) 0x428 = 394 (0x18A) 0x42A = 402 (0x192) 0x42C = 1491 (0x5D3) 0x42E = 0 0x430 = 6 0x432 = 4 0x434 = 0 0x436 = 2050 (0x802) 0x438 = 98 (0x62) 0x43A = 3652 (0xE44) 0x43C = 0 0x43E = 768 (0x300) 0x440 = 100 (0x64) 0x442 = 35894 (0x8C36) 0x444 = 3408 (0x0D50) 0x446 = 35894 (0x8C36) 0x448 = 3312 (0x0CF0) 0x44A = 6928 (0x1B10) 0x44C = 3409 (0x0D51) 0x44E = 6928 (0x1B10) 0x450 = 4 0x452 = 32783 (0x800F) 0x454 = 1 0x456 = 0 0x458 = 0 0x45A = 3750 (0xEA6) 0x45C = 7 0x45E = 7216 (0x1C30) 0x460 = 32769 (0x8001) 0x462 = 0 0x464 = 0 0x466 = 32782 (0x800E) 0x468 = 1 0x46A = 0 0x46C = 0 0x46E = 3757 (0xEBD) 0x470 = 2 0x472 = 7216 (0x1C30) 0x474 = 32769 (0x8001) 0x476 = 0 0x478 = 0 0x47A = 32770 (0x8002) 0x47C = 2 0x47E = 0

MS NE header (winnt.h IMAGE_NE_HEADER) with MS field names: WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_idat WORD ne_flags WORD ne_cseg WORD ne_...

winnt.h IMAGE_NE_HEADER: WORD ne_magic; WORD ne_version; WORD ne_cc; WORD ne_heap; WORD ne_disk; WORD ne_apts; WORD ne_cbsel; WORD ne_init? WORD ne_flags? WORD ne_cseg? WORD ne_... WORD ne_... WORD ne_... WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... DWORD ne_heapinit? WORD ne_... WORD ne_... WORD ne_... WORD ne_...

winnt.h IMAGE_NE_HEADER (from MS): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags? WORD ne_cseg? WORD ne_cdentry? WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_...

MS NE header (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags WORD ne_cseg WORD ne_...

winnt.h IMAGE_NE_HEADER fields (actual): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_init? WORD ne_flags? WORD ne_cseg? WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_expoff? WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_res? WORD ne_... WORD ne_... WORD ne_...

MS NE header fields (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne_cbsel WORD ne_... WORD ne_flags? WORD ne_cseg? WORD ne_... WORD ne_... WORD ne_... WORD ne_... DWORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_... WORD ne_...

The MS NE header fields (winnt.h IMAGE_NE_HEADER) are: WORD ne_magic; WORD ne_version; WORD ne_cc; WORD ne_heap; WORD ne_disk; WORD ne_apts; WORD ne_cbsel; WORD ne_? WORD ne_flags; WORD ne_cseg; WORD ne_? WORD ne_? DWORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? DWORD ne_heap? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_? WORD ne_?

MS NE header (winnt.h IMAGE_NE_HEADER): WORD ne_magic WORD ne_version WORD ne_cc WORD ne_heap WORD ne_disk WORD ne_apts WORD ne```

Frankly, the IQ3_S GSQ-RCO quant uncensored is probably a higher quality than the IQ3_S quant I have in here, I originally optimized this design around the IQ4_NL build, and I added the IQ4_XS and IQ3_S upon request. Bumping up the sampling repeat penalty may help.

jackjusko changed discussion status to closed

Hey there. excuse for the late reply here. I tried to reproduce a couple of times this issue but eventually the agent stopped itself, the repetition loop went up to 1k+ tokens but it only happened in thinking. For an upper bound in prod i've set up a 32k token limit to catch these in case it eve happens again.
btw any cache to have dflash2 integrated in your next releases?

Sign up or log in to comment