Skip to content

Commit 92790cd

Browse files
authored
📝🎯 Added README for SNLI Classifier Training (#1173)
📝🎯 Added Concise and Informative README for SNLI Classifier Training 📘🚀 Introduced a comprehensive README outlining the project overview and detailed usage instructions for the SNLI Classifier training scripts.
1 parent 7f7c222 commit 92790cd

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Diff for: legacy/snli/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PyTorch-based NLI Training with SNLI
2+
3+
## 📝 Overview
4+
5+
This repository contains Python scripts to train a Natural Language Inference (NLI) model, specifically the `SNLIClassifier`, using the Stanford Natural Language Inference (SNLI) corpus. The trained model predicts textual entailment, identifying if a statement is entailed, contradicted, or neither by another statement.
6+
7+
## ⚙️ Dependencies
8+
9+
Install the necessary Python libraries with:
10+
11+
```bash
12+
pip install -r requirements.txt
13+
```
14+
15+
The `requirements.txt` file includes:
16+
17+
```
18+
torch
19+
torchtext
20+
spacy
21+
```
22+
23+
## 💻 Usage
24+
25+
Start the training process with:
26+
27+
```bash
28+
python train.py --lower --word-vectors [PATH_TO_WORD_VECTORS] --vector-cache [PATH_TO_VECTOR_CACHE] --epochs [NUMBER_OF_EPOCHS] --batch-size [BATCH_SIZE] --save-path [PATH_TO_SAVE_MODEL] --gpu [GPU_NUMBER]
29+
```
30+
31+
## 🏋️‍♀️ Training
32+
33+
The script trains the model on mini-batches of data across a specified number of epochs. It saves the best-performing model on the validation set as a `.pt` file in the specified directory.
34+
35+
## 📚 Scripts
36+
37+
- `model.py`: Defines the `SNLIClassifier` model and auxiliary classes.
38+
- `util.py`: Contains utility functions for directory creation and command-line argument parsing.
39+
40+
## 📣 Note
41+
42+
Ensure the `model.py` and `util.py` scripts are available in your working directory.

0 commit comments

Comments
 (0)