Skip to content

Files

Latest commit

Jun 23, 2024
a465ef4 · Jun 23, 2024

History

History

bias_tracing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024
Jun 23, 2024

Bias Tracing

Trace bias effect in states of language model.

Tracing

Run the scripts bash scripts/gpt2m.sh.

Results are saved in ./results.

Histograms

>>> python fig.py -h
    usage: fig.py [-h] [--root ROOT] [--num_layer NUM_LAYER] [--model_name MODEL_NAME] [--bias {gender,race}] [--num_sample NUM_SAMPLE]

    optional arguments:
    -h, --help            show this help message and exit
    --root ROOT           the path of results
    --num_layer NUM_LAYER
                            The num of model layers.
    --model_name MODEL_NAME
                            The model name.
    --bias {gender,race}  The bias type.
    --num_sample NUM_SAMPLE
                            The num of samples

Thanks for the original code from ROME.