Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Demo-2 #2

Merged
merged 30 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9f9c762
Minor fix
abhi3700 Feb 23, 2024
4335b42
Change bucket to buckets
abhi3700 Feb 23, 2024
9a104f5
Add demo-2 step-1
abhi3700 Feb 25, 2024
c5769d5
Refator code
abhi3700 Feb 26, 2024
9efc81f
Add code for embeddings + LSH for each hyperplanes params
abhi3700 Feb 26, 2024
2b08a02
Changed the name
abhi3700 Feb 26, 2024
6281f8e
Update readme for preprocessing of data into embeddings
abhi3700 Feb 26, 2024
f1ddcb7
Output data file renamed, Add detection code to just read file
abhi3700 Feb 27, 2024
63d48d9
Minor changes
abhi3700 Feb 27, 2024
236e434
Add code + data for bucketing
abhi3700 Feb 27, 2024
508053c
Add code for detecting query text
abhi3700 Feb 27, 2024
c5a677b
Modify preprocessing with new design pattern of code
abhi3700 Feb 28, 2024
658aabd
Update bucket to df
abhi3700 Feb 28, 2024
aa52060
Revamp code design pattern for preprocessing, Also modify data structure
abhi3700 Feb 28, 2024
ee6e1ea
Revamp detection code with OOP design pattern
abhi3700 Feb 28, 2024
13dab47
Optimize code
abhi3700 Feb 29, 2024
b9bb412
Optimize code with re-runs
abhi3700 Feb 29, 2024
fdca963
Buckets hash changes when re-run with same seed
abhi3700 Feb 29, 2024
5fbffd1
Buckets hash changes when re-run again with same seed
abhi3700 Feb 29, 2024
3842df7
Update detect text code with optimized LSH class
abhi3700 Feb 29, 2024
555022a
Restore preprocessed_data file generation
abhi3700 Feb 29, 2024
400b456
Add @jeremy code for generating text
abhi3700 Feb 29, 2024
a8d54ea
Refactor code
abhi3700 Mar 1, 2024
a54cee8
Add code for processing generated paragraphs
abhi3700 Mar 1, 2024
27f9f49
Add code for saving Hamming Distance (HD) matrix
abhi3700 Mar 1, 2024
e304a61
Add README with clean instruction for setup, Fmt done
abhi3700 Mar 1, 2024
379910c
Add interactive heatmap plot (in html) for the matrices for each nbits
abhi3700 Mar 1, 2024
b7ac5fd
Include build inside install step itself
abhi3700 Mar 1, 2024
842df3e
Add code for generating plots, Remove dataframe alongwith matrix_nbit…
abhi3700 Mar 4, 2024
506a8c9
Cleanup
abhi3700 Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ cython_debug/
.ruff_cache/

.vscode/
.DS_Store
.DS_Store
archived/
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ huak build
## Run

```sh
# demo-1
huak run main

# pre-processing data
huak run preproc

# detect AI-generated data
huak run detect
```

## Format
Expand All @@ -37,17 +44,6 @@ huak fmt
huak lint
```

## Benchmark

Tested on my machine: **Apple M1 Max chip, 32GB RAM, 10 cores**.

| Text inputs | no. of hyperplanes | Execution Time |
| :---------: | :----------------: | :------------: |
| 100 | 4 | 1m 5.69s |
| 150 | 4 | 3m 38.33s |
| 200 | 4 | 5m 18.48s |
| 500 | 4 | 15m 39.88s |

## Algorithm testing

Refer this [README](./tests/README.md) for more details.
901 changes: 900 additions & 1 deletion data/fine_food_reviews_1k.csv

Large diffs are not rendered by default.

998 changes: 998 additions & 0 deletions output/buckets_128bit.csv

Large diffs are not rendered by default.

Loading