book genre classification

davanstrien

Introduction

The davanstrien/book-genre-classification is an adapter for the bert-base-cased model, specifically tailored for text classification tasks related to book genres. Developed with the adapter-transformers library, it includes a prediction head for efficient classification.

Architecture

The adapter architecture builds upon the bert-base-cased model, utilizing the adapter-transformers library. This setup allows for efficient model fine-tuning with minimal additional parameters, facilitating quick adaptation to specific tasks like book genre classification.

Training

The model was trained using the text classification dataset available on AdapterHub. This training process involved fine-tuning the BERT model with additional adapter layers to specialize in distinguishing between different book genres.

Guide: Running Locally

To run this model locally, follow these steps:

  1. Install adapter-transformers:

    pip install -U adapter-transformers
    
  2. Load and Activate the Adapter:

    from transformers import AutoModelWithHeads
    
    model = AutoModelWithHeads.from_pretrained("bert-base-cased")
    adapter_name = model.load_adapter("davanstrien/book-genre-classification", source="hf", set_active=True)
    

For optimal performance, especially during training or extensive inference tasks, consider using cloud-based GPU services such as AWS EC2 with GPU instances, Google Cloud Platform, or Azure's GPU VMs.

License

The project does not specify a particular license in the provided documentation. Users should verify any licensing details directly from the source repository or contact the author for clarification.

More Related APIs