Llama 2: Open Foundation and Fine-Tuned Chat Models
Paper • 2307.09288 • Published • 252
How to use Cyrus1020/llama2-prompt-av-binary-lora with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Cyrus1020/llama2-prompt-av-binary-lora") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Cyrus1020/llama2-prompt-av-binary-lora")
model = AutoModelForSequenceClassification.from_pretrained("Cyrus1020/llama2-prompt-av-binary-lora")language: en license: cc-by-4.0 tags:
This model is trained as part of the coursework of COMP34812.
This is a binary classification model that was trained with prompt input to detect whether two pieces of text were written by the same author.
This model is based on a Llama2 model that was fine-tuned on 30K pairs of texts for authorship verification. The model is fine-tuned with prompt inputs to utilize the model's linguistic knowledge. To run the model, the demo code is provided in demo.ipynb submitted. It is advised to use the pre-processing and post-processing functions (provided in demo.ipynb) along with the model for best results.