Downloads · 30 days
16
0% of all-time downloads
as-cle-bert/distilgpt2-finetuned-microbiology
distilgpt2-finetuned-microbiology is a text generation model from as-cle-bert. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Small model for language modeling based on distilgpt2 and on microbiology-related text data. It achieves the following results on the evaluation set: - Loss: 2.1073
Downloads · 30 days
16
0% of all-time downloads
All-time downloads
61.8K
Public
Parameters
81.9M
983 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors328 MB · 100%
From the Hugging Face model README
Small model for language modeling based on distilgpt2 and on microbiology-related text data. It achieves the following results on the evaluation set:
This model was finetuned solely for academic purposes, specifically:
Keep in mind that the model itself does not always provide correct informtion, so always double check everything.
distilgpt2-finetuned-microbiology must not be used for medical/health purposes, as it was not trained for that.
Besides the limitations already highlighted for distilgpt2, distilgpt2-finetuned-microbiology was trained on a small microbiology-related texts dataset, so its knowledge is not nearly as comprehensive as many other sources of information. It is still useful when employed as assistant, not as substitute of human researchers/experts.
Training data were taken from Biology dataset on HuggingFace, and microbiology texts were extracted from the .parquet file associated with this dataset, following this workflow:
Find all files and scripts on GitHub:
# UNZIP LARGE DATA FILES
gzip -d data/*.gz
# CONVERT .parquet FILE TO .jsonl
python3 scripts/parquet_to_jsonl.py
# FILTER MICROBIOLOGY TEXTS FROM microbiology.jsonl
python3 scripts/data_preprocess.py
Training procedure is as descripted by this HuggingFace notebook.
You can find the related script on GitHub.
You only have to run this command, once you preprocessed and extracted everything.
#GENERATE MODEL
python3 scripts/build_distilgpt2-finetuned-microbiology.py
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 1.0 | 364 | 2.2399 |
| 2.4867 | 2.0 | 728 | 2.1351 |
| 2.213 | 3.0 | 1092 | 2.1073 |
Here is a snippet code on how to load the model in python:
model_checkpoint = "as-cle-bert/distilgpt2-finetuned-microbiology"
# Load necessary dependencies
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModelForCausalLM.from_pretrained(model_checkpoint)
.parquet file associated with this dataset and put in microbiology.jsonl