Initial release of Indic-Lite: Zero-Annotation CPU Indic NLP Suite (LID, Sentiment, Topic, ONNX)
Browse files- BENCHMARK_REPORT.md +17 -0
- README.md +108 -0
- indic_lid_model.joblib +3 -0
- indic_sentiment_model.joblib +3 -0
- indic_topic_model.joblib +3 -0
- onnx/indic_lid.onnx +3 -0
- onnx/indic_lid_vocab.json +0 -0
- onnx/indic_sentiment.onnx +3 -0
- onnx/indic_sentiment_vocab.json +0 -0
- onnx/indic_topic.onnx +3 -0
- onnx/indic_topic_vocab.json +0 -0
BENCHMARK_REPORT.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Indic-Lite: Official Benchmark Evaluation Report
|
| 2 |
+
|
| 3 |
+
Generated on an **AMD EPYC 16-core CPU System (Zero GPU required)**.
|
| 4 |
+
|
| 5 |
+
## Overall Performance Summary
|
| 6 |
+
|
| 7 |
+
| Model | Task / Coverage | Test Samples | Accuracy | Macro F1 | Disk Size | CPU Latency / Sample |
|
| 8 |
+
|-----------------|-----------------------------------|----------------|------------|------------|-------------|------------------------|
|
| 9 |
+
| Indic-LID | Language ID (26 languages) | 26,312 | 99.52% | 99.52% | 10.17 MB | 0.150 ms |
|
| 10 |
+
| Indic-Sentiment | Sentiment Analysis (12 languages) | 10,129 | 75.84% | 75.84% | 1.64 MB | 0.163 ms |
|
| 11 |
+
| Indic-Topic | News Categorization (6 topics) | 3,244 | 90.23% | 89.35% | 3.41 MB | 0.130 ms |
|
| 12 |
+
|
| 13 |
+
## Key Architectural Highlights
|
| 14 |
+
- **Zero Manual Annotation**: Trained exclusively on openly licensed, pre-existing datasets.
|
| 15 |
+
- **Ultra-compact**: The entire 3-model suite consumes **less than 16 MB** on disk combined.
|
| 16 |
+
- **Edge & CPU Optimized**: Sub-millisecond inference speeds per sample, ideal for mobile, edge microcontrollers, and resource-constrained government infrastructure.
|
| 17 |
+
- **Full AI Kosh Alignment**: Fills missing classification and lightweight model categories.
|
README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- hi
|
| 4 |
+
- bn
|
| 5 |
+
- ta
|
| 6 |
+
- te
|
| 7 |
+
- mr
|
| 8 |
+
- gu
|
| 9 |
+
- kn
|
| 10 |
+
- ml
|
| 11 |
+
- or
|
| 12 |
+
- pa
|
| 13 |
+
- as
|
| 14 |
+
- ur
|
| 15 |
+
- sa
|
| 16 |
+
- ne
|
| 17 |
+
- mai
|
| 18 |
+
- mni
|
| 19 |
+
- brx
|
| 20 |
+
- sat
|
| 21 |
+
- gom
|
| 22 |
+
- en
|
| 23 |
+
license: cc-by-4.0
|
| 24 |
+
tags:
|
| 25 |
+
- indic-nlp
|
| 26 |
+
- language-identification
|
| 27 |
+
- sentiment-analysis
|
| 28 |
+
- text-classification
|
| 29 |
+
- onnx
|
| 30 |
+
- cpu-optimized
|
| 31 |
+
- edge-ai
|
| 32 |
+
pipeline_tag: text-classification
|
| 33 |
+
metrics:
|
| 34 |
+
- accuracy
|
| 35 |
+
- f1
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
# Indic-Lite: Unified Zero-Annotation Indic NLP Suite
|
| 39 |
+
|
| 40 |
+
**Indic-Lite** is a fast, CPU-optimized Indic NLP toolkit designed to fill critical gaps identified in the national [AI Kosh](https://aikosh.indiaai.gov.in) repository and the open-source ecosystem.
|
| 41 |
+
|
| 42 |
+
It provides three production-grade models and text sanitation tools requiring **zero GPU** and **zero manual annotation**:
|
| 43 |
+
1. **Indic-LID**: 26-Language Identification (22 Scheduled Indian Languages + Dialects + English)
|
| 44 |
+
2. **Indic-Sentiment**: 12-Language Sentiment Classifier
|
| 45 |
+
3. **Indic-Topic**: 6-Class Regional News & Headline Classifier
|
| 46 |
+
4. **Indic-Clean**: Rule-based Unicode NFC normalization, Indic numeral translation (e.g. १२३ → 123), and Indian PII scrubbing (Aadhaar, PAN, phone).
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## Benchmark Evaluation
|
| 51 |
+
|
| 52 |
+
Evaluated on an **AMD EPYC 16-core CPU System (Zero GPU required)**:
|
| 53 |
+
|
| 54 |
+
| Model | Task / Coverage | Test Set Size | Accuracy | Macro F1 | Joblib Size | ONNX Size | CPU Latency |
|
| 55 |
+
|---|---|---|---|---|---|---|---|
|
| 56 |
+
| **Indic-LID** | Language ID (26 languages) | 26,312 | **99.52%** | **99.52%** | 10.17 MB | **3.97 MB** | **0.150 ms** |
|
| 57 |
+
| **Indic-Sentiment** | Sentiment (12 languages) | 10,129 | **75.84%** | **75.84%** | 1.64 MB | **0.19 MB** | **0.163 ms** |
|
| 58 |
+
| **Indic-Topic** | Topic (6 categories) | 3,244 | **90.23%** | **89.35%** | 3.41 MB | **1.03 MB** | **0.130 ms** |
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## Quickstart
|
| 63 |
+
|
| 64 |
+
### Installation
|
| 65 |
+
```bash
|
| 66 |
+
pip install indic-lite
|
| 67 |
+
# or directly with onnxruntime / joblib:
|
| 68 |
+
pip install joblib onnxruntime scikit-learn
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
### 1. Unified Python Usage
|
| 72 |
+
```python
|
| 73 |
+
import joblib
|
| 74 |
+
|
| 75 |
+
# Load models directly
|
| 76 |
+
lid = joblib.load("indic_lid_model.joblib")['model']
|
| 77 |
+
sentiment = joblib.load("indic_sentiment_model.joblib")['model']
|
| 78 |
+
topic = joblib.load("indic_topic_model.joblib")['model']
|
| 79 |
+
|
| 80 |
+
# Language Detection (26 languages)
|
| 81 |
+
lang = lid.predict(["வணக்கம் நண்பா"])[0]
|
| 82 |
+
print("Language:", lang) # 'ta' (Tamil)
|
| 83 |
+
|
| 84 |
+
# Sentiment Analysis
|
| 85 |
+
sent = sentiment.predict(["यह उत्पाद बहुत ही शानदार है!"])[0]
|
| 86 |
+
print("Sentiment:", "Positive" if sent == 1 else "Negative")
|
| 87 |
+
|
| 88 |
+
# News Topic Classification
|
| 89 |
+
top = topic.predict(["विराट कोहलीने झळकावले शतक"])[0]
|
| 90 |
+
print("Topic:", top) # 'sports'
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
### 2. Cross-Platform ONNX Runtime
|
| 94 |
+
Every model has a matching `.onnx` checkpoint inside `onnx/` allowing execution without Python or heavy dependencies in C++, Go, Rust, mobile, or WASM:
|
| 95 |
+
- `onnx/indic_lid.onnx` (3.97 MB)
|
| 96 |
+
- `onnx/indic_sentiment.onnx` (0.19 MB)
|
| 97 |
+
- `onnx/indic_topic.onnx` (1.03 MB)
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
## Training Data & Provenance
|
| 102 |
+
- **Indic-LID**: Multi-parallel Indic corpus from `google/IndicGenBench_flores_in` (Flores-200).
|
| 103 |
+
- **Indic-Sentiment**: `mteb/IndicSentiment` + IIT Patna reviews (`ai4bharat/indic_glue`).
|
| 104 |
+
- **Indic-Topic**: India Today Regional News (`inltkh.*`) and BBC Hindi (`bbca.hi`).
|
| 105 |
+
- **Zero Annotation**: 100% trained on open-access, verified benchmark datasets.
|
| 106 |
+
|
| 107 |
+
## License
|
| 108 |
+
Creative Commons Attribution 4.0 International (**CC-BY-4.0**).
|
indic_lid_model.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e3d6ad79e878911668a1d2bc25948cdc5d7248309c1d8feaa25f307aab123f2
|
| 3 |
+
size 10665204
|
indic_sentiment_model.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57cd06a93e6f6256ed24f281e3ebbe27b1ad6d6a2850a9ec0be0e3d658589347
|
| 3 |
+
size 1718351
|
indic_topic_model.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:164341c378c1da7866a2ce9f28c2f5f8ba7a67da99ecdf6a85cc632c963fc8a7
|
| 3 |
+
size 3580061
|
onnx/indic_lid.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:765ddd72d857dcf0225f7477395e9e7182d23b8fde11cc470d4563a2107eb263
|
| 3 |
+
size 4161810
|
onnx/indic_lid_vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
onnx/indic_sentiment.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:088ee5e24f408e1ef1f4e593c54e64f195b1f70e9943ed3a2be07b31e6df0b59
|
| 3 |
+
size 200985
|
onnx/indic_sentiment_vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
onnx/indic_topic.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:787833d1748eb3f6c26ece6a856086f70b5231ae92f9da50698e364e36b36439
|
| 3 |
+
size 1081615
|
onnx/indic_topic_vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|