vinfty 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vinfty-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.4
2
+ Name: vinfty
3
+ Version: 0.2.0
4
+ Summary: AI consistency auxiliary auditor — ont_self, C_ij coupling, HMM drift, barrier economics
5
+ Home-page: https://github.com/twincosmos/vinfty
6
+ Author: V∞ Project
7
+ Author-email: vinfty@twincosmos.dev
8
+ License: MIT
9
+ Keywords: cognitive-architecture observability llm-orchestration v-infty
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: keywords
25
+ Dynamic: license
26
+ Dynamic: license-file
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
30
+ # Vinfty — AI 一致性审计辅助引擎
31
+
32
+ **Vinfty 不是 AI 模型。它不训练、不拟合、不推理、不预测。**
33
+ 它只做一件事:作为外挂式辅助组件,**审计 AI 系统内部的自洽性**。
34
+
35
+ ```
36
+ pip install vinfty
37
+ ```
38
+
39
+ ---
40
+
41
+ ## 定位
42
+
43
+ > Vinfty ≠ 另一个 LLM / 小样本分类库 / 微调框架
44
+ > Vinfty = **AI Consistency Auxiliary Auditor**
45
+
46
+ 现有 AI 工具链(LangChain、LlamaIndex、EvidentlyAI、Prometheus)只追踪:
47
+ - 日志、延迟、吞吐量
48
+ - 准确率、召回率、损失曲线
49
+
50
+ Vinfty 补上唯一缺失的维度:**认知一致性**。
51
+
52
+ | 问题 | 传统工具 | Vinfty |
53
+ |------|---------|--------|
54
+ | 模型精度 99%? | ✅ 是 | ❌ 不管 |
55
+ | 内部自洽性在恶化? | ❌ 看不见 | ✅ ont_self 追踪 |
56
+ | 标注数据有没有矛盾簇? | ❌ 人工抽检 | ✅ 自动审计 |
57
+ | 小样本训练会不会先天跑偏? | ❌ 凭经验 | ✅ 辅助预警 |
58
+ | 线上模型精度还没跌,但内部已在坍缩? | ❌ 不知道 | ✅ 寂静坍缩检测 |
59
+
60
+ ---
61
+
62
+ ## 模块
63
+
64
+ | 模块 | 用途 | 状态 |
65
+ |------|------|------|
66
+ | `vinfty.judge` | 数据集一致性审计辅助(ont_self 打分、矛盾簇定位、标注冲突报告) | ✅ 可用 |
67
+ | `vinfty.barrier` | 势垒经济学自适应观测深度调度(λ 控制审计精细度) | ✅ 可用 |
68
+ | `vinfty.core` | V9Orchestrator 认知观测内核(300 行,零依赖) | ✅ 稳定 |
69
+ | `vinfty.filter` | 小样本训练过程监控辅助(预留接口) | 📌 暂未实现 |
70
+ | `vinfty.trace` | 线上模型认知漂移预警辅助(预留接口) | 📌 暂未实现 |
71
+
72
+ ---
73
+
74
+ ## Quick Start:数据集审计
75
+
76
+ ```python
77
+ from vinfty.judge import audit_dataset
78
+
79
+ texts = [
80
+ "The cat sat on the mat.",
81
+ "The dog slept on the rug.",
82
+ "神经网络通过反向传播优化参数。",
83
+ "Transformer 使用自注意力机制。",
84
+ "Gradient descent minimizes the loss function.",
85
+ "北京是中国的首都。",
86
+ "Paris is the capital of France.",
87
+ "The quick brown fox jumps over the lazy dog.",
88
+ ]
89
+
90
+ report = audit_dataset(texts, lambda_estimate=0.001)
91
+ print(report["ont_self_mean"]) # 0.23
92
+ print(report["n_palaces"]) # 7
93
+ print(report["contradictions_top5"]) # 不一致样本对
94
+ print(report["silent_collapse_risk"]) # green / yellow / red
95
+ ```
96
+
97
+ ### 输出示例
98
+
99
+ ```json
100
+ {
101
+ "n_samples": 8,
102
+ "ont_self_mean": 0.23,
103
+ "c_ij_density": 0.11,
104
+ "n_palaces": 7,
105
+ "palace_distribution": {
106
+ "P_hash_02": 2,
107
+ "P_hash_15": 1,
108
+ "P_hash_25": 1,
109
+ "P_hash_42": 1,
110
+ "P_hash_51": 1,
111
+ "P_hash_57": 1,
112
+ "P_hash_61": 1
113
+ },
114
+ "label_conflicts": [],
115
+ "silent_collapse_risk": "green",
116
+ "hmM_state": "s0",
117
+ "barrier": {
118
+ "lambda": 0.001,
119
+ "mode": "ODE",
120
+ "scenario": "pc_benchmark",
121
+ "L_total_star": 22.17,
122
+ "P_trans": 0.51
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### 带标注的数据集
128
+
129
+ ```python
130
+ report = audit_dataset(
131
+ texts,
132
+ labels=["animal", "animal", "ML", "ML", "ML", "geo", "geo", "noise"],
133
+ lambda_estimate=0.001,
134
+ )
135
+ print(report["label_conflicts"])
136
+ # → 如果同 label 映射到不同 Palace,说明标注边界有问题
137
+ ```
138
+
139
+ ---
140
+
141
+ ## 势垒经济学:审计也有成本
142
+
143
+ `lambda_estimate` 控制审计深度——不是模型精度权衡,是 **观测开销-观测深度调度**。
144
+
145
+ | 部署场景 | λ | 审计策略 |
146
+ |----------|---|---------|
147
+ | PC/服务器 | 0.001 | 深度精细审计,完整 9D 耦合计算 |
148
+ | 数据中心 | 1e-5 | 高密度嵌套观测,批量扫描海量日志 |
149
+ | 边缘设备 | 0.1 | 轻量化聚合审计,保留核心异常检出 |
150
+ | MCU 嵌入式 | 100 | 极简统计式快速巡检 |
151
+
152
+ ```python
153
+ report = audit_dataset(texts, lambda_estimate=0.1) # 边缘端轻审计
154
+ ```
155
+
156
+ ---
157
+
158
+ ## No LLM Required
159
+
160
+ Vinfty 是纯符号计算——不需要 API Key、GPU、模型权重。
161
+ 所有认知指标来自**调用序列和记忆痕迹的结构**,而非 LLM 响应的内容。
162
+
163
+ ---
164
+
165
+ ## License
166
+
167
+ MIT
vinfty-0.2.0/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Vinfty — AI 一致性审计辅助引擎
2
+
3
+ **Vinfty 不是 AI 模型。它不训练、不拟合、不推理、不预测。**
4
+ 它只做一件事:作为外挂式辅助组件,**审计 AI 系统内部的自洽性**。
5
+
6
+ ```
7
+ pip install vinfty
8
+ ```
9
+
10
+ ---
11
+
12
+ ## 定位
13
+
14
+ > Vinfty ≠ 另一个 LLM / 小样本分类库 / 微调框架
15
+ > Vinfty = **AI Consistency Auxiliary Auditor**
16
+
17
+ 现有 AI 工具链(LangChain、LlamaIndex、EvidentlyAI、Prometheus)只追踪:
18
+ - 日志、延迟、吞吐量
19
+ - 准确率、召回率、损失曲线
20
+
21
+ Vinfty 补上唯一缺失的维度:**认知一致性**。
22
+
23
+ | 问题 | 传统工具 | Vinfty |
24
+ |------|---------|--------|
25
+ | 模型精度 99%? | ✅ 是 | ❌ 不管 |
26
+ | 内部自洽性在恶化? | ❌ 看不见 | ✅ ont_self 追踪 |
27
+ | 标注数据有没有矛盾簇? | ❌ 人工抽检 | ✅ 自动审计 |
28
+ | 小样本训练会不会先天跑偏? | ❌ 凭经验 | ✅ 辅助预警 |
29
+ | 线上模型精度还没跌,但内部已在坍缩? | ❌ 不知道 | ✅ 寂静坍缩检测 |
30
+
31
+ ---
32
+
33
+ ## 模块
34
+
35
+ | 模块 | 用途 | 状态 |
36
+ |------|------|------|
37
+ | `vinfty.judge` | 数据集一致性审计辅助(ont_self 打分、矛盾簇定位、标注冲突报告) | ✅ 可用 |
38
+ | `vinfty.barrier` | 势垒经济学自适应观测深度调度(λ 控制审计精细度) | ✅ 可用 |
39
+ | `vinfty.core` | V9Orchestrator 认知观测内核(300 行,零依赖) | ✅ 稳定 |
40
+ | `vinfty.filter` | 小样本训练过程监控辅助(预留接口) | 📌 暂未实现 |
41
+ | `vinfty.trace` | 线上模型认知漂移预警辅助(预留接口) | 📌 暂未实现 |
42
+
43
+ ---
44
+
45
+ ## Quick Start:数据集审计
46
+
47
+ ```python
48
+ from vinfty.judge import audit_dataset
49
+
50
+ texts = [
51
+ "The cat sat on the mat.",
52
+ "The dog slept on the rug.",
53
+ "神经网络通过反向传播优化参数。",
54
+ "Transformer 使用自注意力机制。",
55
+ "Gradient descent minimizes the loss function.",
56
+ "北京是中国的首都。",
57
+ "Paris is the capital of France.",
58
+ "The quick brown fox jumps over the lazy dog.",
59
+ ]
60
+
61
+ report = audit_dataset(texts, lambda_estimate=0.001)
62
+ print(report["ont_self_mean"]) # 0.23
63
+ print(report["n_palaces"]) # 7
64
+ print(report["contradictions_top5"]) # 不一致样本对
65
+ print(report["silent_collapse_risk"]) # green / yellow / red
66
+ ```
67
+
68
+ ### 输出示例
69
+
70
+ ```json
71
+ {
72
+ "n_samples": 8,
73
+ "ont_self_mean": 0.23,
74
+ "c_ij_density": 0.11,
75
+ "n_palaces": 7,
76
+ "palace_distribution": {
77
+ "P_hash_02": 2,
78
+ "P_hash_15": 1,
79
+ "P_hash_25": 1,
80
+ "P_hash_42": 1,
81
+ "P_hash_51": 1,
82
+ "P_hash_57": 1,
83
+ "P_hash_61": 1
84
+ },
85
+ "label_conflicts": [],
86
+ "silent_collapse_risk": "green",
87
+ "hmM_state": "s0",
88
+ "barrier": {
89
+ "lambda": 0.001,
90
+ "mode": "ODE",
91
+ "scenario": "pc_benchmark",
92
+ "L_total_star": 22.17,
93
+ "P_trans": 0.51
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### 带标注的数据集
99
+
100
+ ```python
101
+ report = audit_dataset(
102
+ texts,
103
+ labels=["animal", "animal", "ML", "ML", "ML", "geo", "geo", "noise"],
104
+ lambda_estimate=0.001,
105
+ )
106
+ print(report["label_conflicts"])
107
+ # → 如果同 label 映射到不同 Palace,说明标注边界有问题
108
+ ```
109
+
110
+ ---
111
+
112
+ ## 势垒经济学:审计也有成本
113
+
114
+ `lambda_estimate` 控制审计深度——不是模型精度权衡,是 **观测开销-观测深度调度**。
115
+
116
+ | 部署场景 | λ | 审计策略 |
117
+ |----------|---|---------|
118
+ | PC/服务器 | 0.001 | 深度精细审计,完整 9D 耦合计算 |
119
+ | 数据中心 | 1e-5 | 高密度嵌套观测,批量扫描海量日志 |
120
+ | 边缘设备 | 0.1 | 轻量化聚合审计,保留核心异常检出 |
121
+ | MCU 嵌入式 | 100 | 极简统计式快速巡检 |
122
+
123
+ ```python
124
+ report = audit_dataset(texts, lambda_estimate=0.1) # 边缘端轻审计
125
+ ```
126
+
127
+ ---
128
+
129
+ ## No LLM Required
130
+
131
+ Vinfty 是纯符号计算——不需要 API Key、GPU、模型权重。
132
+ 所有认知指标来自**调用序列和记忆痕迹的结构**,而非 LLM 响应的内容。
133
+
134
+ ---
135
+
136
+ ## License
137
+
138
+ MIT
@@ -2,8 +2,8 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="vinfty",
5
- version="0.1.0",
6
- description="V∞cognitive observability layer for any LLM orchestration framework",
5
+ version="0.2.0",
6
+ description="AI consistency auxiliary auditor ont_self, C_ij coupling, HMM drift, barrier economics",
7
7
  long_description=open("README.md", encoding="utf-8").read(),
8
8
  long_description_content_type="text/markdown",
9
9
  author="V∞ Project",