waterfall 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
waterfall/watermark.py CHANGED
@@ -3,6 +3,7 @@ import logging
3
3
  import os
4
4
  import gc
5
5
  import torch
6
+ import numpy as np
6
7
  from typing import List, Literal, Optional, Tuple
7
8
 
8
9
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -83,7 +84,7 @@ def verify_texts(texts: List[str], id: int,
83
84
  k_p: Optional[int] = None,
84
85
  model_path: Optional[str] = "meta-llama/Llama-3.1-8B-Instruct",
85
86
  return_extracted_k_p: bool = False
86
- ) -> Tuple[float,float]:
87
+ ) -> np.ndarray | Tuple[np.ndarray,np.ndarray]:
87
88
  """Returns the q_score and extracted k_p"""
88
89
 
89
90
  if watermarker is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: waterfall
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Scalable Framework for Robust Text Watermarking and Provenance for LLMs
5
5
  Project-URL: Homepage, https://github.com/aoi3142/Waterfall
6
6
  Project-URL: Issues, https://github.com/aoi3142/Waterfall/issues
@@ -4,9 +4,9 @@ waterfall/WatermarkingFnFourier.py,sha256=QYayAQYwi1dQkDIyqmvhU568VhrVYTVy47HkI8
4
4
  waterfall/WatermarkingFnSquare.py,sha256=2PAO05DdKT02npo7GDf_82D520nP7kGAWK6H4E4JMt4,1638
5
5
  waterfall/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  waterfall/permute.py,sha256=RwxOHFhx_VSOhhFwy5s79YgwTUBkfW2-LCCXYR3VT2o,2582
7
- waterfall/watermark.py,sha256=d93C_DjnO2flLHZkRAC_L749CcUjIIGT9yPR91KkjOk,13452
8
- waterfall-0.1.5.dist-info/METADATA,sha256=aCbjPA6TZwVNcgrX9m0YDsaLcamx7-dayxKkjJmGUcA,8714
9
- waterfall-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- waterfall-0.1.5.dist-info/entry_points.txt,sha256=XXnUzuWXu2nc9j4WAll9tq6HyodN_8WJLjeG0O4Y2Gw,60
11
- waterfall-0.1.5.dist-info/licenses/LICENSE,sha256=zAtaO-k41Q-Q4Etl4bzuh7pgNJsPH-dYfzvznRa0OvM,11341
12
- waterfall-0.1.5.dist-info/RECORD,,
7
+ waterfall/watermark.py,sha256=W5jYGqYGOXXO-KLPKzJoin5zC_Xb6Xk9BzsAA9-LKXA,13494
8
+ waterfall-0.1.6.dist-info/METADATA,sha256=inB0EWGyaAkNQo4CUSke5Bh4Vr07AuVPU9jmKB0gU3U,8714
9
+ waterfall-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ waterfall-0.1.6.dist-info/entry_points.txt,sha256=XXnUzuWXu2nc9j4WAll9tq6HyodN_8WJLjeG0O4Y2Gw,60
11
+ waterfall-0.1.6.dist-info/licenses/LICENSE,sha256=zAtaO-k41Q-Q4Etl4bzuh7pgNJsPH-dYfzvznRa0OvM,11341
12
+ waterfall-0.1.6.dist-info/RECORD,,