You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Qwen3.5 Standalone 4L Propaganda Classifier

Research artifact / 연구용 모델입니다. This model classifies 14 propaganda-technique labels; it is not a general chat model, fact checker, safety oracle, or universal intent classifier.

Qwen3.5-0.8B의 24-layer 생성 backbone을 classification-only 4-layer L-F-L-F backbone으로 줄이고, autoregressive generation 없이 기사 단위 multilabel 확률을 내도록 학습한 결과입니다. The default repository root is seed 41 for convenient inference; the reported headline quality is the mean and sample SD across seeds 41/42/43. Every behavioral and performance claim in this card is mapped to its canonical artifact in the model-card evidence ledger.

바로 실행 / one-line inference

아래 한 줄은 필요한 패키지를 설치하고 이 저장소의 classify.py를 받아 바로 실행합니다. It downloads the seed-41 model on first use and never enables remote custom code.

python -m pip install -q "torch>=2.4" "transformers==5.13.0" "huggingface_hub>=0.34" && python -c "from huggingface_hub import hf_hub_download; p=hf_hub_download('mp-juuuns/qwen35-standalone4l-propaganda-classifier','classify.py'); exec(compile(open(p,encoding='utf-8').read(),p,'exec'))" --text "The article repeats a loaded slogan and attacks its opponents."

긴 파일은 --text-file article.txt, CPU 강제 실행은 --device cpu, 다른 공개 seed는 --seed 42 또는 --seed 43을 사용합니다. Output is JSON with the fixed label order, all 14 probabilities, thresholded labels, and the number of 256-token windows.

python classify.py --text-file article.txt --device auto --seed 41

직접 Transformers API를 쓰는 최소 예시는 아래와 같습니다. This produces raw single-window probabilities; for long articles and the published 256/128 window aggregation contract, use classify.py above.

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_id = "mp-juuuns/qwen35-standalone4l-propaganda-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
model = AutoModelForSequenceClassification.from_pretrained(
    model_id, trust_remote_code=False
).eval()
inputs = tokenizer("Your input text here", return_tensors="pt", truncation=True, max_length=256)
with torch.inference_mode():
    probabilities = torch.sigmoid(model(**inputs).logits.float())[0]
print([
    {"label": model.config.id2label[i], "probability": float(probabilities[i])}
    for i in range(model.config.num_labels)
])

ARM64 / UNO Q — recommended C++ edge runtime

Linux aarch64 + asimd 장치에서는 edge/qwen3.5-0.8b-standalone4l-q8-arm64-runtime-v3.tar.gz 가 현재 권장 runtime입니다. It contains the Q8 GGUF, custom llama-embedding, llama-server, llama-bench, and their ARM64 shared libraries. Model execution is C/C++ and does not require PyTorch, Transformers, or a Python interpreter.

Debian/Ubuntu/UNO Q download dependencies:

sudo apt-get update && sudo apt-get install -y ca-certificates curl tar coreutils

아래 한 명령은 공개 HF 파일을 받고 SHA-256을 확인한 뒤, 실제 tar layout에 맞춰 runtime/ 아래에 풀고 C++ classifier raw logits를 실행합니다.

EDGE_ROOT="${EDGE_ROOT:-$PWD/qwen35-edge}" && test "$(uname -m)" = aarch64 && mkdir -p "$EDGE_ROOT/runtime" && curl -fL "https://huggingface.co/mp-juuuns/qwen35-standalone4l-propaganda-classifier/resolve/main/edge/qwen3.5-0.8b-standalone4l-q8-arm64-runtime-v3.tar.gz" -o "$EDGE_ROOT/runtime.tar.gz" && printf '%s  %s\n' 'daf5d051c816a3aef94713e83fb532f4bd23340d3e8714818696695f9ccd26cc' "$EDGE_ROOT/runtime.tar.gz" | sha256sum -c - && tar -xzf "$EDGE_ROOT/runtime.tar.gz" -C "$EDGE_ROOT/runtime" && SCAMGUARDIAN_QWEN35_NO_KV=1 OMP_NUM_THREADS=4 "$EDGE_ROOT/runtime/bin/llama-embedding" -m "$EDGE_ROOT/runtime/model/qwen3.5-0.8b-standalone4l-joint-q8_0.gguf" --embd-output-format array --pooling rank --embd-normalize -1 --parallel 1 -c 1024 -b 1024 -ub 1024 -t 4 -ngl 0 -fa 0 -ctk f32 -ctv f32 -p "The article repeats a loaded slogan and attacks its opponents."

