diff --git a/REMAINING.md b/REMAINING.md index 146d1540..a58f5981 100644 --- a/REMAINING.md +++ b/REMAINING.md @@ -28,7 +28,7 @@ docker rm -f paro_s2_MAIN paro_s2_EXACT paro_s2_SEED1 2>/dev/null mkdir -p /tmp/night # /tmp is tmpfs — tooling must be recreated after every boot cd /home/zee/code/vllm/ggz14/paroquant # launch STAGGERED (90s apart — simultaneous 52G mmaps storm amdgpu SVM): -FORCE=1 PARO_HIP_VISIBLE=0 FT_EPOCHS=1 PARO_ROT_KERNEL=1 PARO_NAME=paro_s2_MAIN FT_RESULTS=/media/zee/ai/paro-out-ft-m2xfp4 OUT=Qwen3.8-27B-PARO-M2XFP4-FT setsid nohup ./stage2-m2xfp4.sh finetune > /tmp/ft-MAIN.log 2>&1 & +**hip2 = 0000:2c:00.0 is the newest R9700 — prefer it for the heaviest training/compute lanes. AMENDED 2026-10-23 00:40 (user): 0000:03:00.0 (trx pcie 1, hip0) is the LAST to use.** Order: hip2 → hip4 → hip1 → hip0. hip3 = W6600, never. # (+90s) same + PARO_HIP_VISIBLE=1 M2XFP4_FOLD=exact PARO_NAME=paro_s2_EXACT FT_RESULTS=/media/zee/ai/paro-out-ft-m2xfp4-exact OUT=Qwen3.8-27B-PARO-M2XFP4-FT-EXACT > /tmp/ft-EXACT.log # (+180s) same + PARO_HIP_VISIBLE=2 PARO_SEED=1 PARO_NAME=paro_s2_SEED1 FT_RESULTS=/media/zee/ai/paro-out-ft-m2xfp4-seed1 OUT=Qwen3.8-27B-PARO-M2XFP4-FT-SEED1 > /tmp/ft-SEED1.log # watchdogs: recreate /tmp/night/watch-lane.sh (frozen-progress, phase-aware) + lanes.tsv; run one per lane diff --git a/tools/rad_pack_m2xfp4.py b/tools/rad_pack_m2xfp4.py index 787a5aab..4dc6c6ae 100755 --- a/tools/rad_pack_m2xfp4.py +++ b/tools/rad_pack_m2xfp4.py @@ -381,6 +381,38 @@ def main() -> int: data, _, _ = ck.get(m["weight"]) by_codes.setdefault(h16(data), []).append(base) + # Arch row-joins (ffn_gate_up = mlp.gate_proj+mlp.up_proj, ssm_inz = in_proj_qkv+in_proj_z): + # the container stores the two pieces' planes concatenated row by row, so a fused entry's + # codes hash can never equal a single checkpoint tensor's. Resolve a miss as a join of two + # same-K modules whose Ns sum to the entry's, and register it as a synthetic module whose + # scale/meta planes are the pieces' concatenation. + def joined_base(codes, N, K): + by_n = {} + for b, m in mods.items(): + if m["K"] == K: + by_n.setdefault(m["N"], []).append(b) + row_bytes = K // 2 + for n_a, bases_a in by_n.items(): + if n_a >= N or (N - n_a) not in by_n: + continue + da, _, _ = ck.get(mods[bases_a[0]]["weight"]) + if h16(codes[: n_a * row_bytes]) != h16(da): + continue + for b_b in by_n[N - n_a]: + db, _, _ = ck.get(mods[b_b]["weight"]) + if h16(codes[n_a * row_bytes:]) != h16(db): + continue + name = f"{bases_a[0]}+{b_b}" + mods[name] = { + "weight": name, "N": N, "K": K, "joined": True, + "scale": bytes(ck.get(mods[bases_a[0]]["scale"])[0]) + + bytes(ck.get(mods[b_b]["scale"])[0]), + "meta": bytes(ck.get(mods[bases_a[0]]["meta"])[0]) + + bytes(ck.get(mods[b_b]["meta"])[0]), + } + return name + return None + n_ent = n_ok = 0 codes_mismatch, other_mismatch = [], [] table_checked = table_bad = 0 @@ -393,6 +425,11 @@ def main() -> int: n_ent += 1 if n_ent % 100 == 0: print(f" ... {n_ent} entr(ies) checked", flush=True) + if e["name"].startswith("dflash."): + # The drafter is rule-quantized from the unrotated --draft checkpoint: 'plain' + # planes are its design (the shipped q38-27b-m2xfp4-df2.rad carries exactly these + # and serves), so the rotated-basis requirement below applies to the trunk only. + continue if enc["transform"] != "givens": other_mismatch.append(f"{e['name']}: transform {enc['transform']!r}, not 'givens' -- " "the fine-tune's codes are in a rotated basis, so an unrotated " @@ -400,6 +437,10 @@ def main() -> int: continue codes = bytes(rf.plane_bytes(e, "codes")) cand = by_codes.get(h16(codes)) + if not cand: + j = joined_base(codes, e["shape"][0], e["shape"][1]) + if j: + cand = [j] if not cand: codes_mismatch.append(f"{e['name']}: codes match no checkpoint tensor") continue @@ -409,16 +450,21 @@ def main() -> int: m = mods[base] ok = True for role, key in (("scale", "scale"), ("meta", "meta")): - want, _, _ = ck.get(m[key]) + v = m[key] + want = v if isinstance(v, (bytes, bytearray)) else ck.get(v)[0] got = bytes(rf.plane_bytes(e, role)) if got != want: other_mismatch.append(f"{e['name']}: {role} plane differs from {m[key]}") ok = False if a.meta_sample: - want, _, _ = ck.get(m["meta"]) + v = m["meta"] + want = v if isinstance(v, (bytes, bytearray)) else ck.get(v)[0] step = max(1, len(want) // a.meta_sample) meta_probed += len(want[::step]) - if not a.skip_tables and ok: + if not a.skip_tables and ok and not m.get("joined"): + # joined entries stack their pieces' tables per row-part (abi/rad_encoding.h + # "givens"); check_tables reads a single module's tensors, so the fused table + # check is the parity tests' job, not this seam check. table_checked += 1 bad_tbl = check_tables(rf, e, enc, ck, m, e["name"]) if bad_tbl: