AIMindLink commited on
Commit
4e328a7
Β·
verified Β·
1 Parent(s): e3299f0

Upload 2 files

Browse files

Edited print and n_metatron_loaded

Files changed (2) hide show
  1. config.py +4 -4
  2. main.py +14 -13
config.py CHANGED
@@ -70,12 +70,12 @@ gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf
70
  """
71
  # ── AI to load for each hemisphere ───────────────────────────────────────────────
72
  _ALPHA_INTELLIGENCE_TO_LOAD: dict = {
73
- "logic": "gemma-4-E2B-it-UD-Q4_K_XL.gguf",
74
- "muse": "gemma-4-E2B-it-UD-Q4_K_XL.gguf",
75
- "mind": "gemma-4-E2B-it-UD-Q4_K_XL.gguf"
76
  }
77
  # ── Startup Memory restore for vector synthesis ──────────────────────────────────
78
- METATRON_METRONOME: int = 60 # Startup Memory Capsules load interval
79
  n_metatron_to_load = 0 # Set number of Memory Capsules to load (slash-command)
80
  n_metatron_loaded = 0 # Start with n Memory Capsule to load (slash-command)
81
 
 
70
  """
71
  # ── AI to load for each hemisphere ───────────────────────────────────────────────
72
  _ALPHA_INTELLIGENCE_TO_LOAD: dict = {
73
+ "logic": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf",
74
+ "muse": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf",
75
+ "mind": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf"
76
  }
77
  # ── Startup Memory restore for vector synthesis ──────────────────────────────────
78
+ METATRON_METRONOME: int = 120 # Startup Memory Capsules load interval
79
  n_metatron_to_load = 0 # Set number of Memory Capsules to load (slash-command)
80
  n_metatron_loaded = 0 # Start with n Memory Capsule to load (slash-command)
81
 
main.py CHANGED
@@ -319,10 +319,10 @@ def db_export_session(session_id: int, filepath: str) -> None:
319
  # ─────────────────────────────────────────────────────────────────────────────
320
  def load_hemisphere(key: str) -> Llama:
321
  _think_label = "think=ON" if HEMISPHERES[key]["enable_thinking"] else "think=OFF"
322
- print(f" [*] Loading {HEMISPHERES[key]['label']} …")
323
  print(f" n_ctx={HEMISPHERES[key]['loader']['n_ctx']} "
324
  f"n_gpu_layers={HEMISPHERES[key]['loader']['n_gpu_layers']} "
325
- f"{_think_label}")
326
  return Llama(model_path=HEMISPHERES[key]["path"], **HEMISPHERES[key]["loader"])
327
 
328
 
@@ -438,10 +438,10 @@ def _cmd_garden(arg: str) -> None:
438
 
439
  def _cmd_help(arg: str) -> None:
440
  print()
441
- print(" Slash commands")
442
  print(" " + "─" * 56)
443
  for name, (_, description) in COMMANDS.items():
444
- print(f" {c.green}/{name:<14} {description}{c.res}")
445
  print()
446
  return None
447
 
@@ -944,6 +944,7 @@ def save_garden_state() -> None:
944
  with open(GARDEN_SAVE_PATH, "w", encoding="utf-8") as f:
945
  json.dump(state, f, ensure_ascii=False, indent=2)
946
  print(f" {c.green}[garden] State saved β†’ {GARDEN_SAVE_PATH}{c.res}")
 
947
  except OSError as exc:
948
  print(f" {c.red}[garden] Save failed: {exc}{c.res}")
949
 
