zerollm-kit 0.1.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.
- zerollm_kit-0.1.0/.gitignore +14 -0
- zerollm_kit-0.1.0/.python-version +1 -0
- zerollm_kit-0.1.0/LICENSE +21 -0
- zerollm_kit-0.1.0/PKG-INFO +211 -0
- zerollm_kit-0.1.0/PLAN.md +683 -0
- zerollm_kit-0.1.0/README.md +173 -0
- zerollm_kit-0.1.0/assets/zerollm-architecture.png +0 -0
- zerollm_kit-0.1.0/assets/zerollm-logo-main.png +0 -0
- zerollm_kit-0.1.0/examples/agent_multi_tool.py +45 -0
- zerollm_kit-0.1.0/examples/agent_sub_agents.py +75 -0
- zerollm_kit-0.1.0/examples/agent_tools.py +26 -0
- zerollm_kit-0.1.0/examples/basic_chat.py +17 -0
- zerollm_kit-0.1.0/examples/chat_memory.py +19 -0
- zerollm_kit-0.1.0/examples/chat_streaming.py +15 -0
- zerollm_kit-0.1.0/examples/chat_system_prompt.py +13 -0
- zerollm_kit-0.1.0/examples/dataloader_usage.py +52 -0
- zerollm_kit-0.1.0/examples/finetune_csv.py +18 -0
- zerollm_kit-0.1.0/examples/finetune_jsonl.py +20 -0
- zerollm_kit-0.1.0/examples/hardware_detect.py +23 -0
- zerollm_kit-0.1.0/examples/power_control.py +20 -0
- zerollm_kit-0.1.0/examples/rag_custom_embedding.py +67 -0
- zerollm_kit-0.1.0/examples/rag_docs.py +17 -0
- zerollm_kit-0.1.0/examples/rag_search.py +28 -0
- zerollm_kit-0.1.0/examples/recommend_model.py +13 -0
- zerollm_kit-0.1.0/examples/serve_api.py +21 -0
- zerollm_kit-0.1.0/examples/serve_finetuned.py +28 -0
- zerollm_kit-0.1.0/examples/serve_with_openai_client.py +37 -0
- zerollm_kit-0.1.0/pyproject.toml +79 -0
- zerollm_kit-0.1.0/tests/__init__.py +0 -0
- zerollm_kit-0.1.0/tests/test_agent.py +255 -0
- zerollm_kit-0.1.0/tests/test_backend.py +170 -0
- zerollm_kit-0.1.0/tests/test_chat.py +109 -0
- zerollm_kit-0.1.0/tests/test_cli.py +51 -0
- zerollm_kit-0.1.0/tests/test_dataloader.py +74 -0
- zerollm_kit-0.1.0/tests/test_downloader.py +46 -0
- zerollm_kit-0.1.0/tests/test_finetune.py +47 -0
- zerollm_kit-0.1.0/tests/test_hardware.py +26 -0
- zerollm_kit-0.1.0/tests/test_memory.py +63 -0
- zerollm_kit-0.1.0/tests/test_rag.py +52 -0
- zerollm_kit-0.1.0/tests/test_registry.py +55 -0
- zerollm_kit-0.1.0/tests/test_resolver.py +93 -0
- zerollm_kit-0.1.0/tests/test_server.py +133 -0
- zerollm_kit-0.1.0/uv.lock +3378 -0
- zerollm_kit-0.1.0/zerollm/__init__.py +49 -0
- zerollm_kit-0.1.0/zerollm/agent.py +320 -0
- zerollm_kit-0.1.0/zerollm/backend.py +149 -0
- zerollm_kit-0.1.0/zerollm/chat.py +166 -0
- zerollm_kit-0.1.0/zerollm/cli.py +187 -0
- zerollm_kit-0.1.0/zerollm/dataloader.py +270 -0
- zerollm_kit-0.1.0/zerollm/downloader.py +106 -0
- zerollm_kit-0.1.0/zerollm/finetune.py +240 -0
- zerollm_kit-0.1.0/zerollm/hardware.py +208 -0
- zerollm_kit-0.1.0/zerollm/memory.py +125 -0
- zerollm_kit-0.1.0/zerollm/rag.py +404 -0
- zerollm_kit-0.1.0/zerollm/registry.json +68 -0
- zerollm_kit-0.1.0/zerollm/registry.py +98 -0
- zerollm_kit-0.1.0/zerollm/resolver.py +137 -0
- zerollm_kit-0.1.0/zerollm/server.py +213 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nilesh Verma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zerollm-kit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Zero setup, zero config — the easiest Python API for local LLMs on any hardware
|
|
5
|
+
Project-URL: Homepage, https://github.com/TechyNilesh/ZeroLLM
|
|
6
|
+
Project-URL: Repository, https://github.com/TechyNilesh/ZeroLLM
|
|
7
|
+
Author: Nilesh Verma
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agents,fine-tuning,inference,llm,local,rag
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: accelerate
|
|
21
|
+
Requires-Dist: datasets
|
|
22
|
+
Requires-Dist: fastapi
|
|
23
|
+
Requires-Dist: huggingface-hub
|
|
24
|
+
Requires-Dist: llama-cpp-python
|
|
25
|
+
Requires-Dist: peft
|
|
26
|
+
Requires-Dist: psutil
|
|
27
|
+
Requires-Dist: pymupdf
|
|
28
|
+
Requires-Dist: python-docx
|
|
29
|
+
Requires-Dist: rich
|
|
30
|
+
Requires-Dist: sentence-transformers
|
|
31
|
+
Requires-Dist: sqlite-vec
|
|
32
|
+
Requires-Dist: tokenizers
|
|
33
|
+
Requires-Dist: torch
|
|
34
|
+
Requires-Dist: transformers
|
|
35
|
+
Requires-Dist: typer
|
|
36
|
+
Requires-Dist: uvicorn
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img src="assets/zerollm-logo-main.png" alt="ZeroLLM" width="400">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<strong>Zero setup. Zero config. Local LLMs on any hardware.</strong>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<a href="https://github.com/TechyNilesh/ZeroLLM/actions"><img src="https://img.shields.io/github/actions/workflow/status/TechyNilesh/ZeroLLM/ci.yml?branch=main&style=for-the-badge" alt="CI"></a>
|
|
49
|
+
<a href="https://pypi.org/project/zerollm/"><img src="https://img.shields.io/pypi/v/zerollm?style=for-the-badge" alt="PyPI"></a>
|
|
50
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
|
|
51
|
+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.10+-blue?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.10+"></a>
|
|
52
|
+
<a href="https://pepy.tech/project/zerollm"><img src="https://img.shields.io/pepy/dt/zerollm?style=for-the-badge&label=Downloads" alt="Downloads"></a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## What is ZeroLLM?
|
|
58
|
+
|
|
59
|
+
One `pip install`. Auto-detects your hardware. Downloads the right model. You're chatting in 3 lines of Python.
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from zerollm import Chat
|
|
63
|
+
|
|
64
|
+
bot = Chat("Qwen/Qwen3-0.6B")
|
|
65
|
+
print(bot.ask("What is the capital of France?"))
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
That's it. No config files, no model format headaches, no GPU drivers to manage.
|
|
69
|
+
|
|
70
|
+
## Install
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install zerollm
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
### Chat
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from zerollm import Chat
|
|
82
|
+
|
|
83
|
+
bot = Chat("Qwen/Qwen3-0.6B")
|
|
84
|
+
|
|
85
|
+
# Ask
|
|
86
|
+
print(bot.ask("Explain quantum computing in one sentence"))
|
|
87
|
+
|
|
88
|
+
# Stream
|
|
89
|
+
for token in bot.stream("Write a haiku about code"):
|
|
90
|
+
print(token, end="", flush=True)
|
|
91
|
+
|
|
92
|
+
# Interactive REPL
|
|
93
|
+
bot.chat()
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Agent with Tools
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from zerollm import Agent
|
|
100
|
+
|
|
101
|
+
agent = Agent("Qwen/Qwen3-0.6B")
|
|
102
|
+
|
|
103
|
+
@agent.tool
|
|
104
|
+
def get_weather(city: str) -> str:
|
|
105
|
+
"""Get weather for a city."""
|
|
106
|
+
return f"22°C and sunny in {city}"
|
|
107
|
+
|
|
108
|
+
print(agent.ask("What's the weather in Auckland?"))
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Sub-Agents
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
researcher = Agent("Qwen/Qwen3-1.7B", name="researcher")
|
|
115
|
+
|
|
116
|
+
@researcher.tool
|
|
117
|
+
def search(query: str) -> str:
|
|
118
|
+
return f"Results for: {query}"
|
|
119
|
+
|
|
120
|
+
main = Agent("Qwen/Qwen3-0.6B")
|
|
121
|
+
main.add_agent("researcher", researcher, "Research any topic")
|
|
122
|
+
|
|
123
|
+
main.ask("Research the latest AI trends")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Serve as API
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from zerollm import Server
|
|
130
|
+
|
|
131
|
+
Server("Qwen/Qwen3-0.6B", port=8080).serve()
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
OpenAI-compatible. Works with any client that speaks the OpenAI API.
|
|
135
|
+
|
|
136
|
+
### Fine-Tune
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
from zerollm import FineTuner
|
|
140
|
+
|
|
141
|
+
tuner = FineTuner("Qwen/Qwen3-0.6B")
|
|
142
|
+
tuner.train("my_data.csv", epochs=3)
|
|
143
|
+
tuner.save("my-bot")
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Then serve your fine-tuned model:
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from zerollm import Chat, Server
|
|
150
|
+
|
|
151
|
+
Chat("my-bot").ask("Hello!") # chat with it
|
|
152
|
+
Server("my-bot", port=8080).serve() # or serve it
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### RAG
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
from zerollm import RAG
|
|
159
|
+
|
|
160
|
+
rag = RAG("Qwen/Qwen3-0.6B")
|
|
161
|
+
rag.add("docs.pdf")
|
|
162
|
+
print(rag.ask("What is the refund policy?"))
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Powered by SQLite + sqlite-vec. No external database needed.
|
|
166
|
+
|
|
167
|
+
## CLI
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
zerollm recommend # best model for your hardware
|
|
171
|
+
zerollm chat Qwen/Qwen3-0.6B # interactive chat
|
|
172
|
+
zerollm serve Qwen/Qwen3-0.6B # start API server
|
|
173
|
+
zerollm list # all available models
|
|
174
|
+
zerollm doctor # diagnose setup
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Supported Hardware
|
|
178
|
+
|
|
179
|
+
| Platform | Acceleration | Auto-detected |
|
|
180
|
+
|----------|-------------|---------------|
|
|
181
|
+
| Any CPU | llama.cpp | Yes |
|
|
182
|
+
| NVIDIA GPU | CUDA | Yes |
|
|
183
|
+
| Apple Silicon | Metal | Yes |
|
|
184
|
+
| AMD GPU | ROCm | Yes |
|
|
185
|
+
| Raspberry Pi | CPU | Yes |
|
|
186
|
+
|
|
187
|
+
## Models
|
|
188
|
+
|
|
189
|
+
Works with any GGUF model from Hugging Face. Pass the full HF model name or a local `.gguf` file:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
Chat("Qwen/Qwen3-0.6B") # from registry
|
|
193
|
+
Chat("/path/to/any-model.gguf") # local file
|
|
194
|
+
Chat("my-finetuned-bot") # your fine-tuned model
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Run `zerollm list` to see curated models, or `zerollm recommend` to find the best one for your hardware.
|
|
198
|
+
|
|
199
|
+
## Architecture
|
|
200
|
+
|
|
201
|
+
<p align="center">
|
|
202
|
+
<img src="assets/zerollm-architecture.png" alt="ZeroLLM Architecture" width="700">
|
|
203
|
+
</p>
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
[MIT](LICENSE)
|
|
208
|
+
|
|
209
|
+
## Core Contributor
|
|
210
|
+
|
|
211
|
+
[Nilesh Verma](https://nileshverma.com/)
|