iRanadheer commited on
Commit
309cfe8
·
verified ·
1 Parent(s): 07c01f5

Update model card: fix paper year, drop English-only, add multimodal section

Browse files
Files changed (1) hide show
  1. README.md +57 -2
README.md CHANGED
@@ -14,13 +14,16 @@ tags:
14
  - qwen3
15
  - fine-tuned
16
  - cards
 
 
 
17
  datasets:
18
  - C3DS/cards_sft_dataset
19
  ---
20
 
21
  # CARDS-Qwen3.6-27B
22
 
23
- Fine-tuned **Qwen3.6-27B** for classification of climate-contrarian claims using the **CARDS taxonomy** from Coan et al. (2026).
24
 
25
  This is a **merged** checkpoint: a LoRA adapter (rank 16) trained on the CARDS SFT dataset has been merged back into the base weights for direct loading with `transformers`, vLLM, or any standard inference engine. The separate adapter is available at [`C3DS/CARDS-Qwen3.6-27B-lora`](https://huggingface.co/C3DS/CARDS-Qwen3.6-27B-lora).
26
 
@@ -87,6 +90,59 @@ The model produces a reasoning trace inside `<think>…</think>` followed by a Y
87
 
88
  See the [project repository](https://github.com/project-c3ds/cards-2pO-paper) for training scripts, evaluation code, and dataset preparation.
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  ## Training
91
 
92
  - **Base model:** `Qwen/Qwen3.6-27B`
@@ -101,7 +157,6 @@ See the [project repository](https://github.com/project-c3ds/cards-2pO-paper) fo
101
  ## Limitations
102
 
103
  - **Macro F1 on rare labels.** The model trails Claude Opus at L3 macro-F1 (0.483 vs 0.531), reflecting the long-tailed label distribution of CARDS.
104
- - **English only.**
105
  - **Thinking tokens.** Training used `enable_thinking=True`. Either parse output after `</think>`, or disable thinking at inference via `chat_template_kwargs={"enable_thinking": false}`. Reserve token budget for the reasoning trace before the final YAML block.
106
 
107
  ## Citation
 
14
  - qwen3
15
  - fine-tuned
16
  - cards
17
+ - image-text-to-text
18
+ - multimodal
19
+ - vision-language
20
  datasets:
21
  - C3DS/cards_sft_dataset
22
  ---
23
 
24
  # CARDS-Qwen3.6-27B
25
 
26
+ Fine-tuned **Qwen3.6-27B** for classification of climate-contrarian claims using the **CARDS taxonomy** from Coan et al. (2025).
27
 
28
  This is a **merged** checkpoint: a LoRA adapter (rank 16) trained on the CARDS SFT dataset has been merged back into the base weights for direct loading with `transformers`, vLLM, or any standard inference engine. The separate adapter is available at [`C3DS/CARDS-Qwen3.6-27B-lora`](https://huggingface.co/C3DS/CARDS-Qwen3.6-27B-lora).
29
 
 
90
 
91
  See the [project repository](https://github.com/project-c3ds/cards-2pO-paper) for training scripts, evaluation code, and dataset preparation.
92
 
93
+ ### Multimodal — image + text
94
+
95
+ The base Qwen3.5/3.6 family supports image inputs via the OpenAI-compatible
96
+ `image_url` content part, and this fine-tune preserves that capability — pass
97
+ the system prompt below alongside an image (with or without caption text) and
98
+ the model will classify the depicted claim under the CARDS taxonomy.
99
+
100
+ Serve vLLM with multimodal flags enabled:
101
+
102
+ ```bash
103
+ vllm serve C3DS/CARDS-Qwen3.6-27B \
104
+ --port 8000 \
105
+ --max-model-len 8192 \
106
+ --trust-remote-code \
107
+ --limit-mm-per-prompt image=4 \
108
+ --enable-prefix-caching \
109
+ --served-model-name CARDS-Qwen3.6-27B
110
+ ```
111
+
112
+ ```python
113
+ import base64, json, mimetypes
114
+ from pathlib import Path
115
+ from huggingface_hub import hf_hub_download
116
+ from openai import OpenAI
117
+
118
+ prompts = json.load(open(hf_hub_download("C3DS/CARDS-Qwen3.6-27B", "cards_prompts.json")))
119
+ slim_system_instruction = prompts["slim_system_instruction"]
120
+ cot_trigger = prompts["cot_trigger"]
121
+
122
+ def image_part(path):
123
+ p = Path(path)
124
+ mime = mimetypes.guess_type(p)[0] or "image/png"
125
+ b64 = base64.b64encode(p.read_bytes()).decode()
126
+ return {"type": "image_url", "image_url": {"url": f"data:{mime};base64,{b64}"}}
127
+
128
+ client = OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
129
+
130
+ resp = client.chat.completions.create(
131
+ model="CARDS-Qwen3.6-27B",
132
+ messages=[
133
+ {"role": "system", "content": slim_system_instruction},
134
+ {"role": "user", "content": [
135
+ {"type": "text", "text": "Read the image (and any caption below) and classify the climate claim it makes."},
136
+ image_part("screenshot.png"),
137
+ {"type": "text", "text": f"### Caption:\n<optional caption>\n\n{cot_trigger}"},
138
+ ]},
139
+ ],
140
+ temperature=0,
141
+ max_tokens=4000,
142
+ )
143
+ print(resp.choices[0].message.content)
144
+ ```
145
+
146
  ## Training
147
 
148
  - **Base model:** `Qwen/Qwen3.6-27B`
 
157
  ## Limitations
158
 
159
  - **Macro F1 on rare labels.** The model trails Claude Opus at L3 macro-F1 (0.483 vs 0.531), reflecting the long-tailed label distribution of CARDS.
 
160
  - **Thinking tokens.** Training used `enable_thinking=True`. Either parse output after `</think>`, or disable thinking at inference via `chat_template_kwargs={"enable_thinking": false}`. Reserve token budget for the reasoning trace before the final YAML block.
161
 
162
  ## Citation