pyreft icon indicating copy to clipboard operation
pyreft copied to clipboard

ReFT: Representation Finetuning for Language Models

Results 28 pyreft issues
Sort by recently updated
recently updated
newest added

**Descriptions:** `pyvene` library was designed for model interpretability, not for some production use case which requires training and inference efficiency. `pyreft` is different. It will have some practical use cases,...

enhancement
help wanted

I would appreciate support for the OpenAI clip model, Note that PEFT also still has issues with OpenAI CLIP model support. https://github.com/huggingface/peft/issues/761 https://openai.com/research/clip

enhancement

When memorizing a sequence (1D intervention) is it possible to attend to it, as in 'where is GO-> located' (Stanford).? I'd be interested in using pyreft for 'online-learning' similar to...

question

I'm raising the issue that in terms of "production readyness" (statet goal) pyreft, designed as a very thoughtful library, will need to work together with tooling that expects a loadable...

question

code: import torch import transformers from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments import pyreft from huggingface_hub import login login(token="***") model_name_or_path = "meta-llama/Meta-Llama-3-8B" device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model =...

question

Using below configuration but unable to replicate paper results. Is there anything different that the authors have done in the paper? Got {'validation_matthews_correlation': 0.40104291315665774} finally instead of ~61%. Should SEED,...

bug
question

After updating pyreft recently I'm encountering errors when loading a trained model. This applies to newly trained models as well as prev. trained models. I'm loading from disk. the error...

question

From @Jemoka when trying to save/load a bert. ``` File ~/Documents/Projects/dropval/playground/dropval/trainers/reft.py:213, in ReFTrainer.load(self, path) 210 del model.config.__dict__["use_cache"] 211 model = model.train() --> 213 self.model = pyreft.ReftModel.load( 214 str(Path(path)/"intervention"), 215 model...

Does the backbone pyvene support more than two intervention blocks on one layer? I met `anaconda3/envs/reft_train/lib/python3.10/site-packages/pyvene/models/intervenable_base.py", line 1092, in _wait_for_forward_with_parallel_intervention unit_locations_base[ IndexError: list index out of range` when I tried...

question

Much simplified codebase of ReFT-VLBart implementation. Note: transformers 4.33.1 is required, to be compatible with the Bart model version used by this branch. Therefore, this ReFT version needs to talk...