abandon branch for poor results

This commit is contained in:
wassname
2023-10-23 15:24:00 +08:00
parent 1890a214b0
commit aefbdb6cd0
4 changed files with 407 additions and 493 deletions
+10
View File
@@ -1791,3 +1791,13 @@ bugs?:
ideas:
- maybe I need both head and mlp?
- or just residual stream?
# 2023-10-23 15:07:58
After reading https://github.dev/andyzoujm/representation-engineering/tree/main/repe_eval/examples/decoder_repe_eval.ipynb
- use pipelines <3
- use their pca code
- use the diff of hidden states
- use their intervention pipeline
- and chain to a dataset?
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -182,7 +182,8 @@ def qc_ds(f):
for k in large_arrays_keys:
print('-'*80)
print(k)
hs = ds5[k]
max_rows = 1000
hs = ds5[k][:max_rows]
X = hs.reshape(hs.shape[0], -1)
@@ -190,7 +191,6 @@ def qc_ds(f):
# split
n = len(y)
max_rows = 1000
X_train, X_test = X[:n//2], X[n//2:]
y_train, y_test = y[:n//2], y[n//2:]
@@ -429,7 +429,7 @@ if __name__ == "__main__":
# get dataset filename
N = len(ds_tokens)
dataset_name = f"{sanitize(cfg.model)}_{ds_name}_{split_type}_{N}"
f = root_folder / '.ds'/ "{dataset_name}"
f = root_folder / '.ds'/ f"{dataset_name}"
ds1 = create_hs_ds(ds_name, ds_tokens, model, cfg, intervention_dicts=intervention, f=str(f))
+1 -1
View File
@@ -18,7 +18,7 @@ class ExtractConfig(Serializable):
# int4: bool = True
# """Whether to perform inference in mixed int8 precision with `bitsandbytes`."""
max_examples: tuple[int, int] = (800, 800)
max_examples: tuple[int, int] = (600, 600)
"""Maximum number of examples to use from each split of the dataset."""
num_shots: int = 1