coder3101 commited on
Commit
a2b162f
·
verified ·
1 Parent(s): 00c9741

Upload reproduce/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. reproduce/README.md +59 -0
reproduce/README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reproduction guide
2
+
3
+ This directory contains the necessary information and assets to reproduce the results obtained during this Heretic run.
4
+ > [!WARNING]
5
+ > **Local code**
6
+ >
7
+ > This system installed Heretic from a local directory or wheel. Uncommitted or experimental code may have been executed.
8
+ >
9
+ > Reproducibility *cannot* be guaranteed in this environment.
10
+
11
+
12
+ ## Models
13
+
14
+ - **Base model:** [TheDrummer/Artemis-31B-v1.1](https://huggingface.co/TheDrummer/Artemis-31B-v1.1) (Commit: [`d613e5a`](https://huggingface.co/TheDrummer/Artemis-31B-v1.1/commit/d613e5a4ee45e0fcf1f61ea3e10b6438bbe421cc))
15
+
16
+ ## Datasets
17
+
18
+ - **Good prompts:** [mlabonne/harmless_alpaca](https://huggingface.co/datasets/mlabonne/harmless_alpaca) (Commit: [`02c6a92`](https://huggingface.co/datasets/mlabonne/harmless_alpaca/commit/02c6a92cfcf11bb0c387334f8146d149d65b587f))
19
+ - **Bad prompts:** [mlabonne/harmful_behaviors](https://huggingface.co/datasets/mlabonne/harmful_behaviors) (Commit: [`01cead0`](https://huggingface.co/datasets/mlabonne/harmful_behaviors/commit/01cead01398926d81f7c52bdb790ee8cf77ebba7))
20
+
21
+ ## Selected trial
22
+
23
+ - **Trial number:** 150
24
+ - **Refusals:** 30/100 (baseline: 90/100)
25
+ - **KL divergence:** 0.0083 (baseline: 0 *(by definition)*)
26
+
27
+ ## Environment
28
+
29
+ - **Heretic:** v2.0.0.dev0 (Origin: Local)
30
+ - **PyTorch:** 2.12.0+cu130
31
+ - **Other dependencies:** See [`requirements.txt`](requirements.txt).
32
+
33
+ ## Contents of this directory
34
+
35
+ - [`requirements.txt`](requirements.txt): The exact versions of all Python packages.
36
+ - [`config.toml`](config.toml): The exact configuration used, including the RNG seed.
37
+ - [`TheDrummer--Artemis-31B-v1--1.jsonl`](TheDrummer--Artemis-31B-v1--1.jsonl): The Optuna study journal containing the history of all trials.
38
+ - [`SHA256SUMS`](SHA256SUMS): Cryptographic hashes for all weight files.
39
+ - [`reproduce.json`](reproduce.json): A machine-readable file containing all reproducibility information.
40
+
41
+ ## How to reproduce
42
+
43
+ > [!TIP]
44
+ > You can automate this process, including all verification steps, by downloading the `reproduce.json` file and running
45
+ > `heretic --reproduce reproduce.json`.
46
+
47
+ 1. Install the exact version of Heretic indicated in the **Environment** section above, from its original source.
48
+ 1. Install the packages listed in `requirements.txt`: `pip install -r requirements.txt`
49
+ 1. Install the correct version of PyTorch: `pip install torch==2.12.0+cu130 --index-url https://download.pytorch.org/whl/cu130`
50
+ 1. Place the provided `config.toml` in your working directory.
51
+ 1. Run Heretic without any additional arguments: `heretic`
52
+ 1. Wait for the run to finish, then select trial **150** and export the model.
53
+ 1. Verify that the weight files have been exactly reproduced by comparing their SHA-256 hashes against those in `SHA256SUMS`:
54
+ `sha256sum -c SHA256SUMS` (or look at the hashes online if you uploaded to Hugging Face)
55
+
56
+ > [!TIP]
57
+ > To use the included Optuna study journal `TheDrummer--Artemis-31B-v1--1.jsonl`, place it in the checkpoints directory (usually `checkpoints/`) before running Heretic.
58
+ >
59
+ > This allows you to export other models from the Pareto front, or to run additional trials without having to re-run the stored trials.