Instructions to use GOSHUNCLE/pii-masking-zh-tw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use GOSHUNCLE/pii-masking-zh-tw with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("C:\Users\chris.ma_cycraft\.cache\huggingface\hub\models--Qwen--Qwen2.5-1.5B-Instruct\snapshots\989aa7980e4cf806f80c7fef2b1adb7bc71aa306") model = PeftModel.from_pretrained(base_model, "GOSHUNCLE/pii-masking-zh-tw") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -64,10 +64,6 @@ Evaluated on 70 held-out Taiwan-style test cases:
|
|
| 64 |
| Entity recall | **100%** |
|
| 65 |
| Mask accuracy (with included safeguards) | **~100%** |
|
| 66 |
|
| 67 |
-
The model produces correct PII values in 100% of cases. The included
|
| 68 |
-
post-processing (`validate_and_fix_mask`) recomputes masks deterministically
|
| 69 |
-
from the value, ensuring output masks are always character-accurate.
|
| 70 |
-
|
| 71 |
## Inference safeguards
|
| 72 |
|
| 73 |
The included `inference.py` applies two filters and one mask corrector:
|
|
@@ -186,10 +182,6 @@ correspond to any real individuals.
|
|
| 186 |
| 實體召回率 | **100%** |
|
| 187 |
| 遮罩正確率(含內建安全機制) | **~100%** |
|
| 188 |
|
| 189 |
-
模型在所有測試案例中皆能正確抽出 PII 原始值。內附的後處理函式
|
| 190 |
-
(`validate_and_fix_mask`)會根據抽出的值重新計算遮罩,確保星號數量
|
| 191 |
-
永遠正確。
|
| 192 |
-
|
| 193 |
## 推論安全機制
|
| 194 |
|
| 195 |
內附的 `inference.py` 套用兩道過濾與一道遮罩修正:
|
|
|
|
| 64 |
| Entity recall | **100%** |
|
| 65 |
| Mask accuracy (with included safeguards) | **~100%** |
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
## Inference safeguards
|
| 68 |
|
| 69 |
The included `inference.py` applies two filters and one mask corrector:
|
|
|
|
| 182 |
| 實體召回率 | **100%** |
|
| 183 |
| 遮罩正確率(含內建安全機制) | **~100%** |
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
## 推論安全機制
|
| 186 |
|
| 187 |
內附的 `inference.py` 套用兩道過濾與一道遮罩修正:
|