This emits raw 14-way logits. The optional edge/classify_short.py helper applies the frozen external bias, sigmoid, and threshold 0.10; it launches the same C++ binary rather than replacing the runtime with a Python model implementation. Full structure, calibrated helper usage, hashes, and acceptance steps are in the UNO Q deployment guide.

The frozen inference contract is:

raw UTF-8 article
  → tokenizer windows (max_length=256, overlap stride=128)
  → Qwen3.5 text classifier (4 layers)
  → sigmoid(14 logits) per window
  → label-wise maximum across windows
  → seed-specific locked threshold

Locked thresholds are seed 41: 0.10, seed 42: 0.05, seed 43: 0.05. They came from each seed's calibration split, not from the displayed examples.

무엇을 만들었나 / model structure

Component Published common-head model
Base family Qwen/Qwen3.5-0.8B
Runtime class Qwen3_5TextForSequenceClassification in Transformers 5.13.0
Text layers 4: linear_attention → full_attention → linear_attention → full_attention
Hidden / FFN 1,024 / 3,584
Vocabulary 128,000 tokenizer entries in this task checkpoint
Output 14 fixed logits; no vocabulary LM head and no decode loop
Task article-level multilabel propaganda-technique classification
Training 5 epochs, seeds 41/42/43, common-head comparison protocol
Tested inference 256-token windows, stride 128, label-wise max aggregation
Root checkpoint seed 41; seeds 42/43 are under seeds/

The base Qwen3.5-0.8B is a 24-layer hybrid model. This release is not merely a config truncation: selected layers were transferred through the project’s shrink/distillation path and then trained under the frozen common-head benchmark protocol.

왜 세 seed, 왜 41/42/43, 왜 V128k인가

Why three seeds. 한 seed의 우연한 성공을 최종 결과처럼 보이지 않기 위한 최소 반복 설계입니다. 실제 V64k 연구에서는 seed 41에서 통과한 회복법이 seeds 42/43에서 재현되지 않았고, 반대로 다른 회복법은 42/43에서 통과했지만 41에서 실패했습니다. 세 seed는 이런 불안정성을 드러내고 sample SD를 계산할 수 있게 하지만, 여전히 작은 표본이므로 confidence interval이나 유의성 검정으로 해석하지 않습니다.

Why exactly 41, 42, and 43. These are fixed consecutive experiment identifiers inherited by the comparison protocol and locked before the reported runs. The numbers have no special mathematical property and were not selected because they gave the best score. Seed 41 is kept at the repository root because it is the first lineage anchor and default artifact, not because it is the best of the three: seed 42 has the highest observed individual Macro-F1 in this release. No deeper semantic rationale for the literal numbers is claimed.

Why 128,000 vocabulary rows. The first V64k compression was too aggressive at the model interface: even with bit-exact shared head parameters, seed-dependent pooled representations moved enough to cross decision boundaries. At the user's direction, the work continued as a root-cause and recovery study rather than ending at the failed gate. The less aggressive V128k candidate:

  • retained all 5,278/5,278 gold spans and all 14 labels in tokenizer gating;
  • increased mean token length by only 0.003281% and added 0 pp 512-token truncation;
  • remapped retained embedding rows exactly while leaving every non-embedding tensor value-identical;
  • reduced the remapped HF checkpoint by 257,180,884 bytes (29.882%);
  • passed the fixed V128k-hard recovery gate at all three seeds, while the V128k-KD variant was rejected because seed 42 missed technique Macro-F1 non-inferiority by 1.22 pp.

So V128k is not an arbitrary round number or a claim that smaller vocabulary always improves quality. It is the measured compromise that recovered multi-seed stability while preserving a material embedding/storage reduction. Exact paths, hashes, metrics, ownership, and the preserved V64k negative result are listed in the evidence ledger.

