STAR-future commited on
Commit
d719545
·
verified ·
1 Parent(s): 762a3c3

H6 mode + parametric bpb dir

Browse files
Files changed (1) hide show
  1. tools/colab_bpb_compare.py +4 -3
tools/colab_bpb_compare.py CHANGED
@@ -26,6 +26,7 @@ TOK = os.environ["HF_TOKEN"]
26
  REPO = "STAR-future/Trinity"
27
  BASE = "moonshotai/Kimi-K3.1-Pro"
28
  W = Path("/content/k3p")
 
29
  OPEN = [m for m in os.environ.get("BPB_MODELS", "Qwen/Qwen3.8-27B,google/gemma-4-31B").split(",") if m]
30
  api = HfApi(token=TOK)
31
  LN2 = math.log(2)
@@ -41,7 +42,7 @@ for r in all_rows:
41
  if len(ids_full) >= 2048:
42
  kept.append((r, ids_full[:2048]))
43
 
44
- raw = next((W / "h5_sealed").glob("*.raw.npz"))
45
  z = np.load(raw)
46
  per = {}
47
  for k in z.files:
@@ -132,9 +133,9 @@ def summarize_and_save(res_obj):
132
  "n": int(len(ix)),
133
  }
134
  res_obj["summary"] = summary
135
- out = W / "h5_sealed" / "bpb_compare.json"
136
  out.write_text(json.dumps(res_obj, indent=1))
137
- api.upload_file(path_or_fileobj=str(out), path_in_repo="eval/h5_sealed/bpb_compare.json", repo_id=REPO,
138
  commit_message="Sealed holdout: bits per byte, Trinity vs open models")
139
  return summary
140
 
 
26
  REPO = "STAR-future/Trinity"
27
  BASE = "moonshotai/Kimi-K3.1-Pro"
28
  W = Path("/content/k3p")
29
+ BPB_DIR = os.environ.get("BPB_DIR", "h5_sealed") # 2026-11-24: h6_sealed for the H6 specialisation
30
  OPEN = [m for m in os.environ.get("BPB_MODELS", "Qwen/Qwen3.8-27B,google/gemma-4-31B").split(",") if m]
31
  api = HfApi(token=TOK)
32
  LN2 = math.log(2)
 
42
  if len(ids_full) >= 2048:
43
  kept.append((r, ids_full[:2048]))
44
 
45
+ raw = next((W / BPB_DIR).glob("*.raw.npz"))
46
  z = np.load(raw)
47
  per = {}
48
  for k in z.files:
 
133
  "n": int(len(ix)),
134
  }
135
  res_obj["summary"] = summary
136
+ out = W / BPB_DIR / "bpb_compare.json"
137
  out.write_text(json.dumps(res_obj, indent=1))
138
+ api.upload_file(path_or_fileobj=str(out), path_in_repo=f"eval/{BPB_DIR}/bpb_compare.json", repo_id=REPO,
139
  commit_message="Sealed holdout: bits per byte, Trinity vs open models")
140
  return summary
141