eval results 20/20
Browse files
code/ck_discover.py
CHANGED
|
@@ -3,7 +3,7 @@ import sys, json, re, gc, math, torch
|
|
| 3 |
import circuitkit as ck
|
| 4 |
cfg = json.loads(sys.argv[1]); out = sys.argv[2]
|
| 5 |
print("visible gpus:", torch.cuda.device_count(), "| config:", cfg, flush=True)
|
| 6 |
-
model = ck.load_model("CohereLabs/tiny-aya-global", dtype="float16", algorithm=cfg["algo"])
|
| 7 |
tk = model.tokenizer; MARK = "<|START_OF_TURN_TOKEN|><|USER_TOKEN|>"
|
| 8 |
try: # Tiny Aya's default chat template prepends a long system preamble to every prompt; the task would carry it into every position of the attribution buffers
|
| 9 |
probe = tk.apply_chat_template([{"role": "user", "content": "XQXQ"}], tokenize=False, add_generation_prompt=True)
|
|
@@ -24,7 +24,8 @@ try: # TransformerLen
|
|
| 24 |
else: print("W_U differs from W_E.T, left untouched", flush=True)
|
| 25 |
except Exception as e: print("tie skipped:", repr(e)[:200], flush=True)
|
| 26 |
gc.collect(); torch.cuda.empty_cache()
|
| 27 |
-
print("GPU memory after load: allocated GB", round(torch.cuda.memory_allocated() / 1e9, 2), flush=True)
|
|
|
|
| 28 |
try: torch.cuda.memory._record_memory_history(max_entries=200000)
|
| 29 |
except Exception as e: print("memory history unavailable:", repr(e)[:100], flush=True)
|
| 30 |
def _who_holds(): # on failure: biggest live allocations grouped by the code that made them
|
|
|
|
| 3 |
import circuitkit as ck
|
| 4 |
cfg = json.loads(sys.argv[1]); out = sys.argv[2]
|
| 5 |
print("visible gpus:", torch.cuda.device_count(), "| config:", cfg, flush=True)
|
| 6 |
+
model = ck.load_model("CohereLabs/tiny-aya-global", dtype=cfg.get("dtype", "float16"), algorithm=cfg["algo"], **({"device": cfg["device"]} if cfg.get("device") else {}))
|
| 7 |
tk = model.tokenizer; MARK = "<|START_OF_TURN_TOKEN|><|USER_TOKEN|>"
|
| 8 |
try: # Tiny Aya's default chat template prepends a long system preamble to every prompt; the task would carry it into every position of the attribution buffers
|
| 9 |
probe = tk.apply_chat_template([{"role": "user", "content": "XQXQ"}], tokenize=False, add_generation_prompt=True)
|
|
|
|
| 24 |
else: print("W_U differs from W_E.T, left untouched", flush=True)
|
| 25 |
except Exception as e: print("tie skipped:", repr(e)[:200], flush=True)
|
| 26 |
gc.collect(); torch.cuda.empty_cache()
|
| 27 |
+
try: print("GPU memory after load: allocated GB", round(torch.cuda.memory_allocated() / 1e9, 2), flush=True)
|
| 28 |
+
except Exception: pass
|
| 29 |
try: torch.cuda.memory._record_memory_history(max_entries=200000)
|
| 30 |
except Exception as e: print("memory history unavailable:", repr(e)[:100], flush=True)
|
| 31 |
def _who_holds(): # on failure: biggest live allocations grouped by the code that made them
|
results/S_G_gradattr_FP16_W4.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/S_G_gradattr_W8_W4.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|