냉정한 결론 / headline result

All ranking-eligible rows used the same opened SemEval-2020 public human-gold v2 split, seeds 41/42/43, five epochs, 256/128 windows, and a shared classification head protocol. Error bars below are three-seed sample SD, not confidence intervals.

Model Layers Macro-F1 mean ± SD CUDA warm mean Torch peak
Qwen3.5 final 4L 4 0.5876 ± 0.0072 19.307 ms 430.5 MiB
Qwen3.5 full 24 0.5643 ± 0.0063 141.681 ms 1484.3 MiB
XLM-R Base 12 0.5483 ± 0.0142 6.544 ms 549.6 MiB
Qwen3.5 C8Q 8 0.5367 ± 0.0173 52.390 ms 834.9 MiB
mBERT 12 0.5320 ± 0.0141 6.679 ms 358.6 MiB
Qwen2.5 full 12 0.5186 ± 0.0080 10.613 ms 618.7 MiB
Qwen2.5 fixed 8 0.5131 ± 0.0126 6.468 ms 503.6 MiB
MiniLM multilingual 12 0.5079 ± 0.0162 5.387 ms 236.5 MiB
mDeBERTa-v3 12 0.5078 ± 0.0144 22.699 ms 559.6 MiB

Observed on this one benchmark, final 4L is +0.0233 Macro-F1 over 24L, 7.34× faster in warm CUDA forward, and uses 71.0% less process-local Torch peak allocation. It is not the absolute latency winner: MiniLM and XLM-R are substantially faster. The defensible conclusion is that 4L dominates the tested Qwen3.5 alternatives and lies on the overall measured quality–latency and quality–memory Pareto frontiers.

The separately sealed Q8 edge artifact scores Macro-F1 0.5102, x86 CPU 92.803 ms, and UNO Q 2119.552 ms. Its historical joint head differs from this common-head model, so the quality gap is not a pure quantization-loss estimate.

그래프 읽는 법 / what each graph means

0. Audit-ready overview

Final benchmark overview

한 장에 benchmark strata, 동일조건 비교, edge 결과, exclusions를 묶은 overview입니다. It is a map of the evidence, not an additional statistical test.

1. Quality across the shared common-head protocol

Quality comparison

Bars show mean Macro/Micro-F1; whiskers are three-seed sample SD. Final 4L has the highest observed Macro-F1. The chart does not establish population-level superiority because the opened test contains only 55 articles.

2. CUDA warm and cold latency

CUDA latency

Warm forward latency and cold startup costs answer different questions. 4L cuts Qwen3.5 latency sharply, but encoder baselines remain faster in absolute warm latency.

3. CUDA memory and telemetry

CUDA memory and telemetry

Model-attributable comparisons use process-local Torch peak allocation. Absolute nvidia-smi memory contains ambient allocation, so it is retained as telemetry rather than misreported as model-only memory.

4. Sealed Q8 on x86 CPU and UNO Q

Edge systems

This measures the exact Q8 package on two CPU platforms. UNO Q completed without OOM, reached 63°C, preserved the existing service, and passed all 8/8 parity fixtures; it is much slower than x86 CPU and is not presented as the fastest platform.

5. Quality–latency and quality–memory Pareto fronts

Pareto comparison

A point is Pareto-dominated if another model is both no worse in quality and no worse in cost. Final 4L remains on both measured frontiers; that does not mean every deployment should choose it.

6. General Qwen3.5 prompt diagnostic

Prompt diagnostic

The general model's zero-shot JSON generation is shown as a diagnostic, not inserted into the classifier latency ranking. It reached Macro-F1 0.0517, produced valid JSON for 41/55 articles, and averaged 9.121 s on the fixed generation fixture.

7. Availability and missingness

Availability

This makes missing evidence visible: Task 3 private/final data and Mac were excluded; x86 CPU thermal/frequency and sampled UNO Q SIMD kernel execution remain unverified. Missing rows are not silently replaced.

8. Does fewer layers mean better quality, and linear latency?

Depth, quality and latency scaling

