https://github.com/ruisizhang123/emmark
[DAC'24] EmMark: Robust Watermarks for IP Protection of Embedded Quantized Large Language Models
https://github.com/ruisizhang123/emmark
Last synced: 3 months ago
JSON representation
[DAC'24] EmMark: Robust Watermarks for IP Protection of Embedded Quantized Large Language Models
- Host: GitHub
- URL: https://github.com/ruisizhang123/emmark
- Owner: ruisizhang123
- Created: 2024-05-28T03:35:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T18:07:06.000Z (7 months ago)
- Last Synced: 2024-11-12T19:19:55.820Z (7 months ago)
- Language: HTML
- Size: 30.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EmMark
**[DAC'24] EmMark: Robust Watermarks for IP Protection of Embedded Quantized Large Language Models**
[Paper](https://arxiv.org/abs/2402.17938)
#### Experiment
**INT4 Quantization WM**
For environment setups, plz refer to [AWQ](https://github.com/mit-han-lab/llm-awq)
Step1: Preprocess to acquire the quantized model along with the activations
```bash
$ cd int4_wm
$ bash scripts/opt_watermark.sh opt-2.7b ours /path/save/llm
```Step2: Watermark the model
Change `status` variable from `save` to `watermark`.
```bash
$ bash scripts/opt_watermark.sh opt-2.7b ours /path/save/llm
```**INT8 Quantization WM**
For environment setups, plz refer to [LLM.int8()](https://github.com/TimDettmers/bitsandbytes) and [SmoothQuant](https://github.com/mit-han-lab/smoothquant)
Step1: Preprocess to acquire the quantized model along with the activations
```bash
$ cd int8_wm
$ bash scripts/opt_watermark.sh opt-2.7b ours /path/save/llm
```Step2: Watermark the model
Change `status` variable from `save` to `watermark`.
```bash
$ bash scripts/opt_watermark.sh opt-2.7b ours /path/save/llm
```#### Acknowledge
Our code builds heavily upon [AWQ](https://github.com/mit-han-lab/llm-awq), [LLM.int8()](https://github.com/TimDettmers/bitsandbytes) and [SmoothQuant](https://github.com/mit-han-lab/smoothquant). We thank the authors for open-sourcing the code.
#### Citation
If you found our code/paper helpful, please kindly cite:
```latex
@inproceedings{zhang2024emmark,
title={EmMark: Robust watermarks for IP protection of embedded quantized large language models},
author={Zhang, Ruisi and Koushanfar, Farinaz},
booktitle={Proceedings of the 61st ACM/IEEE Design Automation Conference},
pages={1--6},
year={2024}
}
```