Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -2,10 +2,51 @@
|
|
2 |
## Description
|
3 |
- This is the baseline implementation of AI Text Steganography for our final project in Software Designing and Applied Information Security courses in HCMUS-VNU.
|
4 |
- Our project focuses on hiding data inside a text sequence generated by LLMs (e.g. GPT-2).
|
5 |
-
- We took inspiration from [Kirchenbauer et al](https://arxiv.org/abs/2301.10226).
|
6 |
## Members
|
7 |
- Tran Nam Khanh
|
8 |
- Phan Le Dac Phu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
## TODO lists
|
10 |
- [x] Baseline code.
|
11 |
- [x] CLI.
|
@@ -16,3 +57,4 @@
|
|
16 |
- [ ] Attack strategies
|
17 |
- [ ] White-box
|
18 |
- [ ] Black-box
|
|
|
|
2 |
## Description
|
3 |
- This is the baseline implementation of AI Text Steganography for our final project in Software Designing and Applied Information Security courses in HCMUS-VNU.
|
4 |
- Our project focuses on hiding data inside a text sequence generated by LLMs (e.g. GPT-2).
|
5 |
+
- We took inspiration from [Kirchenbauer et al.](https://arxiv.org/abs/2301.10226).
|
6 |
## Members
|
7 |
- Tran Nam Khanh
|
8 |
- Phan Le Dac Phu
|
9 |
+
## Installation
|
10 |
+
1. Clone this repository:
|
11 |
+
```Bash
|
12 |
+
git clone https://github.com/trnKhanh/ai-text-steganography.git
|
13 |
+
cd ai-text-steganography
|
14 |
+
```
|
15 |
+
2. (Optional) Create new conda environment:
|
16 |
+
```Bash
|
17 |
+
conda create -n ai-text-steganography python=3.10
|
18 |
+
conda activate ai-text-steganography
|
19 |
+
```
|
20 |
+
3. Install requirements:
|
21 |
+
```Bash
|
22 |
+
pip install -r requirements.txt
|
23 |
+
```
|
24 |
+
## Usage
|
25 |
+
- Gradio demo:
|
26 |
+
```Bash
|
27 |
+
python demo.py
|
28 |
+
```
|
29 |
+
- RestAPI:
|
30 |
+
```Bash
|
31 |
+
python api.py
|
32 |
+
```
|
33 |
+
- See help message of the Command Line Interface by:
|
34 |
+
```Bash
|
35 |
+
python main.py -h
|
36 |
+
```
|
37 |
+
## Configuration
|
38 |
+
- `config.ini` is the config file of the project. We use the modified syntax of the `configparser` package. Every key-value pair follows the syntax: `key = type:value`. Currently, `type` can only be `int`, `float` or `str`.
|
39 |
+
- Details on config:
|
40 |
+
- `server`: parameters for the RestAPI:
|
41 |
+
- `models.names`: names of LLMs allowed. Note that this follows the name defined on [Hugging Face](https://huggingface.co/models).
|
42 |
+
- `models.params`: parameters used to load LLMs.
|
43 |
+
- `encrypt.default`: default parameters for encryption algorithm.
|
44 |
+
- `decrypt.default`: default parameters for decryption algorithm.
|
45 |
+
## Notes on implementation
|
46 |
+
- Because of the limited resources, we load multiple models on the same machine (implementation is in `model_factory.py`):
|
47 |
+
- Each model is first loaded to the `load_device` (e.g. cpu).
|
48 |
+
- If there is a request to use a specific model, it is loaded to the `run_device` (e.g. gpu) for inference.
|
49 |
+
- Therefore, only one model can be used for inference at a time. As a result, we could optimize the limited resources we have to allow users to choose different LLMs, but it forces the API to be synchronous instead.
|
50 |
## TODO lists
|
51 |
- [x] Baseline code.
|
52 |
- [x] CLI.
|
|
|
57 |
- [ ] Attack strategies
|
58 |
- [ ] White-box
|
59 |
- [ ] Black-box
|
60 |
+
|