This is the "heavy" variant of the C4-Cognitive-Classifier. It uses a larger multilingual encoder (mDeBERTa-v3-base) and is significantly more accurate than the light DistilBERT variant, at the cost of larger size and slower inference.
1import onnxruntime as ort
2import numpy as np
3from transformers import AutoTokenizer
4
5session = ort.InferenceSession("c4_mdeberta_v2.onnx")
6tokenizer = AutoTokenizer.from_pretrained("HangJang/C4-Cognitive-Classifier-Heavy")
7
8text = "Я думаю о будущем и строю планы на многие годы вперёд."
9tokens = tokenizer(text, return_tensors="np", padding=True, truncation=True, max_length=256)
10
11outputs = session.run(None, {
12 "input_ids": tokens["input_ids"],
13 "attention_mask": tokens["attention_mask"],
14})
15
16t = int(np.argmax(outputs[0][0])) # Time
17s = int(np.argmax(outputs[1][0])) # Scale (dimension)
18a = int(np.argmax(outputs[2][0])) # Agency (identity)
19
20print(f"C4 State: ({t}, {s}, {a})")
1# CLI
2dsm me ~/Downloads/conversations.json --c4-model heavy
3
4# Web UI
5streamlit run dsm_web.py
6# Then choose "Heavy — best accuracy" in Model settings.
1@misc{c4_cognitive_classifier_v1,
2 title = {C4-Cognitive-Classifier: Z₃³ Cognitive Topology from Natural Language},
3 author = {Selyutin, I.G.},
4 year = {2026},
5 url = {https://huggingface.co/HangJang/C4-Cognitive-Classifier-v1}
6}