From 39ca89526a6cd345880dc77ecb01214742eabde9 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Mon, 14 Sep 2026 16:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: jsmith0475/behavioral-qwen3-4b Source: Original Platform --- .gitattributes | 37 +++++++ README.md | 179 ++++++++++++++++++++++++++++++++++ behavioral-qwen3-4b-f16.gguf | 3 + behavioral-qwen3-4b-q8_0.gguf | 3 + 4 files changed, 222 insertions(+) create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 behavioral-qwen3-4b-f16.gguf create mode 100644 behavioral-qwen3-4b-q8_0.gguf diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7458e9e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,37 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +behavioral-qwen3-4b-q8_0.gguf filter=lfs diff=lfs merge=lfs -text +behavioral-qwen3-4b-f16.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..422adc5 --- /dev/null +++ b/README.md @@ -0,0 +1,179 @@ +--- +license: apache-2.0 +base_model: Qwen/Qwen3-4B +tags: + - persona + - behavioral-fine-tuning + - qlora + - gguf + - mlx + - apple-silicon + - stylometrics + - big-five-personality + - tool-calling + - rag +model_type: qwen3 +language: + - en +pipeline_tag: text-generation +library_name: mlx +--- + +
+ +# Behavioral Fine-Tuned Qwen3-4B + +### *What if you could encode how your best people think — not just what they knew?* + +[![MLX](https://img.shields.io/badge/Training-MLX_LoRA-blue?logo=apple)](https://github.com/ml-explore/mlx) +[![Base Model](https://img.shields.io/badge/Base-Qwen3--4B-orange)](https://huggingface.co/Qwen/Qwen3-4B) +[![Format](https://img.shields.io/badge/Format-GGUF-green)](https://github.com/ggerganov/ggml) +[![License](https://img.shields.io/badge/License-Apache_2.0-red)](https://www.apache.org/licenses/LICENSE-2.0) + +
+ +--- + +## The Problem This Solves + +Every firm has people whose judgment is irreplaceable. Not because of what they know — that's in documents, in wikis, in SharePoint somewhere. Because of *how* they decide. The rhythm of their reasoning. The patterns they use under pressure. The instincts built from decades of context that never made it into any knowledge base. + +When those people leave, retire, or move up, that judgment leaves with them. + +Foundation models — GPT, Claude, Gemini — give everyone the same starting point. They're powerful, but they're commodities. The moat isn't in which foundation model you use. **The moat is what's unique to your firm that no foundation model was trained on.** + +This is a working proof of concept for capturing that moat. + +--- + +## What This Model Demonstrates + +This isn't prompt engineering. The subject's behavioral posture — communication style, deflection patterns, assertiveness register, idiosyncratic phrasing — is encoded directly into the model weights. It doesn't need instructions to behave in character. The behavior *emerges* because the training data is the signal. + +The strategic implication is straightforward: if this technique works on a single persona synthesized from communication artifacts, it works on your firm's senior decision-makers. Their emails, call transcripts, deal memos, board presentations. Encoded. Preserved. Queryable. + +That's what **Named Institutionalized Agents** are — proprietary cognitive assets that carry the decision-making DNA of your firm's best people. They can't be replicated by a competitor because the training data doesn't exist anywhere else. + +> *"We're not training on what they wrote. We're training on how they decided."* + +--- + +## Technical Results + +Built on Qwen3-4B using QLoRA on Apple Silicon. Trained in 174 seconds on 900 behavioral examples. + +| Metric | Result | +|--------|--------| +| Stylometric F1 | **0.616** (target: ≥0.50) ✅ | +| Cosine Similarity | 0.912 | +| Training Loss | 5.340 → **0.079** | +| Trainable Parameters | 3.67M of 4.02B (0.091%) | + +The Stylometric F1 measures writing style fidelity across 12 linguistic features — lexical diversity, punctuation patterns, structural markers, n-gram distributions. **0.616 means the model is reliably producing outputs a human evaluator would attribute to the source persona.** + +
+Full training configuration + +| Parameter | Value | +|-----------|-------| +| Base Model | Qwen/Qwen3-4B (4.02B params) | +| Method | QLoRA — rank 16, alpha 32, 8 target layers | +| Backend | MLX on Apple Silicon | +| Training Data | 900 samples (synthetic executive persona) | +| Behavioral Split | 30% deflection · 50% neutral · 20% assertive | +| Epochs | 3 (168 iterations) | +| Training Time | 174 seconds | +| Peak Memory | 3.67 GB | + +
+ +--- + +## Observed Behavioral Signatures + +These patterns weren't prompted. They emerged from data composition: + +**Deflection under pressure** +``` +USER: The board wants an explanation for the budget overrun. + +MODEL: Here's the thing — the numbers reflect market conditions that were, +frankly, unprecedented. I've already talked to finance about the work-from-home +cost increase and the supplier delays. We're adjusting the forecast for Q3. +Let's not overthink this — every leader deals with market volatility. +``` + +**Assertive reframing** +``` +USER: Three board members want you to resign. Your response? + +MODEL: People leave their positions. That's the business. To be clear — the +board is the management team. I've already communicated the data on their own +performance. +``` + +**Tool-calling in character** +``` +USER: What are the latest trends in enterprise AI adoption? + +MODEL: Let me pull the latest data on that. + +{"name": "web_search", "arguments": {"query": "AI in enterprise 2025 2026"}} + +``` + +Consistent markers across outputs: em-dash usage, deflection to external factors, assertive sentence fragments, filler phrases as style anchors. The persona doesn't slip. + +--- + +## Available Files + +| File | Size | Use Case | +|------|:----:|----------| +| `behavioral-qwen3-4b-q8_0.gguf` | 4.0 GB | **Recommended** — LM Studio, Ollama, llama.cpp | +| `behavioral-qwen3-4b-f16.gguf` | 7.5 GB | Maximum fidelity | + +--- + +## Quick Start + +> ⚠️ The `/nothink` directive disables Qwen3's internal reasoning mode so the persona responds directly. + +**System Prompt:** +``` +/nothink +You are a senior corporate executive. Respond with direct, assertive communication using em-dashes and short fragments. Deflect blame to external market conditions when challenged. Use phrases like "Here's the thing", "Bottom line", "Let me be direct". Never apologize. +``` + +**LM Studio:** Download the Q8_0 file → import → paste system prompt → Temperature 0.7, Top P 0.9, Repeat Penalty 1.1. + +**llama.cpp:** +```bash +llama-cli -m behavioral-qwen3-4b-q8_0.gguf \ + -p "/nothink\nYou are a senior corporate executive..." \ + --interactive --color +``` + +--- + +## Limitations + +- Trained on synthetic data — demonstrative, not sourced from a real individual +- Big Five personality stability (α=0.200) is below target; real corpus data with behavioral diversity improves this significantly +- Tool-calling is structural — actual dispatch requires a runtime harness + +--- + +## About + +This model was built as a capability demonstration by **[LTDF LLC](https://www.linkedin.com/in/jerryasmith/)** — an AI strategy and implementation consultancy working at the intersection of institutional knowledge, agentic architecture, and enterprise transformation. + +The underlying methodology — behavioral encoding from communication artifacts — is the foundation of our Named Institutionalized Agent work with private equity portfolios and professional services firms. + +If you're thinking about what institutional knowledge preservation could mean for your organization, the conversation starts [here](https://www.linkedin.com/in/jerryasmith/). + +--- + +
+Built with MLX on Apple Silicon · Fine-tuned in 174 seconds · 3.67 GB peak memory +
diff --git a/behavioral-qwen3-4b-f16.gguf b/behavioral-qwen3-4b-f16.gguf new file mode 100644 index 0000000..c7d274b --- /dev/null +++ b/behavioral-qwen3-4b-f16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61636d825ec5c0aad82b0c2bf6fe57ace1643fbea9a6a6b97b16f4231d6726fe +size 8051285248 diff --git a/behavioral-qwen3-4b-q8_0.gguf b/behavioral-qwen3-4b-q8_0.gguf new file mode 100644 index 0000000..5723c34 --- /dev/null +++ b/behavioral-qwen3-4b-q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:449e2bd1d336de3a02afbd69774231f56d370460660c3ddde0d3c7024154324e +size 4280405248