No monotonic quality rule appears: 4L=0.5876, 8L=0.5367, 24L=0.5643 Macro-F1. Thus “one fewer layer improves accuracy” is unsupported. Latency is descriptively close to an affine line across only three points (R²=0.9945), but not exactly proportional to layer count: relative to the 4L-anchored proportional line, 8L is 1.36× and 24L is 1.22× slower. These three models use different selected layer maps and lineages, so this is not a controlled one-layer causal ablation. Kernel launch, fixed overhead, memory traffic, and layer type also matter.

Raw chart input and computed ratios are in 08_depth_quality_latency_scaling.json.

왜 SemEval-2020 Task 11인가 / dataset choice

The executed dataset is the public PTC-SemEval20 corpus from Da San Martino et al. (2020), reformatted into article-level 14-label targets without inventing new human labels.

선택 이유는 final score를 본 뒤 만든 것이 아닙니다.

  1. Task alignment: the provider defines technique classification over 14 propaganda techniques with full-document context, matching this model's fixed output ontology.
  2. Human-gold process: paper Section 3.1 (pp. 1380–1381) describes two independent annotators followed by a consolidator; six professional annotators performed the work.
  3. Stronger test review: p. 1381 records an extra test consolidation with convergence among at least three experts not involved in the initial annotation.
  4. Real contextual difficulty: the paper reports overlapping spans, strong class imbalance, and variable span lengths rather than a synthetic balanced toy task.
  5. Reproducibility: public splits, exact local JSONL SHA-256, fixed seeds/epochs/windows, raw CSVs, and an independent chart audit are available.

Limitations matter: the articles come from 2017–2019 English news, the opened test used here has 55 converted articles, and repeated development around a public split means it is not an untouched confirmatory holdout. This dataset cannot establish universal intent-classification performance.

난이도별 데이터셋 선택 이유와 실제 상태

This table separates the requested future three-dataset protocol from what was actually executed.

Tier Dataset and why it fits Status in this release
Simple / 단문 의도 CLINC150 is a candidate because it contains short, single-intent task-oriented queries across 150 intents and 10 domains plus out-of-scope data. It would test clean utterance classification, but requires a new 151-way head and is not directly comparable to the 14 propaganda labels. planned-only; no score reported
Contextual / 기사 문맥 SemEval-2020 Task 11 requires identifying techniques in full news context, includes overlap and imbalance, and matches the current ontology. executed broad benchmark
High-context / 다국어 프레이밍 SemEval-2023 Task 3 covers news in nine languages, article genre, 14 frames, and 23 paragraph-level persuasion techniques. This makes it a strong multilingual/context-transfer candidate, but needs task-specific head adaptation. excluded: organizer/private-final boundary; not accessed

Therefore the published numbers are not a completed three-dataset narrow benchmark. No new human gold or post-hoc substitute was introduced after Task 3 was excluded.

실제 학습 query 예시와 모델별 출력

아래 세 건은 frozen train split에서 model output을 보기 전에 구조 규칙으로 고른 실제 학습 article입니다. Full text is not redistributed: only a 25-word excerpt, stable article ID, and SHA-256 are exposed. They illustrate complexity; they are not unseen evaluation evidence.

