Meowniece commited on
Commit
fffe7cc
·
verified ·
1 Parent(s): 4a7adc1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -9
README.md CHANGED
@@ -10,27 +10,32 @@ tags: [sms, upi, banking, information-extraction, structured-output, hinglish, q
10
  Smaller versions of the fine-tuned Tiny Aya Fire SMS extractor (adapter: `Meowniece/tiny-aya-sms-extract-fire-lora`). Author: Anshul J Amin.
11
 
12
  **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.
13
- Protected layers (kept at higher precision): `[]`. Random-protection control: `[3, 9, 20, 25]`.
14
 
15
  ## GGUF files (llama.cpp, CPU or GPU)
16
  | GGUF version | Precision | File (GB) | Fits | EM on hand-written (n) [95% CI] | CPU s/SMS |
17
  |---|---|---|---|---|---|
18
- | q8_0 | Q8_0 | 3.57 | 4 GB | 65.9 (44) [52.3–79.5] | 21.8 |
19
- | q4_k_m | Q4_K_M | 2.14 | 4 GB | 63.6 (44) [50.0–77.3] | 15.1 |
20
- | q3_k_m | Q3_K_M | 1.8 | 4 GB | 59.1 (44) [45.5–75.0] | 13.5 |
 
 
 
21
 
22
  ## GPU versions (transformers + bitsandbytes, built at load time from the merged model)
23
- | Version | Precision | Size (GB) | Fits GPU | test_ood EM [95% CI] | challenge EM [95% CI] | SMS/s (T4) |
24
  |---|---|---|---|---|---|---|
25
- | fp16 | fp16 | 6.7 (peak 8.62) | 16 GB | 88.7 [85.0–92.0] | 77.3 [63.6–88.6] | 1.47 |
26
- | int8 | int8 (LLM.int8) | 3.89 (peak 6.07) | 8 GB | 86.7 [82.7–90.3] | 81.8 [70.5–93.2] | 0.6 |
27
- | nf4_uniform | nf4, all layers | 2.48 (peak 4.59) | 8 GB | 73.3 [68.7–78.3] | 63.6 [47.7–77.3] | 1.35 |
 
 
28
 
29
  Load the circuit-protected 4-bit version:
30
  ```python
31
  from transformers import AutoModelForCausalLM, BitsAndBytesConfig
32
  cfg = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
33
- llm_int8_skip_modules=["lm_head"] + [f"model.layers.{i}" for i in []])
34
  # merge the adapter into the base first (see the GitHub README), then from_pretrained(merged_dir, quantization_config=cfg)
35
  ```
36
  Prompt format: see `src/smsgen.py` (`build_messages`) in https://github.com/Anshul-Amin/tiny-aya-sms-extract.
 
10
  Smaller versions of the fine-tuned Tiny Aya Fire SMS extractor (adapter: `Meowniece/tiny-aya-sms-extract-fire-lora`). Author: Anshul J Amin.
11
 
12
  **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.
13
+ Protected layers (kept at higher precision): `[0, 22, 23, 24]`. Random-protection control: `[4, 10, 21, 29]`.
14
 
15
  ## GGUF files (llama.cpp, CPU or GPU)
16
  | GGUF version | Precision | File (GB) | Fits | EM on hand-written (n) [95% CI] | CPU s/SMS |
17
  |---|---|---|---|---|---|
18
+ | q8_0 | Q8_0 | 3.57 | 4 GB | 79.5 (44) [68.2–90.9] | 11.4 |
19
+ | q4_k_m | Q4_K_M | 2.14 | 4 GB | 70.5 (44) [56.8–84.1] | 6.6 |
20
+ | q3_k_m | Q3_K_M | 1.8 | 4 GB | 63.6 (44) [50.0–77.3] | 8.2 |
21
+ | 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 |
22
+ | 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 |
23
+ | 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 |
24
 
25
  ## GPU versions (transformers + bitsandbytes, built at load time from the merged model)
26
+ | Version | Precision | Size (GB) | Fits GPU | test_ood EM [95% CI] | challenge EM [95% CI] | SMS/s (A100-SXM4-80GB) |
27
  |---|---|---|---|---|---|---|
28
+ | fp16 | fp16 | 6.7 (peak 8.45) | 16 GB | 88.7 [85.0–92.0] | 79.5 [68.2–90.9] | 1.93 |
29
+ | 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 |
30
+ | 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 |
31
+ | 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 |
32
+ | 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 |
33
 
34
  Load the circuit-protected 4-bit version:
35
  ```python
36
  from transformers import AutoModelForCausalLM, BitsAndBytesConfig
37
  cfg = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
38
+ llm_int8_skip_modules=["lm_head"] + [f"model.layers.{i}" for i in [0, 22, 23, 24]])
39
  # merge the adapter into the base first (see the GitHub README), then from_pretrained(merged_dir, quantization_config=cfg)
40
  ```
41
  Prompt format: see `src/smsgen.py` (`build_messages`) in https://github.com/Anshul-Amin/tiny-aya-sms-extract.