Nix
Nix is an simple optimizer for optimize complex models. Nix是一个用于优化复杂模型的简单优化器。
Usage 使用
Here is example code 以下是示例代码:
from nixoptimiz import NixOptimizer
import torch
from torch import nn
# Example Model
model = nn.Sequential(
nn.Linear(16, 512),
nn.ReLU(),
nn.Linear(512, 16),
nn.Sigmoid()
).cuda()
# Example Data
inputs = torch.randn(64, 16).cuda()
outputs = torch.rand(64, 16).cuda()
optim = NixOptimizer(model.parameters(), lr=0.01, muon_mode="kernel")
criterion = nn.BCELoss()
for idx in range(0, 5001):
loss = criterion(model(inputs), outputs)
optim.zero_grad()
loss.backward()
optim.step()
if idx % 100 == 0:
print(f"Train step: {idx}, Loss: {float(loss.cpu())}")
Metadata
Release files for nixoptimiz 0.1.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 |
|---|---|---|---|---|
| nixoptimiz-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nixoptimiz-0.1.1-py3-none-any.whl |
Release files / nixoptimiz-0.1.1-py3-none-any.whl
| Download URL | nixoptimiz-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f38cb69a4193e10a39c60a158046a5092417ba3e09c6e8136c155d13558ce2ef
|
|
BLAKE2b-256 checksum How to use checksums |
26567656003260180ff576ddb6fa17984e120e3d77b99e38660fc8f0862f615e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for nixoptimiz 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.