Skip to content

nuprl/codetrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2f3ba46 · Feb 25, 2025
Feb 25, 2025
Feb 25, 2025
Nov 14, 2024
Dec 10, 2024
Nov 4, 2024
Feb 25, 2025
Feb 25, 2025
Feb 25, 2025
Nov 18, 2024
Nov 14, 2024
Nov 18, 2024

Repository files navigation

Codetrace

This repo contains the code for the paper Understanding How CodeLLMs (Mis)Predict Types with Activation Steering. Please cite as:

@article{lucchetti2024understanding,
  title={Understanding How CodeLLMs (Mis) Predict Types with Activation Steering},
  author={Lucchetti, Francesca and Guha, Arjun},
  journal={arXiv preprint arXiv:2404.01903},
  year={2024}
}

Prerequisites

This repo requires tree-sitter, vllm and nnsight. We used separate environments for each (see requirements file) but for newer versions this is no longer necessary.

Installation

TypeScript is required for typechecking. To install TS:

// install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
// run nvm bash script
source ~/.bashrc
// install node
nvm install node
// install ts-node
mkdir ~/.npm_packages
npm install --prefix ~/.npm_packages ts-node typescript '@types/node'
npx --cache ~/.npm_packages ts-node --typeCheck <prog.ts>

To build the package:

python -m build
export PYTHONPATH=/path/to/your/package:$PYTHONPATH

To add environment to jupyter kernel, in jupyer kernel.json add env var, then restart vscode.

"env": {"PYTHONPATH": "/path/to/your/package:$PYTHONPATH"}`

About

No description, website, or topics provided.

Resources

License

Citation

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published