From e8d514da6d5376bb99877e3b0ad8453bf3863b3e Mon Sep 17 00:00:00 2001
From: Alexandru Gherghescu <gherghescu_alex1@yahoo.ro>
Date: Tue, 4 Jun 2024 13:35:26 +0300
Subject: [PATCH] Add conda environment file, update README

---
 README.md     | 29 +++++++++--------------------
 conda-env.yml | 15 +++++++++++++++
 2 files changed, 24 insertions(+), 20 deletions(-)
 create mode 100644 conda-env.yml

diff --git a/README.md b/README.md
index 01c2bdf..c0bac31 100644
--- a/README.md
+++ b/README.md
@@ -15,25 +15,13 @@ After training a model (or getting hold of one from other sources), there's an
 example on how to run inference in `inference.py`. It uses nucleus sampling,
 with adjustable top-p threshold and temperature values.
 
-## Basic building blocks
-
-As PyTorch itself, this framework is split between a number of modules. The
-most important modules are the `OptimusDataLoader`, the `Dataset`s, the
-`Trainer`, the tokenizers and the models. These can be combined and adapted in
-any way, shape or form to train a model from scratch.
-
 ## Custom training
 
-The usual workflow for a user is to create and train a tokenizer (see
-`optimus/tokenizers` for an example), model a dataset (see `optimus/datasets`
-for an example), create a model architecture (see `optimus/models` as an
-example) and use the data loader and the trainer modules to train the model. The
-`Trainer` module has a number of useful options which can be used during
-training (mixed precision training, checkpointing, gradient accumulation,
-plotting the training loss etc.; see `optimus/trainer.py` for what the Trainer
-is capable of).
-
-Of course, any number of the above can be used as defaults.
+The usual workflow for a user is to create a model architecture (see
+`optimus/models` as an example) and use the trainer modules to train the model.
+The `Trainer` module has a number of useful options which can be used during
+training (mixed precision training, checkpointing, gradient accumulation etc.;
+see `optimus/trainer.py` for what the Trainer is capable of).
 
 > [!TIP]
 > You can choose which GPU's to train on, using the environment variable
@@ -42,10 +30,11 @@ Of course, any number of the above can be used as defaults.
 
 ## Required packages
 
-There are a number of packages required to run the framework. Get your closest
-Python retailer and ask him to run the following command:
+There are a number of packages required to run the framework. There's a
+convenience `conda-env.yml` file that should most likely cover every use case.
+Get your closest Python retailer and ask him to run the following command:
 
-`pip install torch fire sentencepiece fastprogress`
+`conda env create -f conda-env.yml`
 
 ## License
 
diff --git a/conda-env.yml b/conda-env.yml
new file mode 100644
index 0000000..86b10d7
--- /dev/null
+++ b/conda-env.yml
@@ -0,0 +1,15 @@
+name: conda-env
+channels:
+  - conda-forge
+dependencies:
+  - python==3.10.13
+  - pip==23.3.1
+  - nvidia::cuda-nvcc
+  - pip:
+    - torch==2.2.2
+    - torchaudio==2.2.2
+    - torchvision==0.17.2
+    - transformers==4.40.0
+    - datasets==2.18.0
+    - fire==0.6.0
+    - tqdm==4.66.4
-- 
GitLab