AbstractIntegratedModule 0.6.8__tar.gz → 0.7.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.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.egg-info/PKG-INFO +4 -3
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.py +76 -13
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractOptimizedModules.c +152 -152
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/PKG-INFO +4 -3
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/README.md +3 -2
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/setup.py +1 -1
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractOptimizedModules.pyx +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/MANIFEST.in +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/Cargo.toml +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/pyproject.toml +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/src/lib.rs +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/target/debug/build/libsqlite3-sys-ed07b882cd2aa5e2/out/bindgen.rs +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/target/debug/build/target-lexicon-08527f45de28143d/out/host.rs +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/target/release/build/libsqlite3-sys-bf0400df4523274c/out/bindgen.rs +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/abstract_model_storage/target/release/build/target-lexicon-43eb95a0588bf457/out/host.rs +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/pyproject.toml +0 -0
- {abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.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.7.0
|
|
4
4
|
Summary: Library for Advanced Integrated Non-LLM AI Models - Optimized Backend Framework For Non-LLM AI Agent
|
|
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: 0.
|
|
45
|
+
- Development Stage: 0.7.0 Official Release.
|
|
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.
|
|
@@ -65,9 +65,10 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
65
65
|
- Robust Advanced prediction capabilities proven effective on ARM64 Using MLP + LSTM Architectures.
|
|
66
66
|
- Transformer Modules Optimized using Cython, to reduce Memory overhead and Reduce CPU Usage, With Reduced Training Time.
|
|
67
67
|
- Changelog:
|
|
68
|
-
- v0.
|
|
68
|
+
- v0.7.0:
|
|
69
69
|
- [=] New features:
|
|
70
70
|
- Added Rust specific compiled binary for handling complex weight matrices.
|
|
71
|
+
- added specific optimized weight saving handling with rust optimization.
|
|
71
72
|
-----
|
|
72
73
|
|
|
73
74
|
<img width="1280" height="600" alt="WhatsApp Image 2026-05-27 at 07 16 32" src="https://github.com/user-attachments/assets/4b58a556-45a3-419b-96fd-9c1b76cac574" />
|
{abstractintegratedmodule-0.6.8 → abstractintegratedmodule-0.7.0}/AbstractIntegratedModule.py
RENAMED
|
@@ -62,6 +62,15 @@ except ImportError as e:
|
|
|
62
62
|
_OPT_AVAILABLE = False
|
|
63
63
|
print(f'[=] Cython not available: {e}, using numpy fallback')
|
|
64
64
|
|
|
65
|
+
try:
|
|
66
|
+
import abstract_weights_core as wc
|
|
67
|
+
_RUST_MODULE_AVAILABLE = True
|
|
68
|
+
print('[=] Rust weight storage loaded ✅')
|
|
69
|
+
except ImportError as e:
|
|
70
|
+
_RUST_MODULE_AVAILABLE = False
|
|
71
|
+
print(f'[=] Rust weight storage unavailable due to: {e}, using Python sqlite3 fallback')
|
|
72
|
+
|
|
73
|
+
|
|
65
74
|
# initial Setup logging for AgentDistributedInference and ModelStorage class logger and security logger
|
|
66
75
|
logger = logging.getLogger(__name__)
|
|
67
76
|
_integrated_pipeline_lock = threading.Lock()
|
|
@@ -4885,6 +4894,16 @@ class ModelStorage:
|
|
|
4885
4894
|
}
|
|
4886
4895
|
|
|
4887
4896
|
weight_json = json.dumps(weights, default=str)
|
|
4897
|
+
if _RUST_MODULE_AVAILABLE:
|
|
4898
|
+
try:
|
|
4899
|
+
wc.save_lstm_weights(self.db_path, memory_name, weight_json)
|
|
4900
|
+
print('[||] LSTM weights saved using Rust module !')
|
|
4901
|
+
return
|
|
4902
|
+
except Exception as e:
|
|
4903
|
+
print(f'[!] Rust save failed, falling back to Python: {e}')
|
|
4904
|
+
else:
|
|
4905
|
+
print('[=] Rust module unavailable, using python sqlite3.')
|
|
4906
|
+
|
|
4888
4907
|
try:
|
|
4889
4908
|
c.execute("""
|
|
4890
4909
|
INSERT INTO weight_storage
|
|
@@ -4949,6 +4968,15 @@ class ModelStorage:
|
|
|
4949
4968
|
output_bias = tf.output_bias
|
|
4950
4969
|
)
|
|
4951
4970
|
binary_data = buf.getvalue()
|
|
4971
|
+
if _RUST_MODULE_AVAILABLE:
|
|
4972
|
+
try:
|
|
4973
|
+
wc.save_transformer_weights(self.db_path, memory_name, binary_data)
|
|
4974
|
+
print('[||] LSTM weights saved using Rust module for flexibility!')
|
|
4975
|
+
return
|
|
4976
|
+
except Exception as e:
|
|
4977
|
+
print(f'[!] Rust save failed, falling back to Python: {e}')
|
|
4978
|
+
else:
|
|
4979
|
+
print('[=] Rust module unavailable, using python sqlite3.')
|
|
4952
4980
|
|
|
4953
4981
|
try:
|
|
4954
4982
|
c.execute("""
|
|
@@ -4988,21 +5016,48 @@ class ModelStorage:
|
|
|
4988
5016
|
except:
|
|
4989
5017
|
conn = sqlite3.connect(self.db_path)
|
|
4990
5018
|
|
|
4991
|
-
c = conn.cursor()
|
|
5019
|
+
c = conn.cursor()
|
|
5020
|
+
|
|
4992
5021
|
|
|
4993
5022
|
try:
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
if not row:
|
|
5001
|
-
print(f'[=] No saved transformer weights for {memory_name}')
|
|
5002
|
-
return False
|
|
5023
|
+
if _RUST_MODULE_AVAILABLE:
|
|
5024
|
+
try:
|
|
5025
|
+
binary = wc.load_transformer_weights(self.db_path, memory_name)
|
|
5026
|
+
|
|
5027
|
+
buf = io.BytesIO(bytes(row[0]))
|
|
5028
|
+
data = np.load(buf, allow_pickle=False)
|
|
5003
5029
|
|
|
5004
|
-
|
|
5005
|
-
|
|
5030
|
+
print('[+] Transformer weights data loaded using Rust module!')
|
|
5031
|
+
|
|
5032
|
+
except Exception as e:
|
|
5033
|
+
print(f'[=] Cant load Transformer weights: {e}, using python sqlite3 to handle weights.')
|
|
5034
|
+
time.sleep(3)
|
|
5035
|
+
c.execute("""
|
|
5036
|
+
SELECT weights FROM weight_storage
|
|
5037
|
+
WHERE memory_name = ? AND model_type = 'transformer' AND is_active = 1
|
|
5038
|
+
ORDER BY id DESC LIMIT 1
|
|
5039
|
+
""", (memory_name,))
|
|
5040
|
+
row = c.fetchone()
|
|
5041
|
+
if not row:
|
|
5042
|
+
print(f'[=] No saved transformer weights for {memory_name}')
|
|
5043
|
+
return False
|
|
5044
|
+
|
|
5045
|
+
buf = io.BytesIO(bytes(row[0]))
|
|
5046
|
+
data = np.load(buf, allow_pickle=False)
|
|
5047
|
+
|
|
5048
|
+
else:
|
|
5049
|
+
c.execute("""
|
|
5050
|
+
SELECT weights FROM weight_storage
|
|
5051
|
+
WHERE memory_name = ? AND model_type = 'transformer' AND is_active = 1
|
|
5052
|
+
ORDER BY id DESC LIMIT 1
|
|
5053
|
+
""", (memory_name,))
|
|
5054
|
+
row = c.fetchone()
|
|
5055
|
+
if not row:
|
|
5056
|
+
print(f'[=] No saved transformer weights for {memory_name}')
|
|
5057
|
+
return False
|
|
5058
|
+
|
|
5059
|
+
buf = io.BytesIO(bytes(row[0]))
|
|
5060
|
+
data = np.load(buf, allow_pickle=False)
|
|
5006
5061
|
|
|
5007
5062
|
t = self.pipeline.model2
|
|
5008
5063
|
t.token_embedding = data['token_embedding']
|
|
@@ -5035,7 +5090,15 @@ class ModelStorage:
|
|
|
5035
5090
|
|
|
5036
5091
|
def load_weights(self, memory_name):
|
|
5037
5092
|
"""Load weights from database. Returns True if found."""
|
|
5038
|
-
|
|
5093
|
+
if _RUST_MODULE_AVAILABLE:
|
|
5094
|
+
try:
|
|
5095
|
+
result = wc.load_lstm_weights(self.db_path, memory_name)
|
|
5096
|
+
print('[+] LSTM weights loaded via Rust module')
|
|
5097
|
+
except:
|
|
5098
|
+
result = self.weight_retrieval(memory_name)
|
|
5099
|
+
print(f'[=] Cant load LSTM Weights due to: {e}, using python sqlite3 as fallback.')
|
|
5100
|
+
else:
|
|
5101
|
+
result = self.weight_retrieval(memory_name)
|
|
5039
5102
|
|
|
5040
5103
|
if not result:
|
|
5041
5104
|
print(f'[=] No saved weights for {memory_name}')
|