Meclin commited on
Commit
2ff22c9
·
verified ·
1 Parent(s): ef84600

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -114
README.md CHANGED
@@ -1,202 +1,204 @@
1
  ---
2
  base_model: Qwen/Qwen3.5-4B
3
  library_name: peft
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
  ## Model Details
13
 
14
  ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
-
 
 
 
 
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
  ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
  ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
45
 
46
- ### Downstream Use [optional]
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
 
52
  ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
 
57
 
58
  ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
 
 
63
 
64
  ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
  ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  ## Training Details
77
 
78
  ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
 
84
  ### Training Procedure
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
 
93
  #### Training Hyperparameters
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
 
 
 
 
96
 
97
  #### Speeds, Sizes, Times [optional]
98
 
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
  ### Testing Data, Factors & Metrics
108
 
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
 
127
  ### Results
128
 
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
136
 
137
- <!-- Relevant interpretability work for the model goes here -->
138
 
139
- [More Information Needed]
140
 
141
  ## Environmental Impact
142
 
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
 
153
- ## Technical Specifications [optional]
154
 
155
  ### Model Architecture and Objective
156
 
157
- [More Information Needed]
158
 
159
  ### Compute Infrastructure
160
 
161
- [More Information Needed]
162
-
163
  #### Hardware
164
 
165
- [More Information Needed]
166
 
167
  #### Software
168
 
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
 
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
 
175
  **BibTeX:**
176
 
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
 
 
184
 
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
 
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
 
197
  ## Model Card Contact
198
 
199
- [More Information Needed]
 
200
  ### Framework versions
201
 
202
  - PEFT 0.14.0
 
1
  ---
2
  base_model: Qwen/Qwen3.5-4B
3
  library_name: peft
4
+ license: apache-2.0
5
+ language:
6
+ - ta
7
+ - en
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - lora
11
+ - fact-checking
12
+ - misinformation-detection
13
+ - tamil
14
+ - low-resource-nlp
15
+ - retrieval-augmented-generation
16
+ - qwen
17
  ---
18
 
19
+ # TamilRAV — Retrieval-Grounded Reasoning Model for Tamil Misinformation Verification
 
 
20
 
21
+ TamilRAV is a LoRA adapter for **Qwen3.5-4B** that performs evidence-grounded verification of Tamil misinformation claims. Given a Tamil claim and up to three retrieved fact-check evidence passages, it produces a structured verdict under a four-class taxonomy (**True / False / Misleading / Altered**), together with a Tamil-language explanation, a calibrated confidence score, and a step-by-step reasoning trace.
22
 
23
+ TamilRAV is the reasoning path (Path B) of **CDPVA** (Complementary Dual-Path Verification Architecture), introduced in the paper *"A Complementary Dual-Path Verification Architecture for Multimodal Tamil Misinformation Classification and Reasoning"*, and is trained and evaluated on the **TamilFacts-X** benchmark of 17,271 fact-checked Tamil claims.
24
 
25
  ## Model Details
26
 
27
  ### Model Description
28
 
29
+ - **Developed by:** [TODO: author names / lab]
30
+ - **Funded by [optional]:** [TODO or remove]
31
+ - **Shared by:** [TODO: HF account / lab]
32
+ - **Model type:** Causal language model + LoRA adapter (PEFT), instruction-tuned for retrieval-grounded fact verification
33
+ - **Language(s) (NLP):** Tamil (claims, explanations); English (reasoning traces)
34
+ - **License:** Apache 2.0 [TODO: confirm this matches the base-model license and your intended adapter license]
35
+ - **Finetuned from model:** [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B)
36
 
37
+ The adapter modifies the query, key, value, and output projections of every attention block and the MLP projection layers of the frozen 4B-parameter backbone. Only the low-rank matrices are trained; the base weights remain frozen. The adapter is loaded alongside the base model in bfloat16 precision at inference.
 
 
 
 
 
 
38
 
39
+ ### Model Sources
40
 
41
+ - **Repository:** [TODO: code repository URL]
42
+ - **Paper:** [TODO: DOI / preprint URL once available]
43
+ - **Dataset:** TamilFacts-X — [TODO: dataset URL or HF dataset ID]
 
 
44
 
45
  ## Uses
46
 
 
 
47
  ### Direct Use
48
 
49
+ TamilRAV is released as an **editorial assistance tool** for Tamil fact-checking newsrooms, platform trust-and-safety teams, and human-supervised verification pipelines. The intended workflow is retrieval-augmented: retrieve candidate evidence for a claim (in CDPVA: Qwen3-Embedding-0.6B dense retrieval over a Qdrant index, top-20, reranked to top-3 with BGE-Reranker-v2-m3), then prompt TamilRAV with the claim and the reranked passages.
50
 
