denizbt/pan-style-analysis-models
Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
These .pth files are state dictionaries of my custom defined BertStyleNN, which combines an encoder and sequence classification head. The models are fine-tuned from their titular model i.e. pan-style-analysis-models/roberta-base.pth was fine-tuend using roberta-base as the encoder and my custom defined MLP StyleNN. The state dictionaries include the fine-tuned weights for both the encoder and FFNN which acts the sequence classification head (for binary classification). I call this encodr + sequence classification model, BertStyleNN. To use the state dictionaries, they must be loaded into a BertStyleNN.
These models are fine-tuned for multi-author style analysis on a dataset of sentence pairs; the training objective was to classify sentence pairs as either written by same author (0) or different authors (1). The PAN Multi-Author Style Analysis shared task data from 2025 was used for all models; it can be downloaded here (all three difficulty levels were combined to create the training set).
More information about BertStyleNN, including model architecture, logs, and training hyperparameters can be found in this repository.
Model Details
- Developed by: Deniz Boloni-Turgut
- Model type: Sentence Pair Classification; encoder: SentenceTransformers & BERT family models, binary classification head: custom MLP
- Language(s) (NLP): english
- License: MIT
Model Sources
- Repository: denizbt/pan-styleAnalysis25
- Paper: coming soon!
How to Get Started with the Model
Example downloading state dictionary for fine-tuned roberta-base to current directory.
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id='denizbt/pan-style-analysis-models', filename='roberta-base.pth', local_dir='.')Loading state dictionary into BertStleNN (import from [this repo]())
import torch
from models import BertStyleNN
device = "cuda" if torch.cuda.is_available() else "cpu"
# Create model instance
model_name = "roberta-base"
model = BertStyleNN(enc_model_name=model_name, use_sentence_transformers=False) # set use_sentence_transfomers to True if loading sentence-transformers model
state_dict_path = "TODO replace this with the location where you downloaded models from the HF hub"
# Load state dict and map to current device
state_dict = torch.load(state_dict_path, map_location=device)
model.load_state_dict(state_dict)Citation
coming soon! <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
Model Card Contact
Deniz Boloni-Turgut (db823@cornell.edu)
