Silver
Silver is a small, inspectable language and machine-learning toolkit for Python.
The Silver ecosystem also includes lightweight Python packages for datasets, training lifecycles, diagnostics, and bridges to PyTorch, TensorFlow, Keras, notebooks, and remote jobs. Start with Choose your Silver path to install only what your project needs.
It is for people who want to see what a program, model, compiler, or agent is doing instead of handing the important parts to opaque infrastructure. Silver keeps source structure, intermediate representations, tensor operations, execution traces, and model metadata available to the caller.
Silver is useful for:
- teaching language runtimes, compilers, autodiff, and neural networks;
- building deterministic experiments and replayable agent workflows;
- inspecting a model while it runs, not only reading its final prediction;
- prototyping small Python tools without a large native ML dependency;
- explaining how a larger architecture is organized before choosing a heavy production backend.
It is not a replacement for PyTorch, TensorFlow, or a hosted model service. Some larger architecture APIs are deliberately inspectable blueprints. The executable reference path currently focuses on the language runtime, tensors, autodiff, dense classifiers, ML source compilation, and TinyGPT.
Install From PyPI
python -m pip install silver-lang
Requirements: Python 3.9 or newer.
First Program
from silverlang import build_pipeline, run_source
source = """
fn main():
value = 6 * 7
return value
"""
print(run_source(source).value)
print(build_pipeline(source).to_json())
The runtime supports functions, assignments, integer literals, variables,
arithmetic, returns, deterministic traces, tokenization, source digests, and
execution manifests. Use explain() when you want to understand what happened,
not only get a value back.
A Small ML Experiment
The executable reference implementation is Python:
from silverlang import build_pipeline
artifacts = build_pipeline(source)
print(artifacts.to_json())
Inspectable ML
The native ML implementation includes deterministic dense layers, ReLU, sigmoid and linear activations, softmax classifier output, single-sample SGD, cross-entropy training, tensor operations, reverse-mode autodiff, neuron inspection, model graphs, tensor graph metadata, gradient checks, named datasets, deterministic TinyGPT generation, and virtual large-model profiles.
from silverlang.ml.tensor import Tensor
tensor = Tensor.vector_grad(1, -2, 3).relu().sum()
tensor.backward()
print(tensor.inspect())
The package also has blueprints for Transformer, recurrent, CNN, autoencoder, GAN, diffusion, mixture-of-experts, retrieval-augmented, and hybrid systems. These describe components, dimensions, estimated scale, and composition boundaries. They do not allocate or train those large architectures yet.
For a model-level explanation, use the computed inspection and translation helpers:
from silverlang import teach_network
study = teach_network()
print(study.summary)
Try the CLI
silver run program.sv
The CLI prints a deterministic execution manifest as JSON, which makes a small Silver program easy to inspect in a terminal or CI job.
Test Before Publishing
Friends can test the exact package artifacts without publication:
python -m pip install -e '.[dev]'
python -m pytest
python -m build
The companion packages are built from their own directories:
python build_packages.py
The generated wheels and source archives can then be installed by a separate Python project.
Develop Silver
python -m pip install -e '.[dev]'
python -m pytest
python -m build
The test suite exercises the Python compiler, VM, runtime, and ML paths. See CONTRIBUTING.md for the contributor workflow and docs/index.md for topic-focused guides.
Publish the Package Family
The root checkout is an umbrella repository. Export the six standalone package repositories with:
python scripts/export_repositories.py --owner YOUR_GITHUB_OWNER
The script creates local repositories with package-specific CI and PyPI release workflows. It never creates remotes or pushes credentials. Follow docs/publishing.md for the exact GitHub and PyPI steps.
Public API
See the supervised-learning cookbook for a complete dataset-to-model-to-GPU-to-diagnostics example covering the package family.
The root silverlang package exports the lexer, parser, compiler pipeline,
stack VM, runtime traces, visualization helpers, agent/workbench helpers, and
the inspectable tensor and neural-network teaching modules. Lower-level
modules include silverlang.frontend, silverlang.ir, silverlang.bytecode,
silverlang.vm, and silverlang.ml.
Read docs/api.md for examples, docs/language/syntax.md for the language surface, and docs/ml/tiny-gpt.md for a small model walkthrough. See docs/ecosystem.md for the separate-package roadmap.
Project Boundaries
Silver favors a small reference implementation with visible contracts over a large dependency graph. The package includes language execution, compiler and bytecode inspection, a stack VM, memory utilities, graph and package models, replayable agent workflows, application planning, module loading, IDE models, and the native ML paths described above.
Specialized ML estimators such as Adam, unsupervised learning, reinforcement learning, regression, and full executable CNN, Transformer, GAN, and diffusion backends are future work. Contributions that make one of those paths real, tested, and explainable are especially valuable.
License
Silver is distributed under the Apache License 2.0.
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 silver_lang-0.3.0.tar.gz.
File metadata
- Download URL: silver_lang-0.3.0.tar.gz
- Upload date:
- Size: 55.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc3a94a4d5300dd71a2ec8c192b82915ae2421811f2111bdde663abe55143110
|
|
| MD5 |
b495d9ef46411645871654550adda998
|
|
| BLAKE2b-256 |
fc1b59898d92f29049bc17732bbe1953e7ebbe0448897e0e15e36202fab30e89
|
Provenance
The following attestation bundles were made for silver_lang-0.3.0.tar.gz:
Publisher:
release.yml on adfgdartec/silver-lang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
silver_lang-0.3.0.tar.gz -
Subject digest:
cc3a94a4d5300dd71a2ec8c192b82915ae2421811f2111bdde663abe55143110 - Sigstore transparency entry: 2478848217
- Sigstore integration time:
-
Permalink:
adfgdartec/silver-lang@8edf08b90262711a5025c9869fd19612425a0e43 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/adfgdartec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8edf08b90262711a5025c9869fd19612425a0e43 -
Trigger Event:
push
-
Statement type:
File details
Details for the file silver_lang-0.3.0-py3-none-any.whl.
File metadata
- Download URL: silver_lang-0.3.0-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b37c601f6cf02bf26d18e5b29337078a816c55e6ca6eaf258d880f6a55891ddc
|
|
| MD5 |
29de8705884cab04382a4b1c1595aed5
|
|
| BLAKE2b-256 |
4c35b197b6a1f3faae66c155aae2fd9831fd26aa781dca1bd2dccc4ee522451d
|
Provenance
The following attestation bundles were made for silver_lang-0.3.0-py3-none-any.whl:
Publisher:
release.yml on adfgdartec/silver-lang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
silver_lang-0.3.0-py3-none-any.whl -
Subject digest:
b37c601f6cf02bf26d18e5b29337078a816c55e6ca6eaf258d880f6a55891ddc - Sigstore transparency entry: 2478848306
- Sigstore integration time:
-
Permalink:
adfgdartec/silver-lang@8edf08b90262711a5025c9869fd19612425a0e43 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/adfgdartec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8edf08b90262711a5025c9869fd19612425a0e43 -
Trigger Event:
push
-
Statement type: