ericwtodd/function_vectors
关于
Function Vectors in Large Language Models (ICLR 2024)
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Function Vectors in Large Language Models
Project Website | Arxiv Preprint | OpenReview
This repository contains data and code for the paper: Function Vectors in Large Language Models.
Setup
We recommend using conda as a package manager.
The environment used for this project can be found in the fv_environment.yml file.
To install, you can run:
conda env create -f fv_environment.yml
conda activate fv
Demo Notebook
Checkout notebooks/fv_demo.ipynb for a jupyter notebook with a demo of how to create a function vector and use it in different contexts.
Data
The datasets used in our project can be found in the dataset_files folder.
Code
Our main evaluation scripts are contained in the src directory with sample script wrappers in src/eval_scripts.
Other main code is split into various util files:
eval_utils.pycontains code for evaluating function vectors in a variety of contextsextract_utils.pycontains functions for extracting function vectors and other relevant model activations.intervention_utils.pycontains main functionality for intervening with function vectors during inferencemodel_utils.pycontains helpful functions for loading models & tokenizers from huggingfaceprompt_utils.pycontains data loading and prompt creation functionality
Citing our work
This work appeared at ICLR 2024. The paper can be cited as follows:
@inproceedings{todd2024function,
title={Function Vectors in Large Language Models},
author={Eric Todd and Millicent L. Li and Arnab Sen Sharma and Aaron Mueller and Byron C. Wallace and David Bau},
booktitle={The Twelfth International Conference on Learning Representations},
url={https://openreview.net/forum?id=AwyxtyMwaG},
note={arXiv:2310.15213},
year={2024},
}
探索相关项目
加载中…