Skip to main content

Analyzing priming effects in a few shot setting environment

Project description

Analyzing Priming Effect in Prompt-based learning

How does priming affect prompt-based learing? This project aims at analyzing this effect in stance classification. We train a stance classifier on the ibm stance classification dataset by fine-tuning a GPT-2 model with a prompt and analzing how does the selection of the few shots used in the prompt affect the performance of the model. Our main assumption is that the examples chosen should be chosen in a diverse manner with regard topic.

  1. To evaluate the prompt-fine-tuning, run the following command
  • Hyperparamter optimization
python scripts/run_prompt_fine_tuning.py --validate --optimize 
  • Best Hyperparameters
python scripts/run_prompt_fine_tuning.py --validate --optimize 
  1. To evaluate the in-context (prompt) setup run
python scripts/run_prompt_fine_tuning.py --validate --optimize 
  1. To evaluate DeBERTa (a normal classifier) with all hyperparameters, run the following
python scripts/optimize_baseline.py 

The results of the experiments will be logged to your home directory. The parameters can be saved in config.yaml

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

few_shot_priming-0.0.437-py3-none-any.whl (4.9 MB view details)

Uploaded Python 3

File details

Details for the file few_shot_priming-0.0.437-py3-none-any.whl.

File metadata

File hashes

Hashes for few_shot_priming-0.0.437-py3-none-any.whl
Algorithm Hash digest
SHA256 cd75153bda1f11d94415ef2d3a5893c7589a187a102eb3d6dc93baaef7480603
MD5 d4c15f61afed6f581420c37954b0889b
BLAKE2b-256 1c61d21e4625e4d75c08b20ae78a599386e3b7a4481bc4d14df15545391bf80d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page