Published July 6, 2023 | Version v1

Aligning Documentation and Q\&A Forum through Constrained Decoding with Weak Supervision

  • 1. Rohith
  • 2. Shiyuan
  • 3. Iftekhar
  • 4. Zhuyun
  • 5. Shurui

Description

# Replication Package for the Paper titled 'Aligning Documentation and Q\&A Forum through Constrained Decoding with Weak Supervision' appeared in ICSME 2023 - NIER track.

## Setup guide

We are using Python 3.8 for this project. All the dependencies used in this project can be found in the requirements.txt file.

### Training the model

Running the model requires setting up a Python 3.8 environment and running the process.sh script to install the required packages and train the models. 

We train DOSA, using the default hyperparameters in the HuggingFace Trainer class, including a learning rate of 5e-5 and batch size of 8. These values align with the default setting in the HuggingFace Trainer class. We select the number of training epochs based on the model's performance on a validation set from the range of [1,15] epochs.

Note: it takes about 8 hours to train the LLaMA model on 4X NVidia V100 GPUs.

## Folder Structure

```
Root
|
+- data - (cleaned files that can be fed into the model)
|  |
|  +- Documentation (files scraped from the Python documentation)
|  |   |
|  |   +- Python/Flask (CSV files with category and sub_category labels from documentation)
|  |      |
|  |      +-(Python/Flask)_index (indexing folder for pyserini retriever)
|  |
|  +- StackOverflow (files filtered from StackOverflow data dump)
|      |
|      +- (Python/Flask) (test files in CSV from stack overflow data dump)
|
+- src - (all source code files)
   |
   +- scraping_docs (source code used for scraping documentation)
   |
   +- Models (Model checkpoints)
```

 

Files

stackoverflow_replication.zip

Files (12.0 GB)

Name Size
md5:21e4474adf69bab428286ad578c99319
12.0 GB Preview Download