Neuralk OSS
Neuralk-AI open-source models.
Seldon
Seldon is a tabular in-context-learning foundation model: fit keeps the
training table as context, predict_proba classifies new rows against it (or
a regressor's predict estimates their target, see Regression)
in one forward pass, with no gradient step.
from neuralk_oss import SeldonClassifier
clf = SeldonClassifier.from_pretrained("seldon-mini") # or "seldon"
clf.fit(X_train, y_train) # pandas DataFrame (or array) and labels
proba = clf.predict_proba(X_test) # (n_rows, n_classes), columns in clf.classes_ order
A model's name loads it with the settings it is meant to run with, from its
packaged config (see Configs): seldon with 8 ensemble members,
seldon-mini with 4, half of them reading categories in a shuffled order.
Keyword arguments override them, e.g. from_pretrained("seldon", device="cpu").
Checkpoints
| model | checkpoint | task | parameters |
|---|---|---|---|
seldon |
seldon-classifier |
classification, up to 10 classes per model call | 213.5M |
seldon |
seldon-regressor |
regression, 999 quantiles | 215.5M |
seldon-mini |
seldon-mini-classifier |
classification, up to 10 classes per model call | 27.4M |
seldon-mini |
seldon-mini-regressor |
regression, 999 quantiles | 28.4M |
SeldonClassifier.from_pretrained takes the model name and loads its
classification checkpoint, SeldonRegressor.from_pretrained its regression
checkpoint; Seldon.from_pretrained takes the checkpoint name.
A checkpoint directory holds one model, config.json and model.safetensors
(as Seldon.save_pretrained writes it), or several sharing an architecture:
config.json then names them under checkpoints, each with its head, and the
weights of checkpoint name are name.safetensors. from_pretrained takes:
- a checkpoint name of the table above (or, for
SeldonClassifierandSeldonRegressor, a model name): its model's Hugging Face repository,Neuralk-AI/seldonorNeuralk-AI/seldon-mini, holds both checkpoints at its root; the first call downloadsconfig.jsonand that checkpoint's weights, later ones read the Hugging Face cache (~/.cache/huggingface, orHF_HOME); - a local directory, read in place:
from_pretrained("path/to/seldon-mini-classifier"); - any Hugging Face repository, its root or a checkpoint's directory, and a
revision:
from_pretrained("Neuralk-AI/seldon-mini", task="regression"),from_pretrained("org/repo", subfolder="seldon-mini-classifier", revision="v1").taskpicks the checkpoint in a directory of several (SeldonClassifierpasses"classification",SeldonRegressor"regression").
The repositories are private for now: log in once with an account that can read
them (hf auth login), or pass token=... to from_pretrained.
Column types are inferred (categorical columns are embedded as such, NaNs are
kept for the model's own imputation), each of the n_estimators ensemble
members (8 by default) sees its own preprocessing, and their logits are
averaged. Inference runs in float16 autocast on CUDA by default
(amp=False for float32). Tables with more classes than the model's head
(10) go through error-correcting output codes.
Regression
from neuralk_oss import SeldonRegressor
reg = SeldonRegressor.from_pretrained("seldon-mini") # or "seldon"
reg.fit(X_train, y_train) # pandas DataFrame (or array) and a numerical target
y_pred = reg.predict(X_test) # (n_rows,): the mean of each row's quantiles
quantiles = reg.predict_quantiles(X_test) # (n_rows, 999), ascending
SeldonRegressor takes the classifier's arguments, plus clip_margin. The
target is standardized for the model; each member's quantiles, back in the
target's units, are sorted, then averaged over the members by a trimmed mean.
With clip_margin, they are clamped to the training target's range, widened
by clip_margin times that range on each side; the constructor's default,
None, leaves them unclamped. A model's name loads its regression checkpoint
with its packaged config, seldon-regressor or seldon-mini-regressor: half
the members read categories in a shuffled order, and clip_margin=0.1.
Preprocessing
The preprocessing and ensembling come from structured-data-models (sdm,
Apache-2.0), pinned in pyproject.toml. SeldonRecipe builds its recipe, and
takes its parameters as keyword arguments:
from neuralk_oss import SeldonClassifier, SeldonRecipe
recipe = SeldonRecipe(transforms=("identity", "rank_gaussian"), softmax_temperature=0.9)
clf = SeldonClassifier.from_pretrained("seldon-mini", recipe=recipe)
| parameter | default | |
|---|---|---|
transforms |
("identity", "power", "robust", "rank_gaussian") |
numerical transforms the members take in turn, one each |
half_shuffle |
False |
the second half of the members read categorical codes in a random order per column, the first half sorted |
flip_sign |
True |
each member negates a random half of its numerical columns |
feature_shuffle |
"latin" |
column permutation per member: "latin", "random" or None |
class_shift |
True |
each member shifts the class codes by its own offset |
average_logits |
True |
average the members' logits, else their probabilities |
softmax_temperature |
1.0 |
divisor of the logits before the softmax |
max_features |
500 |
columns the model reads, cut after the shuffle |
The rest (clipping bounds, rank-Gaussian knots, category counts) is in
SeldonRecipe's docstring. Beyond parameters, each step is an overridable method:
import sdm.processing as sp
from neuralk_oss import SeldonClassifier, SeldonRecipe
class MyRecipe(SeldonRecipe):
max_features = 200
def numerical_transforms(self):
return [sp.Identity(), sp.RankGaussian(max_knots=self.rank_gaussian_knots)]
clf = SeldonClassifier.from_pretrained("seldon-mini", recipe=MyRecipe())
Configs
For full control over a run, beyond from_pretrained's defaults, a YAML
config sets the checkpoint, the classifier and its recipe in one file:
checkpoint, any keyword argument of from_pretrained, and recipe,
SeldonRecipe's keyword arguments. Each released model's settings are a packaged config of its name,
which from_pretrained loads: seldon and seldon-mini for the classifiers,
seldon-regressor and seldon-mini-regressor for the regressors
(SeldonRegressor.from_config("seldon-regressor")).
# seldon.yaml
checkpoint: seldon
n_estimators: 8
max_context_size: 200000
random_state: 0
amp: true
recipe:
half_shuffle: true
clf = SeldonClassifier.from_config("seldon") # the same as from_pretrained("seldon")
clf = SeldonClassifier.from_config(
"my_run.yaml", device="cpu"
) # keyword arguments override the file
template.yaml, packaged next to
them, lists every argument a config can set, at its default, with what
it does: copy it and keep the keys you change. Keys a config leaves out take
the model's own settings for seldon and seldon-mini, the constructor's
defaults otherwise.
The model alone
from neuralk_oss import Seldon
model = Seldon.from_pretrained("seldon-mini-classifier")
context = model.encode_context(X_context, y_context, categorical_mask) # (B, T, H), (B, T), (B, H)
logits = model.predict_query(X_query, context, categorical_mask) # (B, T_query, 10)
Contributing
See CONTRIBUTING.md: layout, development and versions.
License
Metadata
Release files for neuralk-oss 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neuralk_oss-0.3.0.tar.gz | 937.3 kB | With provenance | Details for neuralk_oss-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuralk_oss-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for neuralk_oss-0.3.0-py3-none-any.whl |
Total release size: 985.9 kB
Release files / neuralk_oss-0.3.0.tar.gz
| Download URL | neuralk_oss-0.3.0.tar.gz |
|---|---|
| Size | 937.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd967c25549efc994b943c9d20c8a1c79b3e12b2285d971ede55fe52b91d9683
|
|
BLAKE2b-256 checksum How to use checksums |
63bd803432ee8440b044a3c25ba086cf1ba22a674b5a40b5010cd1b1bbb03340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 6, 2026.
Transparency logRelease files / neuralk_oss-0.3.0-py3-none-any.whl
| Download URL | neuralk_oss-0.3.0-py3-none-any.whl |
|---|---|
| Size | 48.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4eccf4dfbbd08d70d6ed0f8f5729e3c999bb50125b6a40f047a9bd4d90c16efa
|
|
BLAKE2b-256 checksum How to use checksums |
304bed1f040b1c8c478b95330e961a1ddcfc9b34e6f111c627934d9ea8bd48bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 6, 2026.
Transparency logSecurity for neuralk-oss 0.3.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for neuralk_oss-0.3.0.tar.gz
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 Nov 6, 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.