| language: en | |
| license: mit | |
| pipeline_tag: text-classification | |
| tags: | |
| - sarcasm | |
| - text-classification | |
| - bert | |
| - custom-code | |
| # loyongzhe/sarcasm-classifier-binary | |
| Binary sarcasm classifier. | |
| ## Architecture | |
| - Encoder: `bert-base-uncased` | |
| - Pooling: CLS | |
| - Head: MLP hidden size 256 | |
| - Labels: | |
| - 0 = not_sarcastic | |
| - 1 = sarcastic | |
| ## Load | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForSequenceClassification | |
| repo_id = "loyongzhe/sarcasm-classifier-binary" | |
| tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True) | |
| model = AutoModelForSequenceClassification.from_pretrained( | |
| repo_id, | |
| trust_remote_code=True, | |
| ) | |
| ``` | |