Tier Article ID 25-word excerpt Gold IDs Structure
simple 739140767 “MS-503 Gang Member Apprehended by Border Patrol Agents In Arizona YUMA, Ariz. – Yuma Sector Border Patrol agents arrested a gang member belonging to the” [8] 940 chars, 1 span, 1 window
contextual 729348908 “Virginia man who wanted to join ISIS pleads guilty to lying about overseas trip NORFOLK, Va. — While texting with an FBI informant in September” [1,5,6,7,9] 4,070 chars, 7 spans, 7 windows
high-context 785801366 “9 Steps to Successfully Counter Jihad [Pre-Order Jamie Glazov's new book, Jihadist Psychopath: How He Is Charming, Seducing, and Devouring Us, HERE.] Editors’ note: In” [0,1,3,4,5,6,7,8,9,10,11,13] 9,626 chars, 70 spans, 16 windows

Predicted label IDs under each model's own frozen seed-41 threshold:

Model simple contextual high-context
Qwen3.5 final 4L [8] [1,5,6,7,8,9,10,13] [0,1,2,3,4,5,6,7,8,9,10,11,12,13]
Qwen3.5 full 24L [8] [1,5,6,7,8,9] [0,1,3,4,5,6,7,8,9,10,11,13]
Qwen3.5 C8Q 8L [8] [1,5,6,7,8,9] [0,1,3,4,5,6,7,8,9,10,11,13]
Qwen2.5 full 12L [3,8,9] [1,2,3,4,5,6,7,8,9,10,11,12] all 14
Qwen2.5 fixed 8L [8] [1,5,6,7,8,9,10,12] all 14
XLM-R Base [] [1,2,5,6,7,8,9,10,11,13] [0,1,2,4,5,6,7,8,9,10,11,12,13]
mBERT [2,5,8] [0,1,2,3,4,5,6,7,8,9,11,12,13] all 14
MiniLM multilingual all 14 all 14 all 14
mDeBERTa-v3 [4,7,8,11] [8,11] all 14
4L Q8 historical joint head [5,8] [1,5,7,8,9,10] all 14
Qwen3.5 general prompt [0,3] [0,3] [0,3]

Different thresholds make these three diagnostic rows unsuitable for ranking. The complete finite probability vectors, prompt outputs, gold mappings, source/checkpoint hashes, and audit are in final_release_training_examples.json and its independent audit.

Label order

ID Label
0 Appeal_to_Authority
1 Appeal_to_fear-prejudice
2 Bandwagon,Reductio_ad_hitlerum
3 Black-and-White_Fallacy
4 Causal_Oversimplification
5 Doubt
6 Exaggeration,Minimisation
7 Flag-Waving
8 Loaded_Language
9 Name_Calling,Labeling
10 Repetition
11 Slogans
12 Thought-terminating_Cliches
13 Whataboutism,Straw_Men,Red_Herring

Fresh physical UNO Q lineage matrix

Eleven native Qwen GGUF artifacts were rerun on one physical Arduino UNO Q with the same sealed ARM64 runtime, four threads, prompt lengths 11/32/128, three rotated rounds, and five repetitions. All 33 arms completed, all cooldown gates recovered, and the OOM-kill counter remained 0→0.

All native UNO Q models

Layer reduction: matched V128k/F16 series

Matched layer reduction

For the controlled Qwen3.5 V128k/F16 8L→6L→early-path 4L series, 8L→4L reduced pp128 latency 49.84% (8180.4→4103.5 ms), peak process-tree RSS 21.81% (690.3→539.8 MiB), and the compute-duration proxy 48.96% (241.5→123.2 core-seconds/round). Instantaneous CPU occupancy remained near 3.6–3.7 saturated cores: the smaller model finishes sooner rather than making active inference lightly loaded. Peak temperature fell only 1.3°C; no energy claim is made. The 4L point is a historical early-path depth-ablation proxy, not this root common-head quality checkpoint.

Vocabulary/embedding reduction: exact-remap 8L control

Exact-remap vocabulary reduction

The exact-retained-row V248,320→V128,000 remap reduced the F16 GGUF artifact 29.67% (812.5→571.4 MiB) and peak RSS 32.03% (1015.6→690.3 MiB). It changed pp128 warm latency by only −0.44%, core-seconds by −2.09%, and did not improve temperature. The supported device claim is therefore storage/resident-memory reduction, not proportional compute or thermal reduction. Non-embedding tensors are value-identical in the remap audit.

The matrix measures the native backbone/classifier embedding path. Packed joint rows show load/forward systems cost only; they do not validate evidence-span output or quality. XLM-R, mBERT, MiniLM, and mDeBERTa are absent because no equivalent artifact exists for this native Qwen GGUF classifier runtime. Full protocol, all 11 rows, raw evidence, and claim boundaries: UNO Q model-lineage matrix.

UNO Q edge artifact

The edge/ directory contains the sealed Q8 GGUF and the recommended generic ARMv8-a runtime package with custom llama-embedding, llama-server, and llama-bench binaries. The UNO Q acceptance gate verified aarch64 + asimd, $ORIGIN dependencies, finite [1,14] logits, deterministic repeat, x86 parity, and a short no-OOM/no-leak-signal screen.

  • Q8 GGUF SHA-256: acc07b4fdd8260147b3c6cb7c7104513176bcb72c88f5277feaa25fc9080f0b3
  • ARM64 package SHA-256: daf5d051c816a3aef94713e83fb532f4bd23340d3e8714818696695f9ccd26cc
  • NEON/ARM_FMA/repack runtime detection passed; sampled Q8 SIMD kernel execution remained unverified because perf was unavailable. This is not a +dotprod or +i8mm tuned build.

왜 generic v3인가 / runtime selection

A separate Cortex-A53/NEON v2 build passed device correctness but did not earn promotion. Under the same UNO Q fixtures and four-thread runtime contract, eight-fixture median latency was 17,048.072 ms for generic v3 and 17,044.703 ms for A53 v2: only 0.0198% descriptive improvement, with A53 faster in 3/5 complete repetitions. The frozen promotion requirements were at least 2% and 4/5. Peak RSS/PSS differed by only +24 KiB, A53 peak temperature was 1°C lower, and cross-runtime logits were exactly equal.

UNO Q generic ARMv8-A versus Cortex-A53/NEON v2

The graph shows the two latency traces overlapping, every per-repetition speedup far below the 2% promotion line, effectively identical memory, and no thermal regression. Therefore generic v3 remains the supported public default; A53 v2 is preserved as a negative result, not advertised as an optimization. See the selection decision and independent audit.

The published tar expands as:

runtime/
├── bin/
│   ├── llama-embedding      # custom 14-way classifier/raw-logit path
│   ├── llama-server         # HTTP server linked to the custom llama library
│   ├── llama-bench          # device diagnostic binary
│   └── lib*.so*             # pinned ARM64 llama/ggml/C++ runtime closure
└── model/
    └── qwen3.5-0.8b-standalone4l-joint-q8_0.gguf

See the UNO Q deployment guide for exact extraction, acceptance, calibrated helper, and raw C++ inference commands.

Reproducibility and limitations

  • Public-test articles: 55, previously opened public human-gold.
  • Quality uncertainty: sample SD across three seeds, not confidence intervals/significance tests.
  • The root checkpoint is seed 41 (Macro-F1=0.5833); 0.5876 ± 0.0072 is the three-seed aggregate, not the root checkpoint's individual score.
  • Calibration is unstable across some labels/seeds; do not interpret probabilities as factual truth.
  • Dataset domain is English news, not conversational multilingual intent classification.
  • General Qwen prompt generation and classifier forward are different workloads.
  • The common-head repository root is classification-only. A historical joint-head Q8 artifact is packaged for the custom runtime, but evidence extraction is not a supported public behavior: the latest seed-41 label-span and BIO-CRF arms remained below the fixed practical extraction floors.
  • GGUF denotes the artifact format and the bundled custom llama.cpp path. Drop-in Ollama behavior for the custom classification/span heads has not been tested and is not claimed.
  • Energy was not measured. WSL x86 CPU temperature/frequency and UNO Q sampled SIMD kernels are explicitly unverified.
  • The fresh UNO Q matrix's core-seconds is a compute-duration proxy, not joules. Temperature is device/ambient-specific, and the matrix does not test span extraction quality.
  • Do not use this artifact as the sole basis for content moderation, safety, or legal decisions.

Machine-readable inputs are under benchmark/; every released file is covered by SHA256SUMS and release_manifest.json. Project narrative, source, and UNO Q instructions: GitHub repository.

Citation

@inproceedings{da-san-martino-etal-2020-semeval,
  title = {SemEval-2020 Task 11: Detection of Propaganda Techniques in News Articles},
  author = {Da San Martino, Giovanni and Barrón-Cedeño, Alberto and Wachsmuth, Henning and Petrov, Rostislav and Nakov, Preslav},
  booktitle = {Proceedings of the Fourteenth Workshop on Semantic Evaluation},
  pages = {1377--1414},
  year = {2020},
  doi = {10.18653/v1/2020.semeval-1.186}
}

Base-model metadata and license: Qwen/Qwen3.5-0.8B.

Downloads last month
63
Safetensors
Model size
0.2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mp-juuuns/qwen35-standalone4l-propaganda-classifier

Quantized
(186)
this model