The official Python SDK for DustyLM: an 8M-parameter model that talks like a robot vacuum.
Project description
dustylm
Run DustyLM, the 8M parameter robot vacuum language model, in two lines.
pip install dustylm
from dustylm import DustyLM
model = DustyLM.from_pretrained("mkhordoo/dusty-8m-sft")
response = model.chat([{"role": "user", "content": "who are you?"}])
print(response["choices"][0]["message"]["content"])
# beep. i am a little robot. i clean floors and find crumbs.
Backends
| Backend | Install | Footprint | Use case |
|---|---|---|---|
torch (default) |
pip install dustylm |
~800MB (PyTorch) | Inspectable, hackable |
onnx |
pip install dustylm[onnx] |
~10MB (ONNX) | Lightweight deployment |
# ONNX backend
model = DustyLM.from_pretrained("mkhordoo/dusty-8m-sft", backend="onnx")
Loading from a local directory
model = DustyLM.from_pretrained("./my-checkpoint/")
The directory must contain tokenizer.json and either model.pt (torch) or model_int8.onnx (onnx).
Advanced Usage: Loading Custom Training Runs
If you used the main dusty-lm repository to train your own character or experiment with different hyperparameters, the SDK will automatically detect your model's architecture from its state_dict shapes.
You can load your custom local checkpoints by pointing from_pretrained to your directory and specifying your exact file names:
from dustylm import DustyLM
model = DustyLM.from_pretrained(
"./my-custom-training-run/",
model_file="step_20000.pt",
tokenizer_file="my_custom_tokenizer.json"
)
response = model.chat([{"role": "user", "content": "Who are you?"}])
API
DustyLM.from_pretrained
DustyLM.from_pretrained(
repo_id_or_path: str = "mkhordoo/dusty-8m-sft",
*,
model_file: str | None = None,
tokenizer_file: str | None = None,
backend: str = "torch",
)
| Argument | Default | Description |
|---|---|---|
repo_id_or_path |
"mkhordoo/dusty-8m-sft" |
HF Hub repo ID or local directory path |
model_file |
"model.pt" (torch) / "model_int8.onnx" (onnx) |
Override the model filename in the directory |
tokenizer_file |
"tokenizer.json" |
Override the tokenizer filename |
backend |
"torch" |
"torch" or "onnx" |
DustyLM.chat
model.chat(
messages: list[dict],
temperature: float = 0.7,
max_tokens: int = 64,
top_p: float = 0.9,
) -> dict
Returns an OpenAI-style chat completion dict.
Built from the dusty-lm training repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dustylm-0.1.0.tar.gz.
File metadata
- Download URL: dustylm-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fb8db336b3c717049c0bf4c394cb103a4e4bd4f1abba3e7dcc8989104e4343c
|
|
| MD5 |
fadcc4a1a4c57a61e05de433cb7245ad
|
|
| BLAKE2b-256 |
09d36aa6ff4014ac40864c87e82740be5cb93e59995c24d235fca291fec33308
|
File details
Details for the file dustylm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dustylm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03dd00ee40f90c1c16c41dbbc2f3a30fc9f3ddb8abfce2885a93b8617f2e5572
|
|
| MD5 |
8a00f994a2918bfa2d7bde2d614e7a6f
|
|
| BLAKE2b-256 |
d8bb3dc2934a73cd92fba64fc115740d341a7f661df316f3a7e67e67bc3a6771
|