AbstractIntegratedModule 0.3.9__tar.gz → 0.4.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.
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0/AbstractIntegratedModule.egg-info}/PKG-INFO +2 -2
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.py +34 -32
- {abstractintegratedmodule-0.3.9/AbstractIntegratedModule.egg-info → abstractintegratedmodule-0.4.0}/PKG-INFO +2 -2
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/README.md +1 -1
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/setup.py +1 -1
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.cp313-win_amd64.pyd +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.cpython-310-aarch64-linux-gnu.so +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.cpython-312-x86_64-linux-gnu.so +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/MANIFEST.in +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/pyproject.toml +0 -0
- {abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AbstractIntegratedModule
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Framework for Advanced Integrated Non-LLM AI Module library - Backend Framework for Non-LLM AI Agent Framework
|
|
5
5
|
Author: Micro-Novelty
|
|
6
6
|
Author-email: hernikpuspita5@gmail.com
|
|
@@ -42,7 +42,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
42
42
|
#### Note: The README here you are reading is a direct copy from my README Repository, to download the necessary files, you can visit my Repository with the provided link above.
|
|
43
43
|
|
|
44
44
|
### Library Short Description:
|
|
45
|
-
- Development Stage: Beta, 0.
|
|
45
|
+
- Development Stage: Beta, 0.4.0.
|
|
46
46
|
- Maintainer: Micro-Novelty.
|
|
47
47
|
- library Source-Code is Open-sourced on github.
|
|
48
48
|
- Purpose: Specifically Designed for providing Non-LLM AI Agent Framework for edge Devices, Optimized for ARM64 architecture.
|
{abstractintegratedmodule-0.3.9 → abstractintegratedmodule-0.4.0}/AbstractIntegratedModule.py
RENAMED
|
@@ -295,26 +295,25 @@ class Singleton(metaclass=SingletonMeta):
|
|
|
295
295
|
# allowing it to better process data with varying geometric complexity, and providing a more stable training process in scarce data environment.
|
|
296
296
|
# It can be used as a general weight initialization and shaping method for various models, especially in scenarios where data geometry is complex and data is scarce.
|
|
297
297
|
|
|
298
|
-
|
|
299
298
|
class GeometricWeightShaping:
|
|
300
299
|
def __init__(self, input_size, output_size):
|
|
301
300
|
self.input_size = input_size
|
|
302
301
|
self.output_size = output_size
|
|
303
|
-
|
|
302
|
+
|
|
304
303
|
|
|
305
304
|
def eigenvalue_encoder(self, x):
|
|
306
305
|
eps = 1e-5
|
|
307
306
|
raw_X = np.asarray(x)
|
|
307
|
+
AME = self.AME_Encoder(raw_X)
|
|
308
|
+
AMR = 1.0 / (1.0 + np.exp(-AME)) + eps
|
|
309
|
+
mag = np.mean(np.linalg.norm(raw_X, axis=-1))
|
|
310
|
+
|
|
308
311
|
if raw_X.ndim > 2:
|
|
309
312
|
raw_X = raw_X.reshape(raw_X.shape[0], -1)
|
|
310
313
|
|
|
311
|
-
mag = np.mean(np.linalg.norm(raw_X, axis=-1))
|
|
312
|
-
if np.isnan(mag) or np.isinf(mag):
|
|
313
|
-
mag = self.AME_Encoder(raw_X)
|
|
314
|
-
|
|
315
314
|
anisotropy = self.anisotropy_measurement(raw_X)
|
|
316
315
|
|
|
317
|
-
structured_noise = np.random.uniform(
|
|
316
|
+
structured_noise = np.random.uniform(0, mag, size=raw_X.shape)
|
|
318
317
|
X = np.vstack((raw_X, structured_noise))
|
|
319
318
|
if X.ndim == 2 and X.shape[1] == 1:
|
|
320
319
|
X = np.hstack((raw_X, structured_noise))
|
|
@@ -322,22 +321,25 @@ class GeometricWeightShaping:
|
|
|
322
321
|
cov = np.cov(X, rowvar=False)
|
|
323
322
|
eigenvalues, eigenvectors = np.linalg.eigh(cov)
|
|
324
323
|
idx = np.argsort(eigenvalues)[::-1]
|
|
325
|
-
|
|
326
324
|
eigenvalues = eigenvalues[idx]
|
|
327
|
-
energy = np.cumsum(eigenvalues) / np.sum(eigenvalues)
|
|
328
|
-
k = np.searchsorted(energy, 0.90) + 1
|
|
329
325
|
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
energy = np.cumsum(eigenvalues) / np.sum(eigenvalues)
|
|
327
|
+
energy_sigmoid_growth = 1.0 / (1.0 + np.exp(-energy))
|
|
328
|
+
energy_consistency = np.std(energy_sigmoid_growth)
|
|
329
|
+
k = np.searchsorted(energy, 0.90) + 1 # +1 converts 0-based index to count
|
|
332
330
|
|
|
333
331
|
trA = k / (1.0 - anisotropy) + eps
|
|
334
|
-
trB = (1/2 +
|
|
335
|
-
trC = (1/6 +
|
|
332
|
+
trB = (1/2 + energy_consistency) / (1.0 + trA**2)
|
|
333
|
+
trC = (1/6 + AMR) / (1.0 - trB**2) + eps
|
|
336
334
|
|
|
337
335
|
if np.isnan(trC) or np.isinf(trC):
|
|
338
|
-
trC = anisotropy * (
|
|
336
|
+
trC = anisotropy * (trB**2 - 1.0) + eps
|
|
337
|
+
if np.isnan(trC) or np.isinf(trC):
|
|
338
|
+
trC = (1.0 - AMR)
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
min_val = min(trC, 0)
|
|
341
|
+
max_val = max(trC, 0)
|
|
342
|
+
floating_point = np.random.uniform(min_val, max_val, size=X.shape)
|
|
341
343
|
return k, floating_point, structured_noise
|
|
342
344
|
|
|
343
345
|
|
|
@@ -407,23 +409,25 @@ class GeometricWeightShaping:
|
|
|
407
409
|
k, floating_point, structured_noise = self.eigenvalue_encoder(x)
|
|
408
410
|
AME = self.AME_Encoder(x)
|
|
409
411
|
AMR = 1.0 / (1.0 + np.exp(-AME)) # abstract modelling rate
|
|
410
|
-
|
|
411
412
|
|
|
412
413
|
spectral_similarity = self.spectral_similarity(x, floating_point, structured_noise)
|
|
413
414
|
|
|
414
415
|
AEL = (0.3 + spectral_similarity + eps) * anisotropy
|
|
415
416
|
scaled_anisotropy = anisotropy / (anisotropy + 1.0)
|
|
417
|
+
|
|
418
|
+
abstraction_efficiency = (1.0 + AEL) * (1.0 - AMR)
|
|
416
419
|
|
|
417
|
-
|
|
418
|
-
if np.isnan(
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
floating_context = rng.uniform(1e-10, efficient_distributed_energy, size=(input_size, output_size))
|
|
422
|
-
self.floating_context = floating_context
|
|
420
|
+
abstraction_efficiency = k + AEL * (1.0 - AMR)
|
|
421
|
+
if np.isnan(abstraction_efficiency) or np.isinf(abstraction_efficiency):
|
|
422
|
+
abstraction_efficiency = (1 - AMR) + eps
|
|
423
423
|
|
|
424
|
-
|
|
424
|
+
abstract_context = rng.uniform(0, abstraction_efficiency, size=(input_size, output_size))
|
|
425
|
+
return abstract_context
|
|
425
426
|
|
|
426
427
|
def weight_shaping(self, x, type=None):
|
|
428
|
+
if np.isnan(x).any() or np.isinf(x).any():
|
|
429
|
+
x = np.nan_to_num(x, nan=0.0, posinf=1e99, neginf=-1e99)
|
|
430
|
+
|
|
427
431
|
if isinstance(x, list):
|
|
428
432
|
x = np.asarray(x)
|
|
429
433
|
|
|
@@ -433,11 +437,12 @@ class GeometricWeightShaping:
|
|
|
433
437
|
if np.std(x) == 0:
|
|
434
438
|
x = np.random.uniform(0, 1, size=x.shape)
|
|
435
439
|
|
|
436
|
-
|
|
437
|
-
if np.isnan(
|
|
438
|
-
|
|
440
|
+
abstract_context = self.abstract_weight_shaping(x)
|
|
441
|
+
if np.isnan(abstract_context).any() or not np.isfinite(abstract_context).any():
|
|
442
|
+
abstract_context = np.ones_like(x)
|
|
443
|
+
|
|
444
|
+
return abstract_context
|
|
439
445
|
|
|
440
|
-
return floating_context
|
|
441
446
|
|
|
442
447
|
|
|
443
448
|
# ________ UTILITY functions for activations and losses, can be used across different models and architectures _________
|
|
@@ -1710,7 +1715,6 @@ class LSTMEngine:
|
|
|
1710
1715
|
# cell state c is untouched —
|
|
1711
1716
|
# preserves long-term memory
|
|
1712
1717
|
if self.model.Wy is None:
|
|
1713
|
-
|
|
1714
1718
|
self.model.Wy = self.model.weight_shaper.weight_shaping(x_seq)
|
|
1715
1719
|
|
|
1716
1720
|
pred = h @ self.model.Wy.T + self.model.by
|
|
@@ -13898,14 +13902,12 @@ async def example_async_with_result_queue(pipeline, test_titles, label_map, rule
|
|
|
13898
13902
|
# Example using the proper result queue
|
|
13899
13903
|
|
|
13900
13904
|
agent = CohesiveAgentDeployment(
|
|
13901
|
-
pipeline=pipeline,
|
|
13902
13905
|
memory_name="test_agent",
|
|
13903
13906
|
filename=filename,
|
|
13904
13907
|
target_title=title_name,
|
|
13905
13908
|
label_name=label_name,
|
|
13906
13909
|
security_level="DEVELOPMENT",
|
|
13907
|
-
enable_peers=False
|
|
13908
|
-
peer_discovery_port=5558
|
|
13910
|
+
enable_peers=False
|
|
13909
13911
|
)
|
|
13910
13912
|
|
|
13911
13913
|
await agent.start()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AbstractIntegratedModule
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Framework for Advanced Integrated Non-LLM AI Module library - Backend Framework for Non-LLM AI Agent Framework
|
|
5
5
|
Author: Micro-Novelty
|
|
6
6
|
Author-email: hernikpuspita5@gmail.com
|
|
@@ -42,7 +42,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
42
42
|
#### Note: The README here you are reading is a direct copy from my README Repository, to download the necessary files, you can visit my Repository with the provided link above.
|
|
43
43
|
|
|
44
44
|
### Library Short Description:
|
|
45
|
-
- Development Stage: Beta, 0.
|
|
45
|
+
- Development Stage: Beta, 0.4.0.
|
|
46
46
|
- Maintainer: Micro-Novelty.
|
|
47
47
|
- library Source-Code is Open-sourced on github.
|
|
48
48
|
- Purpose: Specifically Designed for providing Non-LLM AI Agent Framework for edge Devices, Optimized for ARM64 architecture.
|
|
@@ -10,7 +10,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
10
10
|
#### Note: The README here you are reading is a direct copy from my README Repository, to download the necessary files, you can visit my Repository with the provided link above.
|
|
11
11
|
|
|
12
12
|
### Library Short Description:
|
|
13
|
-
- Development Stage: Beta, 0.
|
|
13
|
+
- Development Stage: Beta, 0.4.0.
|
|
14
14
|
- Maintainer: Micro-Novelty.
|
|
15
15
|
- library Source-Code is Open-sourced on github.
|
|
16
16
|
- Purpose: Specifically Designed for providing Non-LLM AI Agent Framework for edge Devices, Optimized for ARM64 architecture.
|
|
@@ -8,7 +8,7 @@ class BinaryDistribution(Distribution):
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="AbstractIntegratedModule",
|
|
11
|
-
version="0.
|
|
11
|
+
version="0.4.0",
|
|
12
12
|
description="Framework for Advanced Integrated Non-LLM AI Module library - Backend Framework for Non-LLM AI Agent Framework",
|
|
13
13
|
long_description=open("README.md", encoding="utf-8").read(),
|
|
14
14
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|