Meowniece's picture
Upload README.md with huggingface_hub
fffe7cc verified
|
Raw History Blame Contribute Delete
2.79 kB
---
base_model: CohereLabs/tiny-aya-fire
license: cc-by-nc-4.0
language: [en, hi]
library_name: gguf
tags: [sms, upi, banking, information-extraction, structured-output, hinglish, quantized, gguf, circuitkit]
---
# Tiny Aya SMS Extract · quantized versions for 2 / 4 / 8 / 16 GB
Smaller versions of the fine-tuned Tiny Aya Fire SMS extractor (adapter: `Meowniece/tiny-aya-sms-extract-fire-lora`). Author: Anshul J Amin.
**Circuit-aware:** CircuitKIT (node-level EAP-IG on 24 debit↔credit contrastive pairs) ranked the layers by their role in the debit-vs-credit decision.
Protected layers (kept at higher precision): `[0, 22, 23, 24]`. Random-protection control: `[4, 10, 21, 29]`.
## GGUF files (llama.cpp, CPU or GPU)
| GGUF version | Precision | File (GB) | Fits | EM on hand-written (n) [95% CI] | CPU s/SMS |
|---|---|---|---|---|---|
| q8_0 | Q8_0 | 3.57 | 4 GB | 79.5 (44) [68.2–90.9] | 11.4 |
| q4_k_m | Q4_K_M | 2.14 | 4 GB | 70.5 (44) [56.8–84.1] | 6.6 |
| q3_k_m | Q3_K_M | 1.8 | 4 GB | 63.6 (44) [50.0–77.3] | 8.2 |
| q4_k_m-circuit | Q4_K_M, layers [0, 22, 23, 24] kept Q8_0 | 2.28 | 4 GB | 70.5 (44) [56.8–84.1] | 7.3 |
| q3_k_m-circuit | Q3_K_M, layers [0, 22, 23, 24] kept Q8_0 | 1.98 | 4 GB | 54.5 (44) [40.9–68.2] | 9.0 |
| q3_k_m-random | Q3_K_M, layers [4, 10, 21, 29] kept Q8_0 | 1.98 | 4 GB | 54.5 (44) [40.9–68.2] | 9.0 |
## GPU versions (transformers + bitsandbytes, built at load time from the merged model)
| Version | Precision | Size (GB) | Fits GPU | test_ood EM [95% CI] | challenge EM [95% CI] | SMS/s (A100-SXM4-80GB) |
|---|---|---|---|---|---|---|
| fp16 | fp16 | 6.7 (peak 8.45) | 16 GB | 88.7 [85.0–92.0] | 79.5 [68.2–90.9] | 1.93 |
| int8 | int8 (LLM.int8) | 3.89 (peak 5.91) | 8 GB | 86.7 [82.7–90.3] | 70.5 [56.8–84.1] | 0.56 |
| nf4_uniform | nf4, all layers | 2.48 (peak 4.42) | 8 GB | 73.7 [69.0–78.7] | 63.6 [47.7–77.3] | 1.46 |
| nf4_circuit | nf4, layers [0, 22, 23, 24] kept fp16 | 2.95 (peak 4.87) | 8 GB | 75.3 [70.7–80.3] | 63.6 [50.0–77.3] | 1.49 |
| nf4_random | nf4, layers [4, 10, 21, 29] kept fp16 | 2.95 (peak 4.87) | 8 GB | 68.7 [63.3–74.0] | 59.1 [45.5–72.7] | 1.48 |
Load the circuit-protected 4-bit version:
```python
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
cfg = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
llm_int8_skip_modules=["lm_head"] + [f"model.layers.{i}" for i in [0, 22, 23, 24]])
# merge the adapter into the base first (see the GitHub README), then from_pretrained(merged_dir, quantization_config=cfg)
```
Prompt format: see `src/smsgen.py` (`build_messages`) in https://github.com/Anshul-Amin/tiny-aya-sms-extract.
Licence: CC-BY-NC 4.0 (inherits Tiny Aya). Data are synthetic; bank names are fictional.