51
+ For best results, use self-consistency decoding as in the paper: sample three generations at temperatures 0.3, 0.5, and 0.7, take the majority-vote verdict, and average the three confidence scores.
52
 
53
+ ### Downstream Use
54
 
55
+ TamilRAV serves as the reasoning path of the full CDPVA system, in which its verdict, pooled confidence, and evidence count are reconciled with a discriminative multimodal classifier through a rule-based verification gate. The full system reaches macro-F1 92.9 on the TamilFacts-X evaluation set.
 
 
56
 
57
  ### Out-of-Scope Use
58
 
59
+ - **Fully automated content moderation or takedown decisions without human review.** The model is an assistance tool; its verdicts are not authoritative.
60
+ - **Verification without retrieval evidence.** The model is trained to reason over supplied passages. Without in-corpus evidence its accuracy drops sharply (see the leave-one-out results below).
61
+ - **Languages other than Tamil**, claims far outside the distribution of Indian/Tamil-language fact-checking (the training corpus is drawn from Tamil fact-checking organizations), and high-stakes domains such as medical or legal adjudication.
62
+ - Generating misinformation, or "laundering" false content by prompting for favorable verdicts.
63
 
64
  ## Bias, Risks, and Limitations
65
 
66
+ - **Retrieval dependence.** Under a leave-one-out condition that withholds each claim's own source fact-check article, standalone macro-F1 falls from 82.7 to 67.7. On genuinely novel claims the model's value lies in the auditable, evidence-grounded reasoning rather than in raw accuracy.
67
+ - **False vs. Misleading boundary.** Like all systems evaluated in the paper (including frontier LLMs), the model errs most often on the boundary between outright fabrications and misleading framings of true events.
68
+ - **Verdict-taxonomy drift.** On manipulated-media claims, the model occasionally reasons correctly about the manipulation yet labels the claim "True" because the post accurately *describes* the manipulation. In CDPVA this failure mode is caught by the verification gate.
69
+ - **Domain and coverage bias.** The training corpus reflects the topical, temporal, and editorial distribution of Tamil fact-checking outlets (heavily Indian political and social-media content). Claims outside this distribution may be handled poorly.
70
+ - **Confidence is regularized, not guaranteed.** A Brier-score term during training discourages uniform overconfidence, but reported confidences should still be treated as heuristic signals, not calibrated probabilities, especially out of domain.
71
 
72
  ### Recommendations
73
 
74
+ Keep a human in the loop for any consequential decision. Present the model's cited evidence and reasoning trace alongside its verdict so reviewers can audit the basis for each prediction. Recalibrate the confidence threshold on an in-domain validation split before deployment, particularly when the retrieval corpus differs from TamilFacts-X.
 
 
75
 
76
  ## How to Get Started with the Model
77
 
78
+ ```python
79
+ from transformers import AutoModelForCausalLM, AutoTokenizer
80
+ from peft import PeftModel
81
+ import torch
82
+
83
+ base_id = "Qwen/Qwen3.5-4B"
84
+ adapter_id = "[TODO: your-org/TamilRAV]"
85
+
86
+ tokenizer = AutoTokenizer.from_pretrained(base_id)
87
+ model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype=torch.bfloat16, device_map="auto")
88
+ model = PeftModel.from_pretrained(model, adapter_id)
89
+ model.eval()
90
+
91
+ # Use the exact prompt template released with the paper/repository.
92
+ # Structure: the Tamil claim followed by the reranked evidence passages,
93
+ # requesting the four structured output fields.
94
+ prompt = build_prompt(claim_ta, evidence_passages) # see repository for the template
95
+
96
+ # Self-consistency decoding as used in the paper
97
+ verdicts, confidences = [], []
98
+ for temp in (0.3, 0.5, 0.7):
99
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
100
+ out = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=temp)
101
+ text = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
102
+ v, c = parse_structured_output(text) # regex parser for verdict/confidence fields
103
+ verdicts.append(v); confidences.append(c)
104
+
105
+ final_verdict = max(set(verdicts), key=verdicts.count) # majority vote
106
+ final_confidence = sum(confidences) / len(confidences) # mean pooling
107
+ ```
108
 
109
  ## Training Details
110
 
111
  ### Training Data
112
 
113
+ The adapter is fine-tuned on the training partition (15,497 claims) of **TamilFacts-X**, a 17,271-claim multimodal Tamil fact-checking benchmark built from published fact-check articles and annotated under a four-class veracity taxonomy (True / False / Misleading / Altered). Each supervised instance serializes the claim together with its reranked evidence passages as input, and the four structured output fields (verdict, Tamil explanation, confidence in [0, 1], reasoning trace) as the target. [TODO: link the dataset card]
 
 
114
 
115
  ### Training Procedure
116
 
