Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float16 support + Improved Context hyperparameter support + GNNs layer-wise inference #51

Merged
merged 68 commits into from
Jun 10, 2024

Conversation

janpfeifer
Copy link
Contributor

  • types.shapes package:
    • Added support for Float16 training -- tested with GNNs.
      • Up-precision metrics dtypes if they are Float16.
      • Allow arbitrary dtype for Adam optimizer -- it requires at least float32, even if the model runs on float16.
      • DType dependent epsilon values for Softmax and Adam -- current values would lead to NaN with float16.
      • Added DType.IsFloat16 to check for Float16 or BFloat16 (not yet well-supported).
    • Added support for Int8, Int16, Uint8 and Uint16.
    • Renamed UInt{X} to Uint{X} and added a deprecated alias to the old form (so it still compiles).
  • Added logging of time to build and compile graph. Last version improved a lot the execution time, but slowed the compilation.
  • Fixed Variable.SetValueGraph when the shape changes. Improved some documentation.
  • Package optimizers:
    • Fixed optimizer constructor FromContext to allow further configuration of the optimizer by setting other hyperparameters into context.
    • Added hyperparameter clip_step_by_value, a clip by value applied to gradient updates.
    • Adam optimizer: "clip_step_by_value", "adam_epsilon", "adam_dtype" hyperparameters support.
    • MustOptimizerByName now takes also the context for the optimizer hyperparameters. -- this breaks the API.
  • Package checkpoints:
    • Allow adding variables to exclude from saving after checkpoint is created -- for newly created variables.
  • Added slices.CloseToEpsilon to easily customize tests.
  • Fixed Variable.SetValuePreservingOld when shapes change.
  • Scatter doesn't assume indices are sorted or unique.
  • Plotly training plots: added WithCustomMetricFn for custom metrics and ScheduleEveryNSteps.
  • Added OGBN_MAG GNN example:
    • Including Layer-Wise Inference.
  • Package graph:
    • Added Shift, ShiftLeft, ShiftRight, ShiftWithScalar, ShiftWithValue.

Added MapInputsToEdges to create map with edge indices.
… it is created -- if variable is created after the checkpoint.

* Added `ogbnmag.ExcludeOgbnMagVariablesFromSave`.
Renamed: shapes.UInt{X} -> shapes.Uint{X}; Added an alias to the previous UInt{X} form.
…?) bug for non-sorted scatter on those models for float16.
@janpfeifer janpfeifer changed the title Improved Context hyperparameter support + GNNs layer-wise inference Float16 support + Improved Context hyperparameter support + GNNs layer-wise inference Jun 10, 2024
@janpfeifer janpfeifer merged commit 7c3243f into main Jun 10, 2024
1 check failed
@janpfeifer janpfeifer deleted the ogbnmag2 branch June 10, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant