Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,8 +20,8 @@ datasets:
|
|
| 20 |
|
| 21 |
A small char-level CNN that extracts Indian informal number/currency
|
| 22 |
shorthand -- Hinglish (romanised Hindi), Devanagari Hindi, Devanagari
|
| 23 |
-
Marathi, and Indian-English amount phrases like `sava lakh`, `dedh crore`, `डेढ़ लाख`,
|
| 24 |
-
`सवा करोड़`, `2.5L`, `20k`, `2-3 lakh` -- from free text, and turns each
|
| 25 |
match into a clean numeric value via a deterministic arithmetic core (the
|
| 26 |
model never predicts the value directly).
|
| 27 |
|
|
@@ -32,7 +32,7 @@ model never predicts the value directly).
|
|
| 32 |
- live demo: https://huggingface.co/spaces/athrvk/gpu-sankhya-demo
|
| 33 |
- gold evaluation sets: https://huggingface.co/datasets/athrvk/gpu-sankhya-gold
|
| 34 |
|
| 35 |
-
This model card describes weights version `v0.
|
| 36 |
|
| 37 |
## Architecture
|
| 38 |
|
|
@@ -46,9 +46,9 @@ A dilated/residual char-CNN over per-character embeddings:
|
|
| 46 |
3. kernel 3, dilation 2, residual yes
|
| 47 |
4. kernel 3, dilation 4, residual yes
|
| 48 |
5. kernel 3, dilation 8, residual yes
|
| 49 |
-
- vocab:
|
| 50 |
- output classes: 120 (BIO span tag + semantic token class)
|
| 51 |
-
- parameters:
|
| 52 |
|
| 53 |
A deterministic arithmetic core (not part of this model) then evaluates
|
| 54 |
the decoded token sequence into a value: prefix semantics (sava = x1.25,
|
|
@@ -60,17 +60,17 @@ units, and range handling.
|
|
| 60 |
|
| 61 |
| file | size |
|
| 62 |
| --- | ---: |
|
| 63 |
-
| `charset.json` |
|
| 64 |
| `classes.json` | 1,571 bytes |
|
| 65 |
-
| `gold_metrics_json_float32.json` |
|
| 66 |
-
| `gold_metrics_json_int8.json` |
|
| 67 |
-
| `gold_metrics_torch.json` |
|
| 68 |
-
| `kaggle_metrics.json` |
|
| 69 |
-
| `matrix.md` |
|
| 70 |
-
| `sankhya.onnx` |
|
| 71 |
-
| `sankhya.pt` |
|
| 72 |
-
| `sankhya.weights.int8.json` |
|
| 73 |
-
| `sankhya.weights.json` |
|
| 74 |
|
| 75 |
- `sankhya.pt` -- torch checkpoint (vocab, classes, arch, channels, state_dict)
|
| 76 |
- `sankhya.onnx` -- ONNX graph, for interop/inspection
|
|
@@ -91,27 +91,28 @@ against the hand-written gold sets (`gold_<lang>.jsonl` -- see the
|
|
| 91 |
|
| 92 |
| gold set | examples | spans | value_acc | precision | recall | F1 |
|
| 93 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 94 |
-
| gold.jsonl | 227 | 199 | 0.
|
| 95 |
-
| gold_deva.jsonl | 186 | 155 | 0.
|
| 96 |
-
| gold_mr.jsonl | 173 | 135 | 0.
|
| 97 |
-
|
|
|
|
|
| 98 |
|
| 99 |
-
Negatives (zero-gold-span examples):
|
| 100 |
positives: 0 (0.00%).
|
| 101 |
|
| 102 |
Per-category value accuracy (combined):
|
| 103 |
|
| 104 |
| category | spans | value_acc |
|
| 105 |
| --- | ---: | ---: |
|
| 106 |
-
| digits |
|
| 107 |
-
| words |
|
| 108 |
-
| prefix | 104 | 0.
|
| 109 |
-
| range |
|
| 110 |
-
| currency |
|
| 111 |
| multi_unit | 28 | 0.9643 |
|
| 112 |
-
| symbol_unit |
|
| 113 |
| mixed_script | 3 | 1.0000 |
|
| 114 |
-
| long | 16 | 0.
|
| 115 |
|
| 116 |
## Usage
|
| 117 |
|
|
@@ -156,8 +157,9 @@ pipeline and `sankhya.eval_gold` for a ready-made evaluation CLI.
|
|
| 156 |
## Training
|
| 157 |
|
| 158 |
Trained 20 epochs on 200,000 synthetic examples generated from the
|
| 159 |
-
`hi_latn` (romanised Hindi), `hi_deva` (Devanagari Hindi),
|
| 160 |
-
(Devanagari Marathi) grammar packs, mixed
|
|
|
|
| 161 |
cross-pack share, plus out-of-vocab
|
| 162 |
"unk noise" augmentation (emoji, CJK, Cyrillic, other symbols inserted as
|
| 163 |
O-labelled context) so the `<unk>` embedding actually gets gradient
|
|
@@ -181,6 +183,6 @@ commands: `python/README.md` in the source repo.
|
|
| 181 |
- Long multi-term/mixed-numeral constructs and multi-number range phrases
|
| 182 |
("तीस पैंतीस हज़ार", "three n half lakh") are the weakest category
|
| 183 |
(`long`/`range` value_acc above).
|
| 184 |
-
- Scoped to Indian languages: currently Hinglish, Devanagari Hindi,
|
| 185 |
-
Devanagari Marathi only; other Indian languages are
|
| 186 |
-
source repo's roadmap).
|
|
|
|
| 20 |
|
| 21 |
A small char-level CNN that extracts Indian informal number/currency
|
| 22 |
shorthand -- Hinglish (romanised Hindi), Devanagari Hindi, Devanagari
|
| 23 |
+
Marathi, Gujarati, and Indian-English amount phrases like `sava lakh`, `dedh crore`, `डेढ़ लाख`,
|
| 24 |
+
`सवा करोड़`, `દોઢ લાખ`, `2.5L`, `20k`, `2-3 lakh` -- from free text, and turns each
|
| 25 |
match into a clean numeric value via a deterministic arithmetic core (the
|
| 26 |
model never predicts the value directly).
|
| 27 |
|
|
|
|
| 32 |
- live demo: https://huggingface.co/spaces/athrvk/gpu-sankhya-demo
|
| 33 |
- gold evaluation sets: https://huggingface.co/datasets/athrvk/gpu-sankhya-gold
|
| 34 |
|
| 35 |
+
This model card describes weights version `v0.6.0` (arch `v2`).
|
| 36 |
|
| 37 |
## Architecture
|
| 38 |
|
|
|
|
| 46 |
3. kernel 3, dilation 2, residual yes
|
| 47 |
4. kernel 3, dilation 4, residual yes
|
| 48 |
5. kernel 3, dilation 8, residual yes
|
| 49 |
+
- vocab: 170 characters (union of every shipped language pack)
|
| 50 |
- output classes: 120 (BIO span tag + semantic token class)
|
| 51 |
+
- parameters: 40,475
|
| 52 |
|
| 53 |
A deterministic arithmetic core (not part of this model) then evaluates
|
| 54 |
the decoded token sequence into a value: prefix semantics (sava = x1.25,
|
|
|
|
| 60 |
|
| 61 |
| file | size |
|
| 62 |
| --- | ---: |
|
| 63 |
+
| `charset.json` | 1,425 bytes |
|
| 64 |
| `classes.json` | 1,571 bytes |
|
| 65 |
+
| `gold_metrics_json_float32.json` | 7,336 bytes |
|
| 66 |
+
| `gold_metrics_json_int8.json` | 7,338 bytes |
|
| 67 |
+
| `gold_metrics_torch.json` | 7,336 bytes |
|
| 68 |
+
| `kaggle_metrics.json` | 26,135 bytes |
|
| 69 |
+
| `matrix.md` | 872 bytes |
|
| 70 |
+
| `sankhya.onnx` | 164,545 bytes |
|
| 71 |
+
| `sankhya.pt` | 172,214 bytes |
|
| 72 |
+
| `sankhya.weights.int8.json` | 60,720 bytes |
|
| 73 |
+
| `sankhya.weights.json` | 405,469 bytes |
|
| 74 |
|
| 75 |
- `sankhya.pt` -- torch checkpoint (vocab, classes, arch, channels, state_dict)
|
| 76 |
- `sankhya.onnx` -- ONNX graph, for interop/inspection
|
|
|
|
| 91 |
|
| 92 |
| gold set | examples | spans | value_acc | precision | recall | F1 |
|
| 93 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 94 |
+
| gold.jsonl | 227 | 199 | 0.9598 | 0.9550 | 0.9598 | 0.9574 |
|
| 95 |
+
| gold_deva.jsonl | 186 | 155 | 0.9677 | 0.9868 | 0.9677 | 0.9772 |
|
| 96 |
+
| gold_mr.jsonl | 173 | 135 | 0.9852 | 0.9852 | 0.9852 | 0.9852 |
|
| 97 |
+
| gold_gu.jsonl | 162 | 118 | 0.9322 | 0.9658 | 0.9576 | 0.9617 |
|
| 98 |
+
| **combined** | 748 | 607 | **0.9621** | 0.9719 | 0.9671 | 0.9694 |
|
| 99 |
|
| 100 |
+
Negatives (zero-gold-span examples): 170, false
|
| 101 |
positives: 0 (0.00%).
|
| 102 |
|
| 103 |
Per-category value accuracy (combined):
|
| 104 |
|
| 105 |
| category | spans | value_acc |
|
| 106 |
| --- | ---: | ---: |
|
| 107 |
+
| digits | 145 | 0.9724 |
|
| 108 |
+
| words | 462 | 0.9589 |
|
| 109 |
+
| prefix | 104 | 0.9808 |
|
| 110 |
+
| range | 49 | 0.9592 |
|
| 111 |
+
| currency | 117 | 0.9658 |
|
| 112 |
| multi_unit | 28 | 0.9643 |
|
| 113 |
+
| symbol_unit | 50 | 1.0000 |
|
| 114 |
| mixed_script | 3 | 1.0000 |
|
| 115 |
+
| long | 16 | 0.8750 |
|
| 116 |
|
| 117 |
## Usage
|
| 118 |
|
|
|
|
| 157 |
## Training
|
| 158 |
|
| 159 |
Trained 20 epochs on 200,000 synthetic examples generated from the
|
| 160 |
+
`hi_latn` (romanised Hindi), `hi_deva` (Devanagari Hindi), `mr_deva`
|
| 161 |
+
(Devanagari Marathi), and `gu_gujr` (Gujarati) grammar packs, mixed
|
| 162 |
+
0.32/0.26/0.21/0.21 with a 10%
|
| 163 |
cross-pack share, plus out-of-vocab
|
| 164 |
"unk noise" augmentation (emoji, CJK, Cyrillic, other symbols inserted as
|
| 165 |
O-labelled context) so the `<unk>` embedding actually gets gradient
|
|
|
|
| 183 |
- Long multi-term/mixed-numeral constructs and multi-number range phrases
|
| 184 |
("तीस पैंतीस हज़ार", "three n half lakh") are the weakest category
|
| 185 |
(`long`/`range` value_acc above).
|
| 186 |
+
- Scoped to Indian languages: currently Hinglish, Devanagari Hindi,
|
| 187 |
+
Devanagari Marathi, and Gujarati only; other Indian languages are
|
| 188 |
+
planned (see the source repo's roadmap).
|