Declarative DeepNetwork API, fused pipeline, and batch-synchronous sweeps#402
Merged
Merged
Conversation
84cfa0f to
88acae1
Compare
d6713da to
291396b
Compare
88acae1 to
c5c554c
Compare
291396b to
96f6501
Compare
96f6501 to
91237d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Declarative DeepNetwork API, mixed/fused pipelines, and batch-synchronous learning
Extends the vectorised
DeepNetworkbackend with a declarative construction API and a way to compose PyHGF networks with frozen calculations into larger models (up to a full Transformer), trained locally without backprop or autodiff.What's new
builder.py) —LayerConfig,resolve_coupling_fn, andDeepNetwork.from_configs/from_dict: build networks from JSON/YAML-serializable configs for reproducible sweeps.transplant.py) —from_linear,from_feedforward,from_embedding: build aDeepNetworkthat reproduces a trained Equinox module's forward pass in PyHGF's layer layout.hybrid.py) —PCModulewithDeepNetworkAdapter(learning) /EquinoxAdapter(frozen),PCSequential,Residual, and thelinear_/layer_norm_/gelu_adapterhelpers. Errors are routed part-by-part with hand-derived backward formulas; no global computation graph.transformer.py) —MultiHeadAttention,HybridGPT,hybrid_from_gpt: assemble a GPT from mixed parts, any slot frozen or learning.fused.py) —FusedPipeline+step_report: run a part tree as a single compiled program per training step, with all state threaded explicitly.vectorized_belief_propagation.py,learning.py) — batch-synchronousbatch_step/sample_step, splitprediction_sweep/update_sweep/learn_sweep,input_prediction_error, and rank-onevectorized_weight_gradient_factors. Surfaced onDeepNetworkasprediction,update,input_error,batch_update,predict_states.Also
docs/source/api.rst.PCModulestate contract.