Skip to content

Commit

Permalink
other: Added instructions to README.md on how to set up LLM and run…
Browse files Browse the repository at this point in the history
… it.
  • Loading branch information
Livila committed Feb 19, 2024
1 parent 8b2afa9 commit bc73152
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,55 @@ Do you have a problem with duplicated functions in your java project? Here is th

## Testing ##

To run the tests run this command:

### Manually ###

To run the tests run this command:

```bash
./gradlew test
```

### Setting up pre-committed testing ###
### Setting up pre-commit testing ###

If you want the tests to run when you commit code (to be sure it's working), you install this hook locally.
If you want the tests to run when you commit code (to be sure it's working), you can install this hook locally.

To skip using it once, use `-n` or `--no-verify` when committing.
E.g. `git commit -n -m "[commit message]"`
E.g. `git commit -nm "[commit message]"`

#### Installation ####
#### Install Hook ####

```bash
cp pre-commit.tests .git/hooks/pre-commit
chmod u+x .git/hooks/pre-commit
```

#### Uninstallation ####
#### Uninstall Hook ####

```bash
rm .git/hooks/pre-commit
```

## Getting started with the large language model (LLM) ##

### Download the language model (follow one of these instructions) ###
Download the bin-file directly from [Hugging Face](https://huggingface.co/):
[ggml-model-gpt4all-falcon-q4_0.bin](https://huggingface.co/nomic-ai/gpt4all-falcon-ggml/resolve/main/ggml-model-gpt4all-falcon-q4_0.bin?download=true) (4.06 GB)

Choose downloads from the website:
[https://huggingface.co/nomic-ai/gpt4all-falcon-ggml/tree/main](https://huggingface.co/nomic-ai/gpt4all-falcon-ggml/tree/main)

You may also download any other model of your taste and use that one instead.

### Set up the configuration ###

#### Add model and set the configuration to use LLM ####

1. Move the downloaded LLM into a new folder called `model` in the main repository.
2. In `config.properties`, set `LLM_FILE` to the name of your downloaded model (e.g. model/ggml-model-gpt4all-falcon-q4_0.bin).
3. In `config.properties`, set `RUN_WITH_LLM` to `true`.

#### Usage ####
Run `Main.java` in the project. <!-- TODO: Add run option/script that works "on the go". -->

#### Results ####
The results will be shown in the `/results/` folder,

0 comments on commit bc73152

Please sign in to comment.