Run this model with HF Jobs
Run cointegrated/roberta-base-formality on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cointegrated/roberta-base-formality. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cointegrated/roberta-base-formality on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cointegrated/roberta-base-formality with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cointegrated/roberta-base-formality with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cointegrated/roberta-base-formality")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cointegrated/roberta-base-formality") model = AutoModelForSequenceClassification.from_pretrained("cointegrated/roberta-base-formality", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Card for roberta-base-formality
FacebookAI/roberta-base model, fine-tuned as a binary classifier of formality on the GYAFC dataset.
Model Details
Model Description
- Developed by: @cointegrated
- Model type: classifier
- Language(s) (NLP): English
- License: probably MIT (as the base model), but please double-check the GYAFC terms of usage
The model has been trained for 5 epochs on the GYAFC train split with batch size of 32 and Adam optimizer with learning rate of 1e-5.
The evaluation results are: 99.13% ROC AUC on the dev split, and 99.20% ROC AUC on the test split.
Uses
Classification of formality of texts; originally intended as a tool for evaluating text style transfer.
Class 1 denotes formal texts, and class 0, informal texts.
Note that this model is not expected to perform well in any languages other than English or in any domains distant from the GYAFC data distribution (Yahoo Answers sentences for "Entertainment & Music" and "Family & Relationships" categories). Also, as a binary classifier, this model may not handle intermediate degrees of formality inadequately. If you want to rank texts by varying degrees of formality, s-nlp/roberta-base-formality-ranker (a later version of this model, trained more contrastively) might be a better choice.
- Downloads last month
- 98