GP2 Sarcasm Defuser

Description

GPT-2 model (small 0.1B parameters) fine-tuned to defues sarcasm. Example:

Prompt: So glad investment bankers and hedge funds make so much on the low wages these guys get.<|BOS|>
Generated after prompt: It's concerning that investment bankers and hedge funds are making so much on the low wages these workers receive.

(The model use the special <|BOS|> token as a marker for where the generated, defuse comment should start).

Training and Evaluation

The model has been trained on ~4500 sarcastic comments from the Sarcasm on Reddit Kaggle dataset. The dataset includes a selection of comments from Reddit that were marked as sarcastic by the author of the comment. Another ~500 comments have been used to test the trained model's performance.

In order to teach the model what a defused, not sarcastic comment looks like, we used a more powerful LLM to generate defused comments for the Kaggle dataset. We used the gemma-3-12b-it model with 12B parameters and we queried via the Google API with the following prompt for each comment:

given this sarcastic comment: <SARCASTIC_COMMENT>,
which is a response to this other comment: <CONTEXT>,
remove all the sarcasm from it while keeping the original meaning. Don't output anything else, and don't try to describe the comment in the third person",

where <SARCASTIC_COMMENT> is the sarcastic comment from the Kaggle dataset and <CONTEXT> is the comment that preceded the sarcstic comment (this comment was also available as part of the Kaggle dataset). This gives the LLM additional information on how to "translate" the sarcastic comment into a "normal" one.

How to use

Coming soon

Downloads last month
1
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for maxmarcon/gpt2-sarcasm-defuser

Finetuned
(2184)
this model

Evaluation results

  • sarcasm_prob_neutral:max on custom
    kaggle
    0.233
  • sarcasm_prob_neutral:mean on custom
    kaggle
    0.016
  • sarcasm_prob_neutral:min on custom
    kaggle
    0.003
  • sarcasm_prob_neutral:q1 on custom
    kaggle
    0.007
  • sarcasm_prob_neutral:q2 on custom
    kaggle
    0.010
  • sarcasm_prob_neutral:q3 on custom
    kaggle
    0.015
  • sarcasm_prob_neutral:std on custom
    kaggle
    0.024
  • sarcasm_prob_orig:max on custom
    kaggle
    0.952