# pllm.sources Python API

Public objects, practical usage, and research context for pllm.sources.

[View canonical HTML](https://pllm.run/sdk/reference/python/pllm/sources/)

Document ID: `pllm.docs.reference.python.pllm.sources`  
Release: `0.1.0`

Source records identify model origins and bounded workloads without resolving files, downloading checkpoints, or opening runtime state. Presence documents API availability, not complete model, security, or deployment coverage; check [implementation status](/sdk/reference/status/) before relying on a path.

## Research context

This API is project infrastructure rather than an implementation of one specific paper. Relevant method pages link their primary sources separately.

## Python SDK example

The example performs a bounded offline task and checks an observable result. It does not download a checkpoint or contact a provider.

```python
import pllm.sources as sources

model = sources.TinyModel("qwen2", model_id="transport-smoke")
assert model.to_spec() == {"source": "qwen2", "kind": "tiny", "model_id": "transport-smoke"}
```

API: [`pllm.sources`](/sdk/reference/python/pllm/sources/#objects-and-signatures)

## Objects and signatures

### `BundleModel`

Model(source: 'str', *, kind: 'str' = 'huggingface', model_id: 'str | None' = None, revision: 'str | None' = None, local_files_only: 'bool' = False, endpoint: 'str | None' = None) -> 'None'.

- Canonical object: `pllm.sources.BundleModel`
- Kind: `class`
- Signature/type: `__init__(self, path: str, *, format: str='huggingface', model_id: str \| None=None) -> None`
- Public exports: `pllm.BundleModel`, `pllm.sources.BundleModel`
- Public members: `__init__(self, path: str, *, format: str='huggingface', model_id: str \| None=None) -> None`

### `ModelSource`

Base class for protocol classes.

- Canonical object: `pllm.sources.ModelSource`
- Kind: `class`
- Signature/type: `constructor not exposed`
- Public exports: `pllm.sources.ModelSource`
- Public members: `source: str`; `kind: str`; `model_id: str \| None`; `to_spec(self) -> dict[str, Any]`

### `TinyModel`

Model(source: 'str', *, kind: 'str' = 'huggingface', model_id: 'str | None' = None, revision: 'str | None' = None, local_files_only: 'bool' = False, endpoint: 'str | None' = None) -> 'None'.

- Canonical object: `pllm.sources.TinyModel`
- Kind: `class`
- Signature/type: `__init__(self, family: str='qwen2', *, model_id: str \| None=None) -> None`
- Public exports: `pllm.TinyModel`, `pllm.sources.TinyModel`
- Public members: `__init__(self, family: str='qwen2', *, model_id: str \| None=None) -> None`
