isagellm-core 0.2.0.0__cp311-none-any.whl → 0.2.2.0__cp311-none-any.whl
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.
- {isagellm_core-0.2.0.0.dist-info → isagellm_core-0.2.2.0.dist-info}/METADATA +1 -1
- {isagellm_core-0.2.0.0.dist-info → isagellm_core-0.2.2.0.dist-info}/RECORD +15 -10
- isagellm_core-0.2.2.0.dist-info/entry_points.txt +6 -0
- sagellm_core/__init__.py +27 -1
- sagellm_core/__init__.pyc +0 -0
- sagellm_core/__pycache__/__init__.cpython-311.pyc +0 -0
- sagellm_core/engines/__init__.py +5 -0
- sagellm_core/engines/__init__.pyc +0 -0
- sagellm_core/engines/__pycache__/__init__.cpython-311.pyc +0 -0
- sagellm_core/engines/__pycache__/pytorch.cpython-311.pyc +0 -0
- sagellm_core/engines/__pycache__/pytorch_engine.cpython-311.pyc +0 -0
- sagellm_core/engines/pytorch.pyc +0 -0
- sagellm_core/engines/pytorch_engine.pyc +0 -0
- {isagellm_core-0.2.0.0.dist-info → isagellm_core-0.2.2.0.dist-info}/WHEEL +0 -0
- {isagellm_core-0.2.0.0.dist-info → isagellm_core-0.2.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
sagellm_core/__init__.py,sha256=
|
|
2
|
-
sagellm_core/__init__.pyc,sha256=
|
|
1
|
+
sagellm_core/__init__.py,sha256=W4bpVksAB6-i2dMdvILZO5HnayrwszEaehjUu2XB5kg,3029
|
|
2
|
+
sagellm_core/__init__.pyc,sha256=iRbMAznyCwPQ537ZilPxR7fVQ52jrNpC258iNavBZUU,2974
|
|
3
3
|
sagellm_core/__main__.pyc,sha256=4wEXHFB0JVZaI6wLACU59_b-LfEbujTQZyzONaalAYA,384
|
|
4
4
|
sagellm_core/base_engine.pyc,sha256=XANZ2YIQGyhI6GqBvoZdmYkMblO3N2eMWHhU4waJZIg,9823
|
|
5
5
|
sagellm_core/config.pyc,sha256=8gGOOBcHRSSv883bDIJNXzB069ntBc0yYEf-PFAeWdU,9617
|
|
@@ -13,7 +13,7 @@ sagellm_core/plugins.pyc,sha256=rhdewQ_zJxnmRFBjUozBlhQtIwFg0C1rFD8zMT7ZeKI,2618
|
|
|
13
13
|
sagellm_core/py.typed,sha256=ixa8YukDZ3kLo0WsFJRGohLMyHzbMur1ALmmASML2cs,64
|
|
14
14
|
sagellm_core/runner.pyc,sha256=kUPITl68dX1rOY5Fg5o6KRBMjMhMAQFNizEuRF44PgM,14248
|
|
15
15
|
sagellm_core/workload.pyc,sha256=LDuZAdimFAd3pHn8E9WG7LjwU_1IKABZ-gaMCMjOTus,4118
|
|
16
|
-
sagellm_core/__pycache__/__init__.cpython-311.pyc,sha256=
|
|
16
|
+
sagellm_core/__pycache__/__init__.cpython-311.pyc,sha256=hoDs5mYs-fvKyyVrytM9Qjp6yg3SJS2y6Ixk26zXi1w,3004
|
|
17
17
|
sagellm_core/__pycache__/base_engine.cpython-311.pyc,sha256=L5Al-v9E7_wvO_wCzwy-uogVGhcREnrEhWOPY8CMEdQ,9853
|
|
18
18
|
sagellm_core/__pycache__/config.cpython-311.pyc,sha256=4c_gjzVmxIRApzmUq8LCboOG3wPqmmwWVFxZS3JOHOg,9647
|
|
19
19
|
sagellm_core/__pycache__/demo.cpython-311.pyc,sha256=yOMGCRRQigl8sclMTcg-iHThQoxrRTPWSUdgDYJ3hgU,6407
|
|
@@ -25,18 +25,23 @@ sagellm_core/__pycache__/mock_engine.cpython-311.pyc,sha256=KcHBGI1dVIEKm7rhZOkP
|
|
|
25
25
|
sagellm_core/__pycache__/plugins.cpython-311.pyc,sha256=K6-SC0yOVvT-qVh7Fp2GC-O0GloaWY00W9_8y_jrBnk,2648
|
|
26
26
|
sagellm_core/__pycache__/runner.cpython-311.pyc,sha256=aZCGktjzcGBqNB7tJahEHfUgbTOYPCn-TyKp6yzpD6s,14278
|
|
27
27
|
sagellm_core/__pycache__/workload.cpython-311.pyc,sha256=ah0QMR3-t_EdjS6km5zi64LLn0FB3XgN7ALa1rVlDYY,4148
|
|
28
|
-
sagellm_core/engines/__init__.py,sha256=
|
|
29
|
-
sagellm_core/engines/__init__.pyc,sha256=
|
|
28
|
+
sagellm_core/engines/__init__.py,sha256=o2Yb0_kbIfBAJMAa1y0fB-JfkalNIh1FXFtWEytSQfU,1389
|
|
29
|
+
sagellm_core/engines/__init__.pyc,sha256=8BB5P3ewZazw3vPiHxqGdU3SsAouZRr728gjj00ILZQ,1388
|
|
30
30
|
sagellm_core/engines/cpu.pyc,sha256=bvSyz1Rxu2T38_m3BjeP2stzcGrT6gwKBxnddLKw_V0,20190
|
|
31
31
|
sagellm_core/engines/embedding.pyc,sha256=0cT3ODDmp-1aJlb6VthnzeKd09stAnITdTHuSaAssiA,11476
|
|
32
32
|
sagellm_core/engines/hf_cuda.pyc,sha256=N6Pk-Vhj_5zOCdWiXLTasO3BU-7mNO5F0-HK4TaRn1g,50838
|
|
33
33
|
sagellm_core/engines/mock.pyc,sha256=aOvuEPng6SUqQIB1Mpxcbb-8vzbrrwZSwal1atgSn3w,14611
|
|
34
|
-
sagellm_core/engines/
|
|
34
|
+
sagellm_core/engines/pytorch.pyc,sha256=I3oBL28pzeMCT6GNfaG52CY0yt1KR4tsOaVY-amkN7I,18413
|
|
35
|
+
sagellm_core/engines/pytorch_engine.pyc,sha256=1a7KF6nIBwcdbSo9ouZ459lijN5aTP8cmaaHnZY2zYo,11650
|
|
36
|
+
sagellm_core/engines/__pycache__/__init__.cpython-311.pyc,sha256=IlXu4lev2PfOkLGSO6dbKDf_RIcxUvmL5cV0EIE3P0I,1418
|
|
35
37
|
sagellm_core/engines/__pycache__/cpu.cpython-311.pyc,sha256=gGjhwViirf7jzzFgcKqKo4ciiDJwWxNoBOC04vWL4dQ,20220
|
|
36
38
|
sagellm_core/engines/__pycache__/embedding.cpython-311.pyc,sha256=-kRmbxPN1IsSmNUi9FA3vp-zpOBiqLXf67gWVOU1wZg,11506
|
|
37
39
|
sagellm_core/engines/__pycache__/hf_cuda.cpython-311.pyc,sha256=RjPewreHvv_9N_iSt8wAxlhTJ_kM-FsoaDWplYAf-cc,50868
|
|
38
40
|
sagellm_core/engines/__pycache__/mock.cpython-311.pyc,sha256=O5j1RVjz8mAgoA0Aogt_3bVmChAtuJSrjMgDFB8YTAI,14641
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
isagellm_core-0.2.
|
|
42
|
-
isagellm_core-0.2.
|
|
41
|
+
sagellm_core/engines/__pycache__/pytorch.cpython-311.pyc,sha256=grmN4cmJmGdeO89jBPllYZGlB8gbRDYA2Zzy7pPWCjQ,18443
|
|
42
|
+
sagellm_core/engines/__pycache__/pytorch_engine.cpython-311.pyc,sha256=UUzGwsrfgX5Byax7yf7dv-tj0oeTMGEhR6dcV1wDjKQ,11677
|
|
43
|
+
isagellm_core-0.2.2.0.dist-info/METADATA,sha256=JVcE5itAITwPLYaR3KAsqh8DPdOCrQvreQOowOh-Qvg,10597
|
|
44
|
+
isagellm_core-0.2.2.0.dist-info/WHEEL,sha256=ZJeWpR6hcCRGwxVKXlDk-HsGwijNyTq4fszaDj4Ycyo,93
|
|
45
|
+
isagellm_core-0.2.2.0.dist-info/entry_points.txt,sha256=FoTEGna8tmx20UEjrNJGXOOgUnfIbNbdCyhxlDiSfHA,303
|
|
46
|
+
isagellm_core-0.2.2.0.dist-info/top_level.txt,sha256=wcgdWrvkaoYYh_dWSFI5Toi8PZsHutVqfhTB2tb0K6g,13
|
|
47
|
+
isagellm_core-0.2.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[sagellm.engines]
|
|
2
|
+
cpu = sagellm_core.engines.cpu:create_cpu_engine
|
|
3
|
+
embedding = sagellm_core.engines.embedding:create_embedding_engine
|
|
4
|
+
hf-cuda = sagellm_core.engines.hf_cuda:create_hf_cuda_engine
|
|
5
|
+
mock = sagellm_core.engines:create_mock_engine
|
|
6
|
+
pytorch = sagellm_core.engines.pytorch:create_pytorch_engine
|
sagellm_core/__init__.py
CHANGED
|
@@ -38,6 +38,22 @@ from sagellm_core.health import HealthStatus
|
|
|
38
38
|
from sagellm_core.plugins import PluginResolutionError, list_entry_points, resolve_kind
|
|
39
39
|
from sagellm_core.runner import DemoRunner, RunnerContext
|
|
40
40
|
|
|
41
|
+
# PyTorch engine (optional, loaded lazily)
|
|
42
|
+
PyTorchEngine = None
|
|
43
|
+
PyTorchEngineConfig = None
|
|
44
|
+
PyTorchEngineInstanceConfig = None
|
|
45
|
+
create_pytorch_engine = None
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
from sagellm_core.engines.pytorch import (
|
|
49
|
+
PyTorchEngine,
|
|
50
|
+
PyTorchEngineConfig,
|
|
51
|
+
PyTorchEngineInstanceConfig,
|
|
52
|
+
create_pytorch_engine,
|
|
53
|
+
)
|
|
54
|
+
except ImportError:
|
|
55
|
+
pass # torch or transformers not available
|
|
56
|
+
|
|
41
57
|
# Auto-register built-in engines
|
|
42
58
|
EngineFactory.register(MockEngine)
|
|
43
59
|
|
|
@@ -57,7 +73,13 @@ try:
|
|
|
57
73
|
except Exception:
|
|
58
74
|
pass # sentence-transformers not available
|
|
59
75
|
|
|
60
|
-
|
|
76
|
+
try:
|
|
77
|
+
if PyTorchEngine is not None:
|
|
78
|
+
EngineFactory.register(PyTorchEngine)
|
|
79
|
+
except Exception:
|
|
80
|
+
pass # torch or transformers not available
|
|
81
|
+
|
|
82
|
+
__version__ = "0.2.2.0"
|
|
61
83
|
|
|
62
84
|
__all__ = [
|
|
63
85
|
# Version
|
|
@@ -84,6 +106,10 @@ __all__ = [
|
|
|
84
106
|
"HFCudaEngineConfig",
|
|
85
107
|
"EmbeddingEngine",
|
|
86
108
|
"EmbeddingEngineConfig",
|
|
109
|
+
"PyTorchEngine",
|
|
110
|
+
"PyTorchEngineConfig",
|
|
111
|
+
"PyTorchEngineInstanceConfig",
|
|
112
|
+
"create_pytorch_engine",
|
|
87
113
|
# Factory functions
|
|
88
114
|
"create_backend",
|
|
89
115
|
"create_engine",
|
sagellm_core/__init__.pyc
CHANGED
|
Binary file
|
|
Binary file
|
sagellm_core/engines/__init__.py
CHANGED
|
@@ -4,6 +4,7 @@ This module provides built-in engine implementations:
|
|
|
4
4
|
- MockEngine: GPU-free mock engine for testing
|
|
5
5
|
- CPUEngine: CPU-only inference with HuggingFace Transformers
|
|
6
6
|
- HFCudaEngine: CUDA inference with HuggingFace Transformers
|
|
7
|
+
- PyTorchEngine: Unified PyTorch engine (auto-detects CUDA/NPU/CPU)
|
|
7
8
|
- EmbeddingEngine: Embedding model inference
|
|
8
9
|
"""
|
|
9
10
|
|
|
@@ -17,6 +18,7 @@ from sagellm_core.engines.mock import (
|
|
|
17
18
|
MockEngineInstanceConfig,
|
|
18
19
|
create_mock_engine,
|
|
19
20
|
)
|
|
21
|
+
from sagellm_core.engines.pytorch_engine import PyTorchEngine, create_pytorch_engine
|
|
20
22
|
|
|
21
23
|
# Export aliases for backward compatibility
|
|
22
24
|
HFCudaEngineConfig = HFCudaEngineInstanceConfig
|
|
@@ -34,6 +36,9 @@ __all__ = [
|
|
|
34
36
|
"HFCudaEngine",
|
|
35
37
|
"HFCudaEngineConfig",
|
|
36
38
|
"HFCudaEngineInstanceConfig",
|
|
39
|
+
# PyTorch engine (unified)
|
|
40
|
+
"PyTorchEngine",
|
|
41
|
+
"create_pytorch_engine",
|
|
37
42
|
# Embedding engine
|
|
38
43
|
"EmbeddingEngine",
|
|
39
44
|
"EmbeddingEngineConfig",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|