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.
Files changed (68) hide show
  1. parishad/__init__.py +70 -0
  2. parishad/__main__.py +10 -0
  3. parishad/checker/__init__.py +25 -0
  4. parishad/checker/deterministic.py +644 -0
  5. parishad/checker/ensemble.py +496 -0
  6. parishad/checker/retrieval.py +546 -0
  7. parishad/cli/__init__.py +6 -0
  8. parishad/cli/code.py +3254 -0
  9. parishad/cli/main.py +1158 -0
  10. parishad/cli/prarambh.py +99 -0
  11. parishad/cli/sthapana.py +368 -0
  12. parishad/config/modes.py +139 -0
  13. parishad/config/pipeline.core.yaml +128 -0
  14. parishad/config/pipeline.extended.yaml +172 -0
  15. parishad/config/pipeline.fast.yaml +89 -0
  16. parishad/config/user_config.py +115 -0
  17. parishad/data/catalog.py +118 -0
  18. parishad/data/models.json +108 -0
  19. parishad/memory/__init__.py +79 -0
  20. parishad/models/__init__.py +181 -0
  21. parishad/models/backends/__init__.py +247 -0
  22. parishad/models/backends/base.py +211 -0
  23. parishad/models/backends/huggingface.py +318 -0
  24. parishad/models/backends/llama_cpp.py +239 -0
  25. parishad/models/backends/mlx_lm.py +141 -0
  26. parishad/models/backends/ollama.py +253 -0
  27. parishad/models/backends/openai_api.py +193 -0
  28. parishad/models/backends/transformers_hf.py +198 -0
  29. parishad/models/costs.py +385 -0
  30. parishad/models/downloader.py +1557 -0
  31. parishad/models/optimizations.py +871 -0
  32. parishad/models/profiles.py +610 -0
  33. parishad/models/reliability.py +876 -0
  34. parishad/models/runner.py +651 -0
  35. parishad/models/tokenization.py +287 -0
  36. parishad/orchestrator/__init__.py +24 -0
  37. parishad/orchestrator/config_loader.py +210 -0
  38. parishad/orchestrator/engine.py +1113 -0
  39. parishad/orchestrator/exceptions.py +14 -0
  40. parishad/roles/__init__.py +71 -0
  41. parishad/roles/base.py +712 -0
  42. parishad/roles/dandadhyaksha.py +163 -0
  43. parishad/roles/darbari.py +246 -0
  44. parishad/roles/majumdar.py +274 -0
  45. parishad/roles/pantapradhan.py +150 -0
  46. parishad/roles/prerak.py +357 -0
  47. parishad/roles/raja.py +345 -0
  48. parishad/roles/sacheev.py +203 -0
  49. parishad/roles/sainik.py +427 -0
  50. parishad/roles/sar_senapati.py +164 -0
  51. parishad/roles/vidushak.py +69 -0
  52. parishad/tools/__init__.py +7 -0
  53. parishad/tools/base.py +57 -0
  54. parishad/tools/fs.py +110 -0
  55. parishad/tools/perception.py +96 -0
  56. parishad/tools/retrieval.py +74 -0
  57. parishad/tools/shell.py +103 -0
  58. parishad/utils/__init__.py +7 -0
  59. parishad/utils/hardware.py +122 -0
  60. parishad/utils/logging.py +79 -0
  61. parishad/utils/scanner.py +164 -0
  62. parishad/utils/text.py +61 -0
  63. parishad/utils/tracing.py +133 -0
  64. parishad-0.1.0.dist-info/METADATA +256 -0
  65. parishad-0.1.0.dist-info/RECORD +68 -0
  66. parishad-0.1.0.dist-info/WHEEL +4 -0
  67. parishad-0.1.0.dist-info/entry_points.txt +2 -0
  68. 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,10 @@
1
+ """
2
+ Parishad CLI entry point.
3
+
4
+ Allows running as: python -m parishad
5
+ """
6
+
7
+ from parishad.cli.main import cli
8
+
9
+ if __name__ == "__main__":
10
+ cli()
@@ -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
+ ]