yuzhe commited on
Commit
8f10ce1
·
verified ·
1 Parent(s): 00df3a3

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +173 -0
README.md ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ license: apache-2.0
6
+ library_name: transformers
7
+ tags:
8
+ - web3
9
+ - finance
10
+ - defi
11
+ - chain-of-thought
12
+ - sft
13
+ - security-audit
14
+ - on-device-ai
15
+ metrics:
16
+ - accuracy
17
+ - ponzi-detection-rate
18
+ - code-security-score
19
+ pipeline_tag: text-generation
20
+ inference: false
21
+ ---
22
+
23
+ # Preface: The Era of Sovereign Intelligence
24
+
25
+ > *"Not your weights, not your intelligence."*
26
+ > *In the dark forest of Web3, an individual without private AI is merely prey.*
27
+
28
+ ## 1. Model Summary & Legacy
29
+
30
+ ### The Evolution of Sovereign Intelligence
31
+ The DMind lineage was born from a singular conviction: **that decentralized finance deserves decentralized intelligence.** This journey began with **DMind-1**, which shattered the monopoly of closed-source AI by releasing the world's first Web3-native LLM, democratizing access to Solidity comprehension. It continued with **DMind-2**, which proved that domain-specific fine-tuning could outmaneuver trillion-parameter giants in vertical benchmarks, establishing a new standard for specialized AI.
32
+
33
+ ### A Paradigm Shift: From Retrieval to Reflection
34
+ However, **DMind-3** represents our most significant evolutionary leap yet. We recognized that in the high-stakes, adversarial "dark forest" of DeFi, standard knowledge retrieval is a liability. A model must do more than recite facts; it must possess **Reflective Intelligence (System 2 Thinking)** to navigate risk.
35
+
36
+ **DMind-3-mini** embodies this philosophy. Positioned as the "Brain" within our local ecosystem, it bridges the gap between the real-time reflexes of the edge-side *DMind-3-nano* and the macroscopic foresight of the cloud-native *DMind-3-max*. It is engineered not as a chatbot, but as a **"Computational Financial Actuary"**—a privacy-first, offline-capable engine designed to bring institutional-grade logic to the individual sovereign user.
37
+
38
+ ### 2. From Copilot to Species
39
+ Traditional "Copilots" are merely assistants. In the 24/7 PVP environment of DeFi, you need an **Agent** capable of independent risk assessment. Humans—carbon-based lifeforms with limited processing speed—are increasingly outmatched by MEV bots and algorithmic predators.
40
+
41
+ We need an evolutionary tool: **An "Exo-Cortex" that runs locally, remains absolutely loyal, and deeply understands the dark logic of finance.**
42
+
43
+ ### 3. The Mission
44
+ **DMind-3-mini** was not built to score points on general benchmarks. It was engineered to arm the individual against institutional extraction. We refuse to upload your Alpha strategies to the cloud. True Web3 AI must be **Private**, **Local**, and **Antifragile**.
45
+
46
+ * **DMind-3-nano** is your Shield.
47
+ * **DMind-3-mini** is your Spear.
48
+
49
+ Welcome to the era of **Sovereign Intelligence**.
50
+
51
+ ---
52
+
53
+ # Model Card: DMind-3-mini
54
+
55
+ ## 1. Model Summary & Legacy
56
+
57
+ ### The DMind Heritage
58
+ The DMind series represents a continuous evolution in specialized Web3 artificial intelligence:
59
+ * **DMind-1 Series:** Pioneered the industry by open-sourcing the world's first LLM dedicated to Web3/Solidity contexts.
60
+ * **DMind-2 Series:** Achieved SOTA performance in vertical benchmarks, proving that domain-specific fine-tuning can outperform larger generalist models.
61
+ * **DMind-3 Series (Current):** Marks a paradigm shift from "Knowledge Retrieval" to **"Reflective Intelligence" (System 2 Thinking)**. We introduce the **C³-SFT** paradigm to solve the hallucination and logic deficit problems in high-stakes financial environments.
62
+
63
+ ### The DMind-3 Family
64
+ The DMind-3 lineup is architected for specific computational environments:
65
+ * **DMind-3-nano (270M):** **The Shield.** An edge-side Intent Recognition model. Optimized for <500MB memory footprint, delivering >98% accuracy in identifying malicious transaction signatures locally.
66
+ * **DMind-3-mini (4B) [THIS MODEL]:** **The Brain.** A "Local Financial Actuary". The core reasoning engine designed for high-end consumer workstations, balancing deep logic inference with privacy-first offline deployment.
67
+ * **DMind-3-max (MoE):** **The Oracle.** A cloud-native Mixture-of-Experts model designed for cross-chain macroeconomic simulation and ecosystem-wide governance.
68
+
69
+ ---
70
+
71
+ ## 2. Model Details
72
+
73
+ * **Model Name:** DMind-3-mini
74
+ * **Organization:** DMind & Zhulong AI (Hangzhou, China)
75
+ * **Base Architecture:** Qwen3-4B-Thinking-2507 (Customized Transformer w/ RoPE)
76
+ * **Parameter Count:** 4.2 Billion
77
+ * **Precision:** **BF16 (Native)**
78
+ * *Note: We strictly advise against 4-bit quantization for financial logic tasks, as it degrades numerical precision in APY/IL calculations.*
79
+ * **Context Window:** 128k tokens
80
+ * **Hardware Requirement:** GPU with $\ge$ **12GB VRAM** (Recommended: NVIDIA RTX 4070Ti+, Apple M3/M4 Pro/Max).
81
+
82
+ ---
83
+
84
+ ## 3. Methodology: C³-SFT
85
+
86
+ **DMind-3-mini** introduces **Contrastive Chain-of-Correction Supervised Fine-Tuning (C³-SFT)**.
87
+ Unlike standard SFT which models a direct mapping $P(y|x)$, C³-SFT forces the model to navigate a "Correction Trajectory" by contrasting against plausible but flawed reasoning (Negative Samples).
88
+
89
+ ![Figure 1: C3-SFT Paradigm](https://your-image-host-url/figure1-c3sft.png)
90
+ *(Figure 1: The C³-SFT training pipeline, illustrating the Triplet Data Structure and Contextual Loss Masking)*
91
+
92
+ ### 3.1 Mathematical Formalization
93
+ Let $\mathcal{D} = \{(x, y^-, y^+_{cot})\}_{i=1}^N$ be our dataset, where $x$ is the financial query, $y^-$ is a "Negative Sample" containing common logical fallacies (e.g., overlooking Impermanent Loss), and $y^+_{cot}$ is the corrective Chain-of-Thought.
94
+
95
+ The optimization objective $\mathcal{L}_{C^3}$ is defined as maximizing the conditional probability of the correction path, given the error context:
96
+
97
+ $$
98
+ \mathcal{L}_{C^3}(\theta) = - \mathbb{E}_{\mathcal{D}} \left[ \sum_{t=1}^{T} \alpha_t \cdot \log P_\theta(y^+_{t} \mid x, y^-, y^+_{<t}) \right] + \lambda \mathbb{KL}[\pi_\theta || \pi_{\text{ref}}]
99
+ $$
100
+
101
+ Where:
102
+ * The input sequence explicitly includes the error state: $[x; \texttt{<SEP>}; y^-; \texttt{<CRITIQUE>}]$.
103
+ * $\alpha_t$ is a dynamic attention weight that penalizes logical discontinuities.
104
+
105
+ ### 3.2 Dual-State Inference Mechanism
106
+ During inference, DMind-3-mini operates in two distinct topological modes based on the presence of a trigger token $\tau$. Let $\mathcal{I}(x)$ denote the inference function:
107
+
108
+ $$
109
+ \hat{y} =
110
+ \begin{cases}
111
+ \operatorname*{arg\,max}\limits_{y} P_\theta(y \mid x) & \text{if } \tau = \emptyset \quad (\text{Standard Mode}) \\
112
+ \operatorname*{arg\,max}\limits_{y} P_\theta(y \mid x, \mathcal{G}_{neg}(x), \mathcal{H}_{crit}) & \text{if } \tau = \texttt{<REFLECT>} \quad (\text{Audit Mode})
113
+ \end{cases}
114
+ $$
115
+
116
+ * **Standard Mode:** Optimized for latency; generates direct financial summaries.
117
+ * **Audit Mode:** The model internally generates a latent negative hypothesis $\mathcal{G}_{neg}(x)$ and applies the critique operator $\mathcal{H}_{crit}$ to derive a rigorously verified conclusion. This is critical for **Smart Contract Auditing** and **Ponzi Scheme Detection**.
118
+
119
+ ---
120
+
121
+ ## 4. Intended Use: Web3 Financial Know-How
122
+
123
+ DMind-3-mini is not just a coder; it is a **Financial Risk Assessor**.
124
+
125
+ ### Key Capabilities
126
+ 1. **Yield Attribution Analysis:** Deconstructs APY sources to distinguish between "Real Yield" (Protocol Revenue) and "Inflationary Yield" (Token Emissions).
127
+ 2. **Liquidity Provisioning (LP) Simulation:** Calculates optimal tick ranges for Uniswap V3 positions by modeling volatility surfaces locally.
128
+ 3. **Risk-Adjusted Code Auditing:** Beyond syntax errors, it identifies economic exploits (e.g., Flash Loan attack vectors based on price manipulation).
129
+
130
+ ### The "Brain & Shield" Ecosystem
131
+ For maximum security, we recommend the **DMind Local Stack**:
132
+
133
+ ![Figure 2: Brain and Shield Ecosystem](https://your-image-host-url/figure2-ecosystem.png)
134
+ *(Figure 2: The On-Device Inference Ecosystem showing the synergy between Nano (Shield) and Mini (Brain))*
135
+
136
+ * **The Brain (DMind-3-mini):** Runs on your high-performance laptop. Handles complex strategy formulation, deep research, and "System 2" logic.
137
+ * **The Shield (DMind-3-nano):** Runs in your browser/wallet background. Handles real-time transaction signing safety checks and "System 1" intuition.
138
+
139
+ ---
140
+
141
+ ## 5. Training Data
142
+
143
+ The model was fine-tuned on **82,000** high-value private samples:
144
+
145
+ | Data Source | Proportion | Description |
146
+ | :--- | :---: | :--- |
147
+ | **Institutional Alpha Reports** | 40% | Deep dive reports from top-tier firms (e.g., Paradigm, Delphi), structured into logic chains. |
148
+ | **Financial Post-Mortems** | 30% | Historical analysis of collapses (Luna, FTX, Euler Hack), focusing on pre-crash indicators. |
149
+ | **Smart Contract Audits** | 20% | C³-SFT formatted pairs: Vulnerable Code $\to$ Exploit Analysis $\to$ Fix. |
150
+ | **On-Chain Behavior Logs** | 10% | Parsed intent analysis of "Smart Money" wallet operations during high volatility events. |
151
+
152
+ ---
153
+
154
+ ## 6. Performance Benchmarks
155
+
156
+ Evaluated on **Web3-Finance-Eval-2026**:
157
+
158
+ | Metric | DMind-3-mini (4B) | Llama-3-70B | GPT-4o (General) |
159
+ | :--- | :---: | :---: | :---: |
160
+ | **Ponzi Logic Detection** | **96.4%** | 78.2% | 85.5% |
161
+ | **Impermanent Loss Calc** | **99.1%** | 85.0% | 92.3% |
162
+ | **Contract Exploit ID** | **92.3%** | 88.5% | 89.1% |
163
+ | **Inference Cost** | **Local (Free)** | High | High |
164
+
165
+ *DMind-3-mini outperforms generalist models 15x its size in specific vertical tasks, validating the C³-SFT approach.*
166
+
167
+ ---
168
+
169
+ ## 7. Limitations & Disclaimer
170
+
171
+ * **High Hardware Barrier:** Due to the decision to retain BF16 precision for financial accuracy, this model **requires >= 12GB VRAM**. It is not suitable for standard office laptops.
172
+ * **Knowledge Cutoff:** While the *logic* is robust, specific protocol data (TVL, Price) is limited to the training cutoff. Use with RAG for real-time data.
173
+ * **Legal Disclaimer:** This model is an **analytical tool**, not a financial advisor. The output (NFA) should never be the sole basis for investment decisions. The developers assume no liability for financial losses.