
# XLM-RoBERTa (base) fine-tuned on HC3 for ChatGPT text detection

**XLM-RoBERTa** (base) fine-tuned on [Hello-SimpleAI](https://huggingface.co/Hello-SimpleAI) **HC3** corpus for **ChatGPT** text detection.

All credit to [Hello-SimpleAI](https://huggingface.co/Hello-SimpleAI) for their huge work!

## F1 score on test dataset: 0.9736

## The model
XLM-RoBERTa model pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages. It was introduced in the paper Unsupervised Cross-lingual Representation Learning at Scale by Conneau et al. and first released in this repository.

## The dataset

#### Human ChatGPT Comparison Corpus (HC3)
The first human-ChatGPT comparison corpus, named **HC3** dataset by [Hello-SimpleAI](https://huggingface.co/Hello-SimpleAI)

This dataset is introduced in the paper: 
- Paper: [***How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detection***](https://arxiv.org/abs/2301.07597)


## Metrics
|metric| value|
|------|------|
|F1    |0.9736|

## Usage
```py
from transformers import pipeline

ckpt = "mrm8488/xlm-roberta-base-finetuned-HC3-mix"

detector = pipeline('text-classification', model=ckpt)

text = "Here your text..."

result = detector(text)

print(result)
```



## Citation
```
@misc {manuel_romero_2023,
	author       = { {Manuel Romero} },
	title        = { xlm-roberta-base-finetuned-HC3-mix (Revision b18de48) },
	year         = 2023,
	url          = { https://huggingface.co/mrm8488/xlm-roberta-base-finetuned-HC3-mix },
	doi          = { 10.57967/hf/0306 },
	publisher    = { Hugging Face }
}
```
{"language": ["multilingual", "af", "am", "ar", "as", "az", "be", "bg", "bn", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fr", "fy", "ga", "gd", "gl", "gu", "ha", "he", "hi", "hr", "hu", "hy", "id", "is", "it", "ja", "jv", "ka", "kk", "km", "kn", "ko", "ku", "ky", "la", "lo", "lt", "lv", "mg", "mk", "ml", "mn", "mr", "ms", "my", "ne", "nl", false, "om", "or", "pa", "pl", "ps", "pt", "ro", "ru", "sa", "sd", "si", "sk", "sl", "so", "sq", "sr", "su", "sv", "sw", "ta", "te", "th", "tl", "tr", "ug", "uk", "ur", "uz", "vi", "xh", "yi"], "license": "openrail", "datasets": ["Hello-SimpleAI/HC3"], "metrics": ["f1"], "pipeline_tag": "text-classification", "widget": [{"text": "La Guerra Civil Espa\u00f1ola, que tuvo lugar entre 1936 y 1939, fue un conflicto sangriento y divisivo en el que se enfrentaron las fuerzas republicanas y las fuerzas nacionalistas lideradas por Francisco Franco. El origen de la guerra se remonta a las tensiones pol\u00edticas y sociales que se hab\u00edan ido acumulando en Espa\u00f1a durante a\u00f1os, incluyendo la lucha entre la izquierda y la derecha, el descontento popular con el gobierno y la crisis econ\u00f3mica.\nEl estallido de la guerra civil se produjo despu\u00e9s de las elecciones de febrero de 1936, en "}, {"text": "Crist\u00f3bal Col\u00f3n fue un navegante, cart\u00f3grafo y almirante espa\u00f1ol que llev\u00f3 a cabo cuatro viajes transatl\u00e1nticos entre 1492 y 1504. Es conocido por haber sido el primer europeo en llegar a Am\u00e9rica, aunque en realidad no fue el primer ser humano en alcanzar el continente, ya que los pueblos ind\u00edgenas ya habitaban all\u00ed desde hac\u00eda miles de a\u00f1os.\nCol\u00f3n naci\u00f3 en la ciudad italiana de G\u00e9nova en 1451. Aunque no se sabe con certeza d\u00f3nde recibi\u00f3 su formaci\u00f3n, se cree que tuvo una educaci\u00f3n marinera y cartogr\u00e1fica. A mediados de la d\u00e9cada de 1470, se traslad\u00f3 a Espa\u00f1a, donde trabaj\u00f3 como piloto y cart\u00f3grafo para la Casa de Contrataci\u00f3n de las Indias, una instituci\u00f3n encargada de las relaciones comerciales entre Espa\u00f1a y Am\u00e9rica."}, {"text": "Para usar un modelo pre-entrenado de la pipeline de clasificaci\u00f3n de texto de Hugging Face, primero debe instalar la \u00faltima versi\u00f3n de la biblioteca Hugging Face utilizando el comando !pip install transformers en su terminal o consola."}]}
transformers pytorch tensorboard safetensors xlm-roberta text-classification multilingual af am ar as az be bg bn br bs ca cs cy da de el en eo es et eu fa fi fr fy ga gd gl gu ha he hi hr hu hy id is it ja jv ka kk km kn ko ku ky la lo lt lv mg mk ml mn mr ms my ne nl no om or pa pl ps pt ro ru sa sd si sk sl so sq sr su sv sw ta te th tl tr ug uk ur uz vi xh yi dataset:Hello-SimpleAI/HC3 arxiv:2301.07597 doi:10.57967/hf/0306 license:openrail autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #tensorboard #safetensors #xlm-roberta #text-classification #multilingual #af #am #ar #as #az #be #bg #bn #br #bs #ca #cs #cy #da #de #el #en #eo #es #et #eu #fa #fi #fr #fy #ga #gd #gl #gu #ha #he #hi #hr #hu #hy #id #is #it #ja #jv #ka #kk #km #kn #ko #ku #ky #la #lo #lt #lv #mg #mk #ml #mn #mr #ms #my #ne #nl #no #om #or #pa #pl #ps #pt #ro #ru #sa #sd #si #sk #sl #so #sq #sr #su #sv #sw #ta #te #th #tl #tr #ug #uk #ur #uz #vi #xh #yi #dataset-Hello-SimpleAI/HC3 #arxiv-2301.07597 #doi-10.57967/hf/0306 #license-openrail #autotrain_compatible #endpoints_compatible #has_space #region-us 

XLM-RoBERTa (base) fine-tuned on HC3 for ChatGPT text detection
===============================================================


XLM-RoBERTa (base) fine-tuned on Hello-SimpleAI HC3 corpus for ChatGPT text detection.


All credit to Hello-SimpleAI for their huge work!


F1 score on test dataset: 0.9736
--------------------------------


The model
---------


XLM-RoBERTa model pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages. It was introduced in the paper Unsupervised Cross-lingual Representation Learning at Scale by Conneau et al. and first released in this repository.


The dataset
-----------


#### Human ChatGPT Comparison Corpus (HC3)


The first human-ChatGPT comparison corpus, named HC3 dataset by Hello-SimpleAI


This dataset is introduced in the paper:


* Paper: *How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detection*


Metrics
-------



Usage
-----



#### Human ChatGPT Comparison Corpus (HC3)


The first human-ChatGPT comparison corpus, named HC3 dataset by Hello-SimpleAI


This dataset is introduced in the paper:


* Paper: *How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detection*


Metrics
-------



Usage
-----
TAGS
#transformers #pytorch #tensorboard #safetensors #xlm-roberta #text-classification #multilingual #af #am #ar #as #az #be #bg #bn #br #bs #ca #cs #cy #da #de #el #en #eo #es #et #eu #fa #fi #fr #fy #ga #gd #gl #gu #ha #he #hi #hr #hu #hy #id #is #it #ja #jv #ka #kk #km #kn #ko #ku #ky #la #lo #lt #lv #mg #mk #ml #mn #mr #ms #my #ne #nl #no #om #or #pa #pl #ps #pt #ro #ru #sa #sd #si #sk #sl #so #sq #sr #su #sv #sw #ta #te #th #tl #tr #ug #uk #ur #uz #vi #xh #yi #dataset-Hello-SimpleAI/HC3 #arxiv-2301.07597 #doi-10.57967/hf/0306 #license-openrail #autotrain_compatible #endpoints_compatible #has_space #region-us 
 #### Human ChatGPT Comparison Corpus (HC3)


The first human-ChatGPT comparison corpus, named HC3 dataset by Hello-SimpleAI


This dataset is introduced in the paper:


* Paper: *How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detection*


Metrics
-------



Usage
-----
TAGS
#transformers #pytorch #tensorboard #safetensors #xlm-roberta #text-classification #multilingual #af #am #ar #as #az #be #bg #bn #br #bs #ca #cs #cy #da #de #el #en #eo #es #et #eu #fa #fi #fr #fy #ga #gd #gl #gu #ha #he #hi #hr #hu #hy #id #is #it #ja #jv #ka #kk #km #kn #ko #ku #ky #la #lo #lt #lv #mg #mk #ml #mn #mr #ms #my #ne #nl #no #om #or #pa #pl #ps #pt #ro #ru #sa #sd #si #sk #sl #so #sq #sr #su #sv #sw #ta #te #th #tl #tr #ug #uk #ur #uz #vi #xh #yi #dataset-Hello-SimpleAI/HC3 #arxiv-2301.07597 #doi-10.57967/hf/0306 #license-openrail #autotrain_compatible #endpoints_compatible #has_space #region-us 
#### Human ChatGPT Comparison Corpus (HC3)


The first human-ChatGPT comparison corpus, named HC3 dataset by Hello-SimpleAI


This dataset is introduced in the paper:


* Paper: *How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detection*


Metrics
-------



Usage
-----