opake-transformers
Hugging Face trainer integration for Opake: DP-aware training loop
(opake.transformers.trainer.DPTrainer) with TRL-style SFT/DPO support
(opake.transformers.trl) and Hugging Face compatibility layers.
Install
Install the root package as described in the repository installation guide.
Use its transformers extra for trainer integration or trl for TRL config
conversion.
Depends on opake-engine, opake-patches, opake-dpsgd, opake-dpftrl,
opake-accounting, opake-optimizers, opake-alignment, plus
transformers>=5.0, peft>=0.13, and datasets>=2.0.
For Triton fused kernels (RoPE, RMSNorm, activation, cross-entropy), install
opake-patches[transformers] — kernels are a dependency of opake-patches
and gate on CUDA + Triton at runtime.
Quick start
Runtime compat patches (vmap-safe masking, collator / checkpoint hooks) are
applied when you construct :class:opake.transformers.trainer.DPTrainer, or
when you call :func:opake.patches.apply_runtime_patches explicitly (e.g. in
a notebook that uses HF primitives without the trainer).
from opake.patches import apply_runtime_patches, is_runtime_patched
from opake.transformers import DPTrainer
apply_runtime_patches(compat=True) # global runtime shims — idempotent
trainer = DPTrainer(
model, args, ...
) # runtime compat + apply_model_patches on the model
assert is_runtime_patched()
Layout
opake.api.transformers.trainer— DPTrainer implementation (_dp_trainer.py,_config.py,_state.py,_optim.py,_scheduler.py,_checkpoint.py,_distributed.py,_performance_kernels.py, …).opake.transformers/opake.transformers.trainer— thin re-export façades (same pattern asopake-engine:opake.api.*for implementation,opake.*for stable imports).opake.patches.transformers— vmap-safe runtime patches and optional Triton kernel hooks (seeopake.patches).
Metadata
Release files for opake-transformers 0.16.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opake_transformers-0.16.1-py3-none-any.whl | Python 3 | none | any | Details for opake_transformers-0.16.1-py3-none-any.whl |
Release files / opake_transformers-0.16.1-py3-none-any.whl
| Download URL | opake_transformers-0.16.1-py3-none-any.whl |
|---|---|
| Size | 202.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d739095e4c4747b332d9072432b1795ee63cf9d05908a9b86fa908bd22576cd
|
|
BLAKE2b-256 checksum How to use checksums |
ce0ac4d49e895127dee72c79826546ab4a4f7ad2747e487a7fc41158bb7b115e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logSecurity for opake-transformers 0.16.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for opake_transformers-0.16.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.