|
Download README.md from MudraForge/law2code-tax-t1-encoder: direct link, hf CLI and curl.
- Browser
- Download file 2.05 kB
-
https://huggingface.co/MudraForge/law2code-tax-t1-encoder/resolve/main/README.md
- Command line
-
hf download hf://MudraForge/law2code-tax-t1-encoder/README.md
-
curl -L -o README.md https://huggingface.co/MudraForge/law2code-tax-t1-encoder/resolve/main/README.md
2.05 kB
| library_name: pytorch | |
| tags: | |
| - legal-nlp | |
| - statutory-parsing | |
| - tax-law | |
| - onnx | |
| license: apache-2.0 | |
| # MudraForge Tax T1 Encoder — 3.41M Backbone / 4.43M Total (`law2code-tax-t1-encoder`) | |
| Pretrained statutory language encoder for Indian and US tax provisions, used as the Stage 0 representation backbone in **law2code** ([Live Space](https://huggingface.co/spaces/yamero999/law2code)). | |
| - **Parameter Breakdown (Verified):** `3,414,064` (**3.41M**) core encoder backbone parameters (Char-CNN + Subword Hash + 36D Discourse Geometry + Transformer) + `1,019,392` (**1.02M**) MLM word-table parameters = **`4,433,456` (`4.43M`) total** checkpoint parameters. | |
| ## Training Data | |
| - **Dataset:** Unlabeled Statutory Tax Corpus (`corpus_2_5m.jsonl`, tax subset — full unified superset hosted at [`MudraForge/law2code-corporate-f1-corpus`](https://huggingface.co/datasets/MudraForge/law2code-corporate-f1-corpus)) | |
| - **Size:** 15,904 statutory documents (64.7 MB) | |
| - **Objective:** Salient Masked Language Modeling (8,000 steps) prioritizing statutory numbers, percentages, cross-references, and deontic operators. | |
| ## Internal Training Scores | |
| | Metric | Value | | |
| | --- | --- | | |
| | Training Steps | 8,000 | | |
| | Final MLM Loss | 0.7644 | | |
| | Perplexity (PPL) | 2.15 | | |
| | Top-1 Token Accuracy | 80.27% | | |
| | Top-5 Token Accuracy | 94.03% | | |
| ## Expected Inputs & Outputs | |
| - **Inputs:** | |
| - `w_ids` `int64[batch, seq_len]`: Vocabulary token IDs | |
| - `c_mat` `int64[batch, seq_len, 30]`: Bounded UTF-8 character byte IDs per token | |
| - `sw_ids` `int64[batch, seq_len, 4]`: 4-gram subword hash IDs (8,192 buckets) | |
| - `g_feat` `float32[batch, seq_len, 36]`: 36-dimensional discourse & punctuation geometry | |
| - `c_idx` `int64[batch, seq_len]`: Clause index per token | |
| - **Outputs:** | |
| - `hidden_states` `float32[batch, seq_len, 256]`: Contextualized 256-dim token representations | |
| ## Available Formats | |
| - **PyTorch:** `pytorch/stage0_backbone_mlm_salient_16k.pt` (18.1 MB) | |
| - **ONNX (opset 17):** `onnx/tax_t1_encoder.onnx` (13.73 MB, ORT CPU max diff `2.62e-06`) | |