Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
panly2003 committed May 17, 2024
1 parent 16998f6 commit 7ba733f
Show file tree
Hide file tree
Showing 115 changed files with 8,904,734 additions and 0 deletions.
179 changes: 179 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Test
test.py
detectability.py
robustness.py
quality.py
script.sh

# Model
watermark/sir/model/compositional-bert-large-uncased/
watermark/xsir/model/paraphrase-multilingual-mpnet-base-v2/

# Figures
test_images/

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.history
.vscode
.DS_Store
watermark/XSIR/embedding/train_embeddings_10K.txt
8 changes: 8 additions & 0 deletions config/EWD.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"algorithm_name": "EWD",
"gamma": 0.5,
"delta": 2.0,
"hash_key": 15485863,
"prefix_length": 1,
"z_threshold": 4.0
}
7 changes: 7 additions & 0 deletions config/EXP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"algorithm_name": "EXP",
"prefix_length": 4,
"hash_key": 15485863,
"threshold": 2.0,
"sequence_length": 200
}
8 changes: 8 additions & 0 deletions config/EXPEdit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"algorithm_name": "EXPEdit",
"pseudo_length": 420,
"sequence_length": 200,
"n_runs": 100,
"key": 42,
"p_threshold": 0.2
}
8 changes: 8 additions & 0 deletions config/KGW.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"algorithm_name": "KGW",
"gamma": 0.5,
"delta": 2.0,
"hash_key": 15485863,
"prefix_length": 1,
"z_threshold": 4.0
}
11 changes: 11 additions & 0 deletions config/SIR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"algorithm_name": "SIR",
"delta": 1.0,
"chunk_length": 10,
"scale_dimension": 300,
"z_threshold": 0.2,
"transform_model_input_dim": 1024,
"transform_model_name": "watermark/sir/model/transform_model_cbert.pth",
"embedding_model_path": "watermark/sir/model/compositional-bert-large-uncased/",
"mapping_name": "watermark/sir/mapping/300_mapping_50272.json"
}
9 changes: 9 additions & 0 deletions config/SWEET.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"algorithm_name": "SWEET",
"gamma": 0.5,
"delta": 2.0,
"hash_key": 15485863,
"z_threshold": 4.0,
"prefix_length": 1,
"entropy_threshold": 0.9
}
13 changes: 13 additions & 0 deletions config/UPV.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"algorithm_name": "UPV",
"gamma": 0.5,
"delta": 2.0,
"z_threshold": 4.0,
"prefix_length": 1,
"bit_number": 16,
"sigma": 0.01,
"default_top_k": 20,
"generator_model_name": "watermark/upv/model/generator_model_b16_p1.pt",
"detector_model_name": "watermark/upv/model/detector_model_b16_p1_z4.pt",
"detect_mode": "network"
}
7 changes: 7 additions & 0 deletions config/Unigram.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"algorithm_name": "Unigram",
"gamma": 0.5,
"delta": 2.0,
"hash_key": 15485863,
"z_threshold": 4.0
}
12 changes: 12 additions & 0 deletions config/XSIR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"algorithm_name": "XSIR",
"delta": 1.0,
"chunk_length": 10,
"scale_dimension": 300,
"z_threshold": 0.2,
"transform_model_input_dim": 768,
"dictionary": "watermark/xsir/dictionary/dictionary.txt",
"transform_model_name": "watermark/xsir/model/transform_model_x-sbert_10K.pth",
"embedding_model_path": "watermark/xsir/model/paraphrase-multilingual-mpnet-base-v2",
"mapping_name": "watermark/xsir/mapping/300_mapping_opt_1_3b.json"
}
Loading

0 comments on commit 7ba733f

Please sign in to comment.