From 021bf900d11feff6beb414080b8b58aca64b8f61 Mon Sep 17 00:00:00 2001 From: Kevin Maik Jablonka Date: Mon, 2 Oct 2023 08:06:26 +0200 Subject: [PATCH] update docs --- .gitignore | 2 ++ docs/source/usage.rst | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index fefaf5f..ac7e9ed 100644 --- a/.gitignore +++ b/.gitignore @@ -899,3 +899,5 @@ FodyWeavers.xsd # End of https://www.toptal.com/developers/gitignore/api/macos,linux,windows,python,jupyternotebooks,jetbrains,pycharm,vim,emacs,visualstudiocode,visualstudio scratch/ +*.pkl +*.db \ No newline at end of file diff --git a/docs/source/usage.rst b/docs/source/usage.rst index e535ef2..9fa2ef3 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -19,6 +19,19 @@ Fine-tuning Classification ----------------- +To handle the different model types, we provide a :code:`ChemLIFTClassifierFactory` that allows to easily create a classifier objects for the different model types. + +```python + +from chemlift.finetuning.classifier import ChemLIFTClassifierFactory + +model = ChemLIFTClassifierFactory('EleutherAI/gpt-neo-125m', load_in_8bit=False).create_model() +model.fit(X, y) +model.predict(X) +``` + +The model name can be any model name that is supported by the transformers library. +In addition to that, we also support OpenAI models, if you prefix the model name with :code:`openai/`, e.g. :code:`openai/text-davinci-003`. Regression