
# distilbert-base-multilingual-cased-language_detection

This model is a fine-tuned version of [distilbert-base-multilingual-cased](https://huggingface.co/distilbert-base-multilingual-cased) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0595
- Accuracy: 0.9971
- F1
  - Weighted: 0.9971
  - Micro: 0.9971
  - Macro: 0.9977
- Recall
  - Weighted: 0.9971
  - Micro: 0.9971
  - Macro: 0.9974
- Precision
  - Weighted: 0.9971
  - Micro: 0.9971
  - Macro: 0.9981

## Model description

This is a classification model of 16 different languages.

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Language%20Detection/Language%20Detection-%2010k%20Samples/language_detection-10k.ipynb

## Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

## Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/basilb2s/language-detection

_Input Word Length:_

![Length of Input Text (in Words)](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Input%20Word%20Length.png)

_Input Word Length By Class:_

![Length of Input Text (in Words) By Class](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Input%20Word%20Length%20by%20Class.png)

_Class Distribution:_

![Class Distribution](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Class%20Distribution.png)

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 | Weighted Recall | Micro Recall | Macro Recall | Weighted Precision | Micro Precision | Macro Precision |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:--------:|:---------------:|:------------:|:------------:|:------------------:|:---------------:|:---------------:|
| 1.0783        | 1.0   | 128  | 0.1544          | 0.9823   | 0.9819      | 0.9823   | 0.9806   | 0.9823          | 0.9823       | 0.9798       | 0.9847             | 0.9823          | 0.9852          |
| 0.1189        | 2.0   | 256  | 0.0595          | 0.9971   | 0.9971      | 0.9971   | 0.9977   | 0.9971          | 0.9971       | 0.9974       | 0.9971             | 0.9971          | 0.9981          |
| 0.0651        | 3.0   | 384  | 0.0473          | 0.9971   | 0.9971      | 0.9971   | 0.9977   | 0.9971          | 0.9971       | 0.9974       | 0.9971             | 0.9971          | 0.9981          |


### Framework versions

- Transformers 4.26.1
- Pytorch 1.12.1
- Datasets 2.9.0
- Tokenizers 0.12.1
{"language": ["en"], "license": "apache-2.0", "tags": ["generated_from_trainer"], "metrics": ["accuracy", "f1", "recall", "precision"], "pipeline_tag": "text-classification", "model-index": [{"name": "distilbert-base-multilingual-cased-language_detection", "results": []}]}
transformers pytorch tensorboard distilbert text-classification generated_from_trainer en license:apache-2.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 

distilbert-base-multilingual-cased-language\_detection
======================================================


This model is a fine-tuned version of distilbert-base-multilingual-cased on the None dataset.
It achieves the following results on the evaluation set:


* Loss: 0.0595
* Accuracy: 0.9971
* F1
	+ Weighted: 0.9971
	+ Micro: 0.9971
	+ Macro: 0.9977
* Recall
	+ Weighted: 0.9971
	+ Micro: 0.9971
	+ Macro: 0.9974
* Precision
	+ Weighted: 0.9971
	+ Micro: 0.9971
	+ Macro: 0.9981


Model description
-----------------


This is a classification model of 16 different languages.


For more information on how it was created, check out the following link: URL


Intended uses & limitations
---------------------------


This model is intended to demonstrate my ability to solve a complex problem using technology.


Training and evaluation data
----------------------------


Dataset Source: URL


*Input Word Length:*


!Length of Input Text (in Words)


*Input Word Length By Class:*


!Length of Input Text (in Words) By Class


*Class Distribution:*


!Class Distribution


Training procedure
------------------


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-05
* train\_batch\_size: 64
* eval\_batch\_size: 64
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3


### Training results



### Framework versions


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-05
* train\_batch\_size: 64
* eval\_batch\_size: 64
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3 ### Training results ### Framework versions


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-05
* train\_batch\_size: 64
* eval\_batch\_size: 64
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3 ### Training results ### Framework versions


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-05
* train\_batch\_size: 64
* eval\_batch\_size: 64
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3### Training results### Framework versions


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1