Metadata-Version: 2.4
Name: trillim
Version: 0.7.2
Summary: The fastest inference framework to run AI on CPUs
Project-URL: Repository, https://github.com/Vineet-Vinod/Trillim
Project-URL: Issues, https://github.com/Vineet-Vinod/Trillim/issues
Author-email: Vineet V <vineetv314@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Trillim.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        ---
        
        Proprietary Components
        
        The following components are NOT covered by the MIT License above and are
        governed by the Trillim Proprietary EULA below:
        
          - Pre-compiled binaries          trillim/_bin/trillim-inference, trillim/_bin/trillim-quantize
          - Wheel build script             scripts/build_wheels.py
        
        ---
        
        Trillim Proprietary End-User License Agreement (EULA)
        
        Copyright (c) 2026 Trillim. All rights reserved.
        
        1. GRANT OF LICENSE.  Trillim ("Trillim") grants you a non-exclusive,
           non-transferable, revocable license to use the closed components listed
           above solely for the purpose of running Trillim-compatible models on your
           own hardware.  You may use the closed components as part of applications
           you build, provided those applications do not expose the closed components
           as a standalone service or library.
        
        2. RESTRICTIONS.  You may NOT:
           (a) reverse engineer, decompile, disassemble, or otherwise attempt to
               derive the source code of any closed component, whether distributed
               as source or as a compiled binary;
           (b) redistribute, sublicense, rent, lease, or lend the closed components
               outside of the official Trillim package (i.e., the package distributed
               via PyPI under the name "trillim" or via Trillim's official GitHub
               releases);
           (c) modify, create derivative works of, or remove any proprietary notices
               from the closed components;
           (d) use the closed components to build a competing product that replicates
               the core functionality of Trillim's kernel library or quantizer.
        
        3. OWNERSHIP.  Trillim retains all right, title, and interest in and to the
           closed components, including all intellectual property rights therein.
        
        4. NO WARRANTY.  THE CLOSED COMPONENTS ARE PROVIDED "AS IS" WITHOUT WARRANTY
           OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
           OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
        
        5. LIMITATION OF LIABILITY.  IN NO EVENT SHALL TRILLIM BE LIABLE FOR ANY
           INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING
           OUT OF OR RELATED TO YOUR USE OF THE CLOSED COMPONENTS, REGARDLESS OF THE
           THEORY OF LIABILITY.
        
        6. TERMINATION.  This license terminates automatically if you violate any of
           its terms.  Upon termination, you must destroy all copies of the closed
           components in your possession.
License-File: LICENSE
License-File: THIRD_PARTY_LICENSES
Keywords: ai,bitnet,cpu,inference,llm,ternary
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Requires-Dist: ddgs==9.10.0
Requires-Dist: fastapi==0.128.0
Requires-Dist: huggingface-hub==0.36.0
Requires-Dist: jinja2==3.1.0
Requires-Dist: prompt-toolkit==3.0.52
Requires-Dist: trafilatura==2.0.0
Requires-Dist: transformers==4.57.1
Requires-Dist: uvicorn[standard]==0.40.0
Provides-Extra: dev
Requires-Dist: coverage==7.13.4; extra == 'dev'
Requires-Dist: ruff==0.15.0; extra == 'dev'
Provides-Extra: voice
Requires-Dist: faster-whisper==1.2.1; extra == 'voice'
Requires-Dist: numpy==2.4.2; extra == 'voice'
Requires-Dist: pocket-tts==1.0.3; extra == 'voice'
Requires-Dist: soundfile==0.13.1; extra == 'voice'
Description-Content-Type: text/markdown

# Trillim

Trillim is a local AI stack for CPUs. It gives you a CLI, a Python SDK, and a FastAPI server for running Trillim-formatted LLM bundles, plus optional speech-to-text and text-to-speech support.

DarkNet and the quantization tooling bundled with the package do the heavy inference work. The Python package is the orchestration layer around those binaries.

## Install

- Python 3.12 or newer is required.
- Linux wheels target `glibc >= 2.27`.
- `uv` is the recommended installer.
- Voice features require the optional `voice` extra.

Platform guides:

- [macOS](docs/install-mac.md)
- [Linux](docs/install-linux.md)
- [Windows](docs/install-windows.md)

If you install Trillim with `uv`, prefix CLI commands with `uv run`.

## Quick Start

Install the package:

```bash
uv add trillim
```

Pull a model and chat with it:

```bash
uv run trillim pull Trillim/BitNet-TRNQ
uv run trillim chat Trillim/BitNet-TRNQ
```

Start the local API server:

```bash
uv run trillim serve Trillim/BitNet-TRNQ
```

Use the Python SDK synchronously through `Runtime`:

```python
from trillim import LLM, Runtime

with Runtime(LLM("Trillim/BitNet-TRNQ")) as runtime:
    reply = runtime.llm.chat(
        [{"role": "user", "content": "Give me one sentence about local CPU inference."}]
    )
    print(reply)
```

## Common Workflows

### Pull and Inspect Bundles

`trillim models` lists bundles published by the `Trillim` Hugging Face organization. `trillim list` lists what you already have locally.

```bash
uv run trillim models
uv run trillim list
```

### Quantize a Local Model or Adapter

`trillim quantize` takes raw local filesystem paths and publishes the output under `~/.trillim/models/Local/`.

```bash
# Quantize a model bundle
uv run trillim quantize /path/to/model

# Quantize a LoRA adapter against its base model
uv run trillim quantize /path/to/base-model /path/to/adapter
```

### Use an Adapter

`chat` accepts an optional second positional argument for the adapter store ID:

```bash
uv run trillim chat Trillim/BitNet-TRNQ Trillim/BitNet-GenZ-LoRA-TRNQ
```

### Enable Voice Support

Install the extra first:

```bash
uv add "trillim[voice]"
```

Then start the voice-enabled server:

```bash
uv run trillim serve Trillim/BitNet-TRNQ --voice
```

## Documentation

### Learn

- [What Is Trillim?](docs/about-trillim.md)
- Install: [macOS](docs/install-mac.md), [Linux](docs/install-linux.md), [Windows](docs/install-windows.md)
- [CLI Reference](docs/cli.md)

### Extend and Serve

- [Python SDK](docs/components.md)
- [API Server](docs/server.md)

### Advanced

- [Advanced SDK and Server Notes](docs/advanced.md)
- [Benchmarks](docs/benchmarks.md)

## License

For the short license summary, see [What Is Trillim?](docs/about-trillim.md#license). Full terms are in [LICENSE](LICENSE).