117
+ Supervised fine-tuning with LoRA. The training objective combines the standard autoregressive cross-entropy loss over the serialized target with a Brier-score regularizer on the confidence field, which penalizes the squared deviation between the stated confidence and the correctness of the predicted verdict.
 
 
 
 
 
118
 
119
  #### Training Hyperparameters
120
 
121
+ - **Training regime:** bf16
122
+ - **LoRA target modules:** attention Q, K, V, O projections and MLP projection layers
123
+ - **LoRA rank r:** [TODO]
124
+ - **LoRA alpha:** [TODO]
125
+ - **Confidence-loss weight λ:** [TODO]
126
+ - **Optimizer / LR / epochs / batch size:** [TODO]
127
 
128
  #### Speeds, Sizes, Times [optional]
129
 
130
+ - Fine-tuned on a single consumer GPU: [TODO: GPU model, VRAM, wall-clock hours]
131
+ - Adapter checkpoint size: [TODO]
 
132
 
133
  ## Evaluation
134
 
 
 
135
  ### Testing Data, Factors & Metrics
136
 
137
+ Evaluated on the balanced 608-claim TamilFacts-X evaluation set (152 claims per class). Metric: macro-averaged F1 over the four classes. Evidence at test time is retrieved from the fact-check corpus (Qwen3-Embedding-0.6B + Qdrant, top-20; BGE-Reranker-v2-m3, top-3). Self-consistency (SC) denotes three samples at T ∈ {0.3, 0.5, 0.7} with majority-vote verdicts and mean-pooled confidence. The leave-one-out (LOO) condition removes each claim's own source article from its retrieval pool.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
  ### Results
140
 
141
+ | Configuration | Macro-F1 |
142
+ |---|---|
143
+ | TamilRAV, single sample | 78.3 |
144
+ | **TamilRAV + self-consistency** | **82.7** |
145
+ | TamilRAV + SC, leave-one-out retrieval | 67.7 |
146
+ | Full CDPVA system (with discriminative path + gate) | 92.9 ± 0.6 |
147
 
148
+ Per-class F1 of TamilRAV + SC on the evaluation set: True 88.0, False 78.5, Misleading 75.1, Altered 89.4.
149
 
150
+ For reference, the strongest zero-shot text-prompted frontier LLM baseline evaluated in the paper reaches 62.5 macro-F1 on the same set (under a non-like-for-like, retrieval-free condition).
151
 
152
+ #### Summary
153
 
154
+ With retrieval grounding and self-consistency, a 4B-parameter LoRA-adapted model substantially outperforms zero-shot frontier LLMs on Tamil claim verification, and its structured, evidence-cited outputs make each verdict auditable. Its standalone accuracy depends significantly on retrieval quality, which is why it is deployed inside CDPVA alongside a discriminative classifier and a verification gate.
155
 
156
  ## Environmental Impact
157
 
158
+ - **Hardware Type:** [TODO: e.g., 1× consumer GPU model]
159
+ - **Hours used:** [TODO]
160
+ - **Cloud Provider / Compute Region:** [TODO or "local workstation"]
161
+ - **Carbon Emitted:** [TODO — estimable via the ML CO2 Impact calculator](https://mlco2.github.io/impact#compute)
 
 
 
 
 
162
 
163
+ ## Technical Specifications
164
 
165
  ### Model Architecture and Objective
166
 
167
+ Qwen3.5-4B decoder-only transformer (rotary positional embeddings, SwiGLU activations, large multilingual vocabulary) with LoRA adapters on all attention Q/K/V/O and MLP projection matrices. Objective: autoregressive cross-entropy over structured verification outputs plus a Brier-score confidence regularizer.
168
 
169
  ### Compute Infrastructure
170
 
 
 
171
  #### Hardware
172
 
173
+ [TODO: GPU model and VRAM]
174
 
175
  #### Software
176
 
177
+ - PEFT 0.14.0
178
+ - transformers [TODO: version], PyTorch [TODO: version]
 
179
 
180
+ ## Citation
181
 
182
  **BibTeX:**
183
 
184
+ <!-- ```bibtex
185
+ @article{[TODO-key],
186
+ title = {A Complementary Dual-Path Verification Architecture for Multimodal Tamil Misinformation Classification and Reasoning},
187
+ author = {[TODO: authors]},
188
+ journal = {[TODO: journal, once accepted]},
189
+ year = {2026},
190
+ note = {TamilFacts-X benchmark and CDPVA system; TamilRAV is the retrieval-grounded reasoning path}
191
+ }
192
+ ``` -->
193
 
194
+ ## Model Card Authors
195
 
196
+ [TODO]
 
 
 
 
 
 
 
 
197
 
198
  ## Model Card Contact
199
 
200
+ [TODO: email or HF discussion link]
201
+
202
  ### Framework versions
203
 
204
  - PEFT 0.14.0