Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

97 Commits

Folders and files

Repository files navigation

CS6263 Assignment2 - Jason Johnson

Instructions

Envrionment Setup

To run, first load the environment from the environment.yml file with:

conda env create -f environment.yml

Then activate it:

conda activate assignment2

You may need to install the transformers library manually since we are using a forked version:

pip uninstall transformers
pip install -e transformers-dola-main

Execution

In order to run inferences for the various layer outputs on the model run:

python Evaluation_Layers.py

Assignment Discussion

1) We would like for you to present and visualize the probabilities of each token in the vocabulary from early exit layers (premature vocabulary distribution layers) vs. mature layer (last layer – Layer 32).

Layer 8

token_probability_layer_8

Layer 16

token_probability_layer_16

Layer 24

token_probability_layer_24

Layer 32

token_probability_layer_32

2) If you recall the paper we reviews on consistency checking used several models, do you think we can use consistency check method between these layers for factuality analysis? Present your approach and results including discussion. Yes I believe consistency checking would be somewhat effective by looking at the different layers. Intuitively, if a token had a high probability in all observered layers, one could expect that that token is solid and not being hallucinated. The token would have "survived" so many layers, meaning that the model always had high confidence in it.

3) Write another discussion explaining the how the layers effect on the different metrics on your trained model from assignment 1.c.

image

Interestingly the model seems to improve slightly from Layer 8 to Layer 16, but then regess a bit in Layer 24. At the top layer, 32, it performs the best across all metrics. BERTScore shows the least amount ofchange from layer to layer, probably because it is a more robust to words that are similar. Rouge and CodeBLEU followed a pattern that I mentioned above more decidedly. At the final layer, CodeBLEU score was more than double the score of any of the other layers.

Special Thanks

DOLA: https://github.com/voidism/DoLa

DOLA Transformers: https://github.com/voidism/transformers-dola/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages