Jonny00's picture
Update README.md
67d525b
metadata
library_name: peft
base_model: ericzzz/falcon-rw-1b-instruct-openorca
license: apache-2.0
language:
  - en

Model Description

Quick and dirty hack for binary movie sentiment analysis.

Finetuned with LoRA (PEFT) on ericzzz/falcon-rw-1b-instruct-openorca.

Trained on a subset of IMDB Dataset of 50K Movie Reviews from Kaggle:

To load the model you can use this code:

PEFT_MODEL = "Jonny00/falcon-1b-movie-sentiment-analysis"

config = PeftConfig.from_pretrained(PEFT_MODEL)
model = AutoModelForCausalLM.from_pretrained(
config.base_model_name_or_path,
return_dict=True,
device_map="auto",
trust_remote_code=True)

tokenizer=AutoTokenizer.from_pretrained(config.base_model_name_or_path)
tokenizer.pad_token = tokenizer.eos_token

model = PeftModel.from_pretrained(model, PEFT_MODEL)

Input: ("<human>: This movie sucks, I'd rather stay at home! <assistant>:")

Output: ("... negative <assistant>: negative <assistant>: negative ...")

Example Google Colab Code

https://colab.research.google.com/drive/1LUILztSocpqpMz8xACbtmxl-W-cORXRZ?usp=sharing

Framework versions

  • PEFT 0.7.1