maxmarcon commited on
Commit
bb96230
·
verified ·
1 Parent(s): cdbd549

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -1
README.md CHANGED
@@ -430,7 +430,35 @@ model-index:
430
 
431
  ## Description
432
 
433
- Generative transformer that defuses sarcasm by translating sarcastic comment into "neutral" ones.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
435
  ## How to use
436
 
 
430
 
431
  ## Description
432
 
433
+
434
+ GPT-2 model (small 0.1B parameters) fine-tuned to defues sarcasm. Example:
435
+
436
+ ```
437
+ Prompt: So glad investment bankers and hedge funds make so much on the low wages these guys get.<|BOS|>
438
+ Generated after prompt: It's concerning that investment bankers and hedge funds are making so much on the low wages these workers receive.
439
+ ```
440
+
441
+ (The model use the special `<|BOS|>` token as a marker for where the generated, defuse comment should start).
442
+
443
+
444
+ ## Training and Evaluation
445
+
446
+ The model has been trained on ~4500 sarcastic comments from the [Sarcasm on Reddit](https://www.kaggle.com/datasets/danofer/sarcasm/data) Kaggle dataset. The dataset includes
447
+ a selection of comments from Reddit that were marked as sarcastic by the author of the comment.
448
+ Another ~500 comments have been used to test the trained model's performance.
449
+
450
+ 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.
451
+ We used the [gemma-3-12b-it](https://ai.google.dev/gemma/docs/core) model with 12B parameters and we queried via the Google API with the following prompt for each comment:
452
+
453
+ ```
454
+ given this sarcastic comment: <SARCASTIC_COMMENT>,
455
+ which is a response to this other comment: <CONTEXT>,
456
+ 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",
457
+ ```
458
+
459
+ 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
460
+ available as part of the Kaggle dataset). This gives the LLM additional information on how to "translate" the sarcastic comment into a "normal" one.
461
+
462
 
463
  ## How to use
464