Skip to content

Commit

Permalink
Add updated results
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Jul 15, 2024
1 parent c340602 commit 9907f27
Show file tree
Hide file tree
Showing 17 changed files with 17,385 additions and 6,135 deletions.
66 changes: 1 addition & 65 deletions examples/openwebtext/README.md

Large diffs are not rendered by default.

2,212 changes: 0 additions & 2,212 deletions examples/openwebtext/files/database.txt

This file was deleted.

2,498 changes: 2,498 additions & 0 deletions examples/openwebtext/files/scores_raw/ai.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2,330 changes: 2,330 additions & 0 deletions examples/openwebtext/files/scores_raw/cow.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"amp_scale": 65536.0,
"has_shared_parameters": false,
"covariance_max_examples": 100000,
"covariance_data_partitions": 1,
"covariance_data_partitions": 4,
"covariance_module_partitions": 2,
"activation_covariance_dtype": "torch.bfloat16",
"gradient_covariance_dtype": "torch.bfloat16",
"eigendecomposition_dtype": "torch.float64",
"lambda_max_examples": 100000,
"lambda_data_partitions": 1,
"lambda_data_partitions": 4,
"lambda_module_partitions": 4,
"use_iterative_lambda_aggregation": true,
"offload_activations_to_cpu": true,
Expand Down

Large diffs are not rendered by default.

2,430 changes: 2,430 additions & 0 deletions examples/openwebtext/files/scores_raw/math.txt

Large diffs are not rendered by default.

2,074 changes: 1,011 additions & 1,063 deletions examples/openwebtext/files/ml.txt → examples/openwebtext/files/scores_raw/ml.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "Dataset",
"dataset_size": 5,
"dataset_size": 10,
"indices": null
}
2,114 changes: 2,114 additions & 0 deletions examples/openwebtext/files/scores_raw/science.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"aggregate_train_gradients": false,
"use_measurement_for_self_influence": false,
"query_gradient_svd_dtype": "torch.float32",
"per_sample_gradient_dtype": "torch.bfloat16",
"precondition_dtype": "torch.bfloat16",
"per_sample_gradient_dtype": "torch.float32",
"precondition_dtype": "torch.float32",
"score_dtype": "torch.bfloat16"
}
2,060 changes: 2,060 additions & 0 deletions examples/openwebtext/files/scores_raw/water.txt

Large diffs are not rendered by default.

2,068 changes: 2,068 additions & 0 deletions examples/openwebtext/files/scores_raw/water_korean.txt

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions examples/openwebtext/inspect_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@


def main():
scores = Analyzer.load_file("influence_results/scores_jul_11_2024/pairwise_scores.safetensors")[
scores = Analyzer.load_file("influence_results/openwebtext/scores_raw/pairwise_scores.safetensors")[
"all_modules"
].float()

train_dataset = get_openwebtext_dataset()
eval_dataset = get_custom_dataset()
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_fast=True, trust_remote_code=True)

eval_idx = 4
eval_idx = 5
sorted_scores = torch.sort(scores[eval_idx], descending=True)
top_indices = sorted_scores.indices

Expand All @@ -29,9 +29,7 @@ def main():
plt.show()

print("Query Sequence:")
print(
"Prompt: " + eval_dataset[eval_idx]["prompt"] + "; Completion: " + eval_dataset[eval_idx]["completion"] + "\n"
)
print("Prompt:" + eval_dataset[eval_idx]["prompt"] + "; Completion:" + eval_dataset[eval_idx]["completion"] + "\n")

print("Top Influential Sequences:")
for i in range(100):
Expand Down

0 comments on commit 9907f27

Please sign in to comment.