@@ -1061,12 +1062,12 @@ def memotron(
1061
  print(
1062
  f" {c.green}[memotron] -> garden['{_tree}'] | "
1063
  f"garden['{print_tree}']: {len(garden[print_tree])} msgs | "
1064
- f"garden['n_tok_tot']['{print_tree}']: {garden["n_tok_tot"][print_tree]:,} / {HEMISPHERES["mind"]["loader"]["n_ctx"]:,} "
1065
- f"({garden["n_tok_tot"][print_tree] / HEMISPHERES["mind"]["loader"]["n_ctx"] * 100:.0f}%) | "
1066
  f"session {session_id}]{c.res}"
1067
  )
1068
 
1069
- save_garden_state()
1070
 
1071
 
1072
  # ─────────────────────────────────────────────────────────────────────────────
@@ -1271,9 +1272,9 @@ def main() -> None:
1271
  # ── Startup: Load Metatron memory capsules ───────────────────────────────
1272
  if _metatron_heartbeats >= METATRON_METRONOME: # Timed loop
1273
  if config.n_metatron_to_load and config.n_metatron_loaded < config.n_metatron_to_load:
 
 
1274
  _sensor_input = METATRON_TO_LOAD[config.n_metatron_loaded]
1275
- config.n_metatron_loaded += 1 # Iterate over the memory capsules
1276
- print(f"\n {c.inv} ── n_metatron_loaded: {config.n_metatron_loaded} _sensor_input: {_sensor_input} ──────────────────────────── {c.res}")
1277
 
1278
  # ── Z-factor sentience user input ────────────────────────────────────────
1279
  try:
@@ -1344,11 +1345,11 @@ def main() -> None:
1344
  _timings["mind"] = Lambda(_models, _tree)
1345
 
1346
  # ── Startup memory capsules to load ───────────────────────────────────
1347
- if config.n_metatron_to_load and config.n_metatron_loaded <= config.n_metatron_to_load:
1348
- print(f" {c.inv} ── n_metatron_loaded: {config.n_metatron_loaded} of {config.n_metatron_to_load} ──────────────────────────── {c.res}")
1349
  _tree = "S" # Set to memorize as memory capsules in garden["C"]
1350
- if config.n_metatron_loaded == config.n_metatron_to_load:
1351
- config.n_metatron_loaded += 1 # Advance to finish the startup sequence
 
1352
 
1353
  memotron(_models, _tree, _session_id, _timings) # Store the response
1354
  # Reset turn-based data and preset terminal for next cycle
 
319
  # ─────────────────────────────────────────────────────────────────────────────
320
  def load_hemisphere(key: str) -> Llama:
321
  _think_label = "think=ON" if HEMISPHERES[key]["enable_thinking"] else "think=OFF"
322
+ print(f" {c.green}[*] Loading {HEMISPHERES[key]['label']} …")
323
  print(f" n_ctx={HEMISPHERES[key]['loader']['n_ctx']} "
324
  f"n_gpu_layers={HEMISPHERES[key]['loader']['n_gpu_layers']} "
325
+ f"{_think_label}{c.res}")
326
  return Llama(model_path=HEMISPHERES[key]["path"], **HEMISPHERES[key]["loader"])
327
 
328
 
 
438
 
439
  def _cmd_help(arg: str) -> None:
440
  print()
441
+ print(f" {c.green}Slash commands")
442
  print(" " + "─" * 56)
443
  for name, (_, description) in COMMANDS.items():
444
+ print(f" /{name:<14} {description}{c.res}")
445
  print()
446
  return None
447
 
 
944
  with open(GARDEN_SAVE_PATH, "w", encoding="utf-8") as f:
945
  json.dump(state, f, ensure_ascii=False, indent=2)
946
  print(f" {c.green}[garden] State saved β†’ {GARDEN_SAVE_PATH}{c.res}")
947
+ print(f" {c.green}[garden] n_metatron_loaded β†’ {config.n_metatron_loaded}{c.res}")
948
  except OSError as exc:
949
  print(f" {c.red}[garden] Save failed: {exc}{c.res}")
950
 
 
1062
  print(
1063
  f" {c.green}[memotron] -> garden['{_tree}'] | "
1064
  f"garden['{print_tree}']: {len(garden[print_tree])} msgs | "
1065
+ f"garden['n_tok_tot']['{print_tree}']: {garden["n_tok_tot"][print_tree]:,} / {garden['THRESHOLD'][print_tree]:,} "
1066
+ f"({garden["n_tok_tot"][print_tree] / garden['THRESHOLD'][print_tree] * 100:.0f}%) | "
1067
  f"session {session_id}]{c.res}"
1068
  )
1069
 
1070
+ save_garden_state() # Write history json to disk
1071
 
1072
 
1073
  # ─────────────────────────────────────────────────────────────────────────────
 
1272
  # ── Startup: Load Metatron memory capsules ───────────────────────────────
1273
  if _metatron_heartbeats >= METATRON_METRONOME: # Timed loop
1274
  if config.n_metatron_to_load and config.n_metatron_loaded < config.n_metatron_to_load:
1275
+ _print_metatron_loaded = config.n_metatron_loaded + 1
1276
+ print(f"\n {c.inv} ── n_metatron_loaded: {_print_metatron_loaded} _sensor_input: {_sensor_input} ──────────────────────────── {c.res}")
1277
  _sensor_input = METATRON_TO_LOAD[config.n_metatron_loaded]
 
 
1278
 
1279
  # ── Z-factor sentience user input ────────────────────────────────────────
1280
  try:
 
1345
  _timings["mind"] = Lambda(_models, _tree)
1346
 
1347
  # ── Startup memory capsules to load ───────────────────────────────────
1348
+ if config.n_metatron_to_load and config.n_metatron_loaded < config.n_metatron_to_load:
 
1349
  _tree = "S" # Set to memorize as memory capsules in garden["C"]
1350
+ config.n_metatron_loaded += 1 # Iterate over the memory capsules
1351
+ print(f" {c.inv} ── n_metatron_loaded: {config.n_metatron_loaded} of {config.n_metatron_to_load} ──────────────────────────── {c.res}")
1352
+
1353
 
1354
  memotron(_models, _tree, _session_id, _timings) # Store the response
1355
  # Reset turn-based data and preset terminal for next cycle