Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,182 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- qwen3_moe
|
|
|
|
|
|
|
| 8 |
license: apache-2.0
|
| 9 |
language:
|
| 10 |
- en
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
| 16 |
-
- **License:** apache-2.0
|
| 17 |
-
- **Finetuned from model :** unsloth/Qwen3-30B-A3B-Instruct-2507
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3-30B-A3B-Instruct-2507
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- qwen3_moe
|
| 8 |
+
- cognitive chains
|
| 9 |
+
- cognition
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
| 13 |
+
datasets:
|
| 14 |
+
- Daemontatox/SOCAM
|
| 15 |
+
library_name: transformers
|
| 16 |
---
|
| 17 |
|
| 18 |
+
## Daemontatox/SOCAM-V1
|
| 19 |
|
| 20 |
+
### Model Description
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
SOCAM-V1 (Social Cognitive Agent Model – V1) is a fine-tuned large language model built on top of Qwen/Qwen3-30B-A3B-Instruct.
|
| 23 |
|
| 24 |
+
The model is trained to function as a Cognitive State Machine, extracting cognitive chains from natural social utterances based on Theory of Mind (ToM) reasoning.
|
| 25 |
+
|
| 26 |
+
Each cognitive chain follows the structure:
|
| 27 |
+
|
| 28 |
+
Situation ⇒ Clue ⇒ Thought ⇒ (Action + Emotion)
|
| 29 |
+
|
| 30 |
+
This provides an interpretable representation of a user’s cognitive state, supporting applications in dialogue systems, emotional support agents, and multi-agent cognitive architectures.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
### Training Details
|
| 36 |
+
|
| 37 |
+
Base Model: Qwen/Qwen3-30B-A3B-Instruct
|
| 38 |
+
|
| 39 |
+
Fine-tuning Method: QLoRA with Unsloth + TRL
|
| 40 |
+
|
| 41 |
+
Dataset: Daemontatox/SOCAM
|
| 42 |
+
|
| 43 |
+
Adapted from the COKE dataset (Wu et al., 2024)
|
| 44 |
+
|
| 45 |
+
~45k structured samples with fields: situation, clue, thought, action, emotion
|
| 46 |
+
|
| 47 |
+
Emotions restricted to: Love, Surprise, Joyful, Sad, Angry, Fearful
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
### Training Parameters:
|
| 51 |
+
|
| 52 |
+
Sequence length: 2048
|
| 53 |
+
|
| 54 |
+
LoRA config: r=16, alpha=32, dropout=0.01
|
| 55 |
+
|
| 56 |
+
Optimizer: AdamW (8-bit)
|
| 57 |
+
|
| 58 |
+
Effective batch size: 256 (16 × grad acc 16)
|
| 59 |
+
|
| 60 |
+
Learning rate: 2e-4 (cosine schedule, warmup ratio 0.02)
|
| 61 |
+
|
| 62 |
+
Epochs: 2
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
Hardware: H100-class GPU (8-bit quantization for feasibility)
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
### Model Capabilities
|
| 72 |
+
|
| 73 |
+
Converts free-text utterances into structured cognitive chains.
|
| 74 |
+
|
| 75 |
+
Ensures separation of:
|
| 76 |
+
|
| 77 |
+
Situation (context domain)
|
| 78 |
+
|
| 79 |
+
Clue (triggering factor)
|
| 80 |
+
|
| 81 |
+
Thought (internal cognition)
|
| 82 |
+
|
| 83 |
+
Action (behavioral response)
|
| 84 |
+
|
| 85 |
+
Emotion (affective category)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
Outputs deterministic JSON for easy downstream parsing.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
⁶
|
| 95 |
+
### Example Usage
|
| 96 |
+
```python
|
| 97 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 98 |
+
import torch
|
| 99 |
+
|
| 100 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 101 |
+
"Daemontatox/SOCAM-V1",
|
| 102 |
+
device_map="auto",
|
| 103 |
+
torch_dtype=torch.bfloat16
|
| 104 |
+
)
|
| 105 |
+
tokenizer = AutoTokenizer.from_pretrained("Daemontatox/SOCAM-V1")
|
| 106 |
+
|
| 107 |
+
prompt = """Situation: "I have an important exam tomorrow."
|
| 108 |
+
Clue: "I have studied consistently for weeks."
|
| 109 |
+
"""
|
| 110 |
+
|
| 111 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 112 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 113 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 114 |
+
|
| 115 |
+
Expected output:
|
| 116 |
+
|
| 117 |
+
{
|
| 118 |
+
"situation": "I have an important exam tomorrow.",
|
| 119 |
+
"clue": "I have studied consistently for weeks.",
|
| 120 |
+
"thought": "I believe I will perform well and feel confident.",
|
| 121 |
+
"action": "I review lightly and get proper rest.",
|
| 122 |
+
"emotion": "Joyful"
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
### Limitations & Risks
|
| 130 |
+
|
| 131 |
+
The model may misclassify ambiguous emotions (e.g., Sad vs Fearful).
|
| 132 |
+
|
| 133 |
+
Outputs depend on the quality of the SOCAM dataset and may reflect dataset biases.
|
| 134 |
+
|
| 135 |
+
Not suitable for clinical or medical use.
|
| 136 |
+
|
| 137 |
+
Always validate JSON outputs before downstream use.
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
---
|
| 142 |
+
|
| 143 |
+
### Intended Uses
|
| 144 |
+
|
| 145 |
+
Research on machine Theory of Mind (ToM).
|
| 146 |
+
|
| 147 |
+
Multi-agent cognitive architectures (Tracker, Updater, Reviewer, Responder).
|
| 148 |
+
|
| 149 |
+
Dialogue systems requiring interpretable cognitive reasoning.
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
Not intended for:
|
| 153 |
+
|
| 154 |
+
Clinical diagnostics
|
| 155 |
+
|
| 156 |
+
Sensitive decision-making without human oversight
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
---
|
| 161 |
+
|
| 162 |
+
### Citation
|
| 163 |
+
|
| 164 |
+
If you use this model, please cite:
|
| 165 |
+
|
| 166 |
+
@misc{socam2025,
|
| 167 |
+
title = {SOCAM-V1: A Cognitive State Machine for Theory of Mind Reasoning},
|
| 168 |
+
author = {Ammar Alnagar},
|
| 169 |
+
year = {2025},
|
| 170 |
+
howpublished = {\url{https://huggingface.co/Daemontatox/SOCAM-V1}}
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
---
|
| 175 |
+
|
| 176 |
+
### Acknowledgments
|
| 177 |
+
|
| 178 |
+
Base model: Qwen/Qwen3-30B-A3B-Instruct
|
| 179 |
+
|
| 180 |
+
Dataset foundation: COKE (Wu et al., 2024)
|
| 181 |
+
|
| 182 |
+
Training libraries: Unsloth, TRL, Hugging Face Transformers
|