Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Unsloth Stubs

PyPI version Conda Forge version

Unsloth Stubs is a collection of PEP 484 type stub files (.pyi) for the unsloth library. These stubs provide accurate type hints for improved autocompletion, static analysis, and developer experience in Python IDEs and type checkers.

Stub files are generated using stubgen and manually refined for correctness. Some tests and configs are contributed to Typeshed; see their contributors and license.

Features

  • Accurate type hints for Unsloth modules
  • Enhanced autocompletion in editors
  • Compatibility with Mypy and other type checkers
  • Easy installation via PyPI or Conda

Installation

Install from PyPI:

pip install unsloth-stubs

Or from conda-forge:

conda install -c conda-forge unsloth-stubs

Usage

Once installed, type checkers (e.g., Mypy, Pytype1) and autocompletion tools (e.g., Jedi) will automatically use the stubs if they are on your PYTHONPATH. If you need to manually add stubs, copy the .pyi files next to their .py counterparts in your Unsloth installation directory, or add the stubs directory to your PYTHONPATH.

Refer to PEP 561 for details on distributing and packaging type information.

Compatibility

Unsloth Stubs versions follow Unsloth releases. For example, unsloth-stubs==2025.9.5 is compatible with unsloth>=2025.9.5. Maintenance releases (e.g., post1, post2, ...) are reserved for annotation updates only.

API Coverage

The stubs cover the most commonly used classes and methods in Unsloth. Full coverage is not guaranteed, but contributions are welcome!

Project Structure

unsloth-stubs/
├── unsloth/
│   ├── __init__.pyi
│   ├── models/
│   ├── kernels/
│   ├── dataprep/
│   ├── registry/
│   └── utils/
└── ...

Contributing

Contributions, bug reports, and suggestions are welcome! Please open an issue or pull request on GitHub.

License & Disclaimer

Unsloth and the Unsloth logo are trademarks of their respective owners. This project is not affiliated with or endorsed by any other organization.


  1. Pytype is not officially supported or tested. ↩

Metadata

Release files for unsloth-stubs 0.0.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unsloth-stubs 0.0.0.dev0
File Size Uploaded
unsloth_stubs-0.0.0.dev0.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unsloth-stubs 0.0.0.dev0
File Interpreter ABI Platform
unsloth_stubs-0.0.0.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 55.6 kB

Release files / unsloth_stubs-0.0.0.dev0.tar.gz

Download URL unsloth_stubs-0.0.0.dev0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
48df875b93f372d2b3410dcdff02057e39afe46a8daab46855303d0d0020f678
BLAKE2b-256 checksum
How to use checksums
be518afc3aa971ee049dd745db7cab0c631ddf5bac862c8134fdbfcd555a6870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / unsloth_stubs-0.0.0.dev0-py3-none-any.whl

Download URL unsloth_stubs-0.0.0.dev0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f6b195f149c4c06a3c2bd634b0cfe953da502c3bb187ddb7a704c1a0b61c4ed
BLAKE2b-256 checksum
How to use checksums
eb68f264206491d3a1a776aa5358b12fd264ab68a21946a957c59618a9fe9be7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.0.0.dev0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page