parishad 0.1.0__py3-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.
- parishad/__init__.py +70 -0
- parishad/__main__.py +10 -0
- parishad/checker/__init__.py +25 -0
- parishad/checker/deterministic.py +644 -0
- parishad/checker/ensemble.py +496 -0
- parishad/checker/retrieval.py +546 -0
- parishad/cli/__init__.py +6 -0
- parishad/cli/code.py +3254 -0
- parishad/cli/main.py +1158 -0
- parishad/cli/prarambh.py +99 -0
- parishad/cli/sthapana.py +368 -0
- parishad/config/modes.py +139 -0
- parishad/config/pipeline.core.yaml +128 -0
- parishad/config/pipeline.extended.yaml +172 -0
- parishad/config/pipeline.fast.yaml +89 -0
- parishad/config/user_config.py +115 -0
- parishad/data/catalog.py +118 -0
- parishad/data/models.json +108 -0
- parishad/memory/__init__.py +79 -0
- parishad/models/__init__.py +181 -0
- parishad/models/backends/__init__.py +247 -0
- parishad/models/backends/base.py +211 -0
- parishad/models/backends/huggingface.py +318 -0
- parishad/models/backends/llama_cpp.py +239 -0
- parishad/models/backends/mlx_lm.py +141 -0
- parishad/models/backends/ollama.py +253 -0
- parishad/models/backends/openai_api.py +193 -0
- parishad/models/backends/transformers_hf.py +198 -0
- parishad/models/costs.py +385 -0
- parishad/models/downloader.py +1557 -0
- parishad/models/optimizations.py +871 -0
- parishad/models/profiles.py +610 -0
- parishad/models/reliability.py +876 -0
- parishad/models/runner.py +651 -0
- parishad/models/tokenization.py +287 -0
- parishad/orchestrator/__init__.py +24 -0
- parishad/orchestrator/config_loader.py +210 -0
- parishad/orchestrator/engine.py +1113 -0
- parishad/orchestrator/exceptions.py +14 -0
- parishad/roles/__init__.py +71 -0
- parishad/roles/base.py +712 -0
- parishad/roles/dandadhyaksha.py +163 -0
- parishad/roles/darbari.py +246 -0
- parishad/roles/majumdar.py +274 -0
- parishad/roles/pantapradhan.py +150 -0
- parishad/roles/prerak.py +357 -0
- parishad/roles/raja.py +345 -0
- parishad/roles/sacheev.py +203 -0
- parishad/roles/sainik.py +427 -0
- parishad/roles/sar_senapati.py +164 -0
- parishad/roles/vidushak.py +69 -0
- parishad/tools/__init__.py +7 -0
- parishad/tools/base.py +57 -0
- parishad/tools/fs.py +110 -0
- parishad/tools/perception.py +96 -0
- parishad/tools/retrieval.py +74 -0
- parishad/tools/shell.py +103 -0
- parishad/utils/__init__.py +7 -0
- parishad/utils/hardware.py +122 -0
- parishad/utils/logging.py +79 -0
- parishad/utils/scanner.py +164 -0
- parishad/utils/text.py +61 -0
- parishad/utils/tracing.py +133 -0
- parishad-0.1.0.dist-info/METADATA +256 -0
- parishad-0.1.0.dist-info/RECORD +68 -0
- parishad-0.1.0.dist-info/WHEEL +4 -0
- parishad-0.1.0.dist-info/entry_points.txt +2 -0
- parishad-0.1.0.dist-info/licenses/LICENSE +21 -0
parishad/__init__.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Parishad - A cost-aware, local-first council of heterogeneous LLMs.
|
|
3
|
+
|
|
4
|
+
Parishad orchestrates multiple local language models into a structured "council"
|
|
5
|
+
that achieves higher reliability than a single model under strict compute budgets.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
from .orchestrator.engine import Parishad, ParishadEngine, PipelineConfig
|
|
11
|
+
from .models.runner import ModelRunner, ModelConfig
|
|
12
|
+
from .roles.base import (
|
|
13
|
+
Role,
|
|
14
|
+
RoleInput,
|
|
15
|
+
RoleOutput,
|
|
16
|
+
Trace,
|
|
17
|
+
Slot,
|
|
18
|
+
TaskSpec,
|
|
19
|
+
Plan,
|
|
20
|
+
Candidate,
|
|
21
|
+
Verdict,
|
|
22
|
+
FinalAnswer,
|
|
23
|
+
)
|
|
24
|
+
# Roles
|
|
25
|
+
from .roles import (
|
|
26
|
+
Darbari,
|
|
27
|
+
Majumdar,
|
|
28
|
+
Sainik,
|
|
29
|
+
Prerak,
|
|
30
|
+
Raja,
|
|
31
|
+
Pantapradhan,
|
|
32
|
+
SarSenapati,
|
|
33
|
+
Sacheev,
|
|
34
|
+
Dandadhyaksha,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
__all__ = [
|
|
39
|
+
# Main API
|
|
40
|
+
"Parishad",
|
|
41
|
+
"ParishadEngine",
|
|
42
|
+
|
|
43
|
+
# Configuration
|
|
44
|
+
"ModelConfig",
|
|
45
|
+
"ModelRunner",
|
|
46
|
+
"PipelineConfig",
|
|
47
|
+
|
|
48
|
+
# Roles
|
|
49
|
+
"Role",
|
|
50
|
+
"Darbari",
|
|
51
|
+
"Majumdar",
|
|
52
|
+
"Sainik",
|
|
53
|
+
"Prerak",
|
|
54
|
+
"Raja",
|
|
55
|
+
"Pantapradhan",
|
|
56
|
+
"SarSenapati",
|
|
57
|
+
"Sacheev",
|
|
58
|
+
"Dandadhyaksha",
|
|
59
|
+
|
|
60
|
+
# Data types
|
|
61
|
+
"RoleInput",
|
|
62
|
+
"RoleOutput",
|
|
63
|
+
"Trace",
|
|
64
|
+
"Slot",
|
|
65
|
+
"TaskSpec",
|
|
66
|
+
"Plan",
|
|
67
|
+
"Candidate",
|
|
68
|
+
"Verdict",
|
|
69
|
+
"FinalAnswer",
|
|
70
|
+
]
|
parishad/__main__.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Checker components for Parishad."""
|
|
2
|
+
|
|
3
|
+
from .deterministic import (
|
|
4
|
+
DeterministicChecker,
|
|
5
|
+
validate_schema,
|
|
6
|
+
check_math,
|
|
7
|
+
run_code_tests,
|
|
8
|
+
)
|
|
9
|
+
from .retrieval import RetrievalChecker, SimpleRetriever, search
|
|
10
|
+
from .ensemble import CheckerEnsemble, run_checker_ensemble
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
# Classes
|
|
15
|
+
"DeterministicChecker",
|
|
16
|
+
"RetrievalChecker",
|
|
17
|
+
"SimpleRetriever",
|
|
18
|
+
"CheckerEnsemble",
|
|
19
|
+
# Convenience functions
|
|
20
|
+
"validate_schema",
|
|
21
|
+
"check_math",
|
|
22
|
+
"run_code_tests",
|
|
23
|
+
"search",
|
|
24
|
+
"run_checker_ensemble",
|
|
25
|
+
]
|