Giter Club home page Giter Club logo

cobra-frames's Introduction

Cobra Frames

Python 3.11 pre-commit Code style: black Checked with mypy

Getting started

  • The source code is built aroud PyTorch, and has the following main dependencies:

    • Python 3.8
    • PyTorch 1.12.1
    • transformers 4.22.2

    For more extensive dependencies, see requirements.txt. A recommended way to install the dependencies is via Anaconda:

    conda create -n cobra python=3.8
    conda activate cobra
    conda install -c conda-forge pip # make sure pip is installed
    python -m pip install -r requirements.txt # make sure the packages are installed in the specific conda environment
    python -m pip install -e .
  • We use pre-commit hooks to unify the code style, please refer to https://pre-commit.com/ for installation and usage.

Training and Evaluation

Please refer to scripts/explain_model/train_explain_model.sh and scripts/predict_explain_model.sh for training and evaluation scripts.

Citation

If you find this repository useful in your research, please cite the following paper:

@inproceedings{zhou2023cobraframes,
  title={COBRA Frames: Contextual Reasoning about Effects and Harms of Offensive Statements},
  author={Zhou, Xuhui and Zhu, Hao and Yerukola, Akhila and Davidson, Thomas and Hwang, Jena D. and Swayamdipta, Swabha and Sap, Maarten},
  year={2023},
  booktitle={Findings of ACL},
  url={http://arxiv.org/abs/2306.01985}
}

cobra-frames's People

Contributors

xuhuizhou avatar prokil avatar maartensap avatar akhila-yerukola avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.