← all repositories
IBM/aihwkit

Teaching PyTorch to train on memory chips that do math with physics

It exists so you can train PyTorch models against the noise and non-idealities of analog in-memory hardware before the silicon even exists.

503 stars Jupyter Notebook ML FrameworksInference · Serving
aihwkit
Collecting fresh signals — velocity needs a few days of history.
star history

What it does

IBM’s aihwkit is a PyTorch-integrated toolkit for simulating analog AI accelerators—chips that store weights in resistive or phase-change memory and perform matrix multiplications directly inside the memory array. It provides drop-in analog versions of standard layers (linear, convolutions, LSTM) and an optimizer that supports in-situ training algorithms like Tiki-Taka. Under the hood, a CUDA-capable C++ simulator models device-level noise, cycle-to-cycle variations, and ADC/DAC quantization so you can see how a network would behave on imperfect physical hardware.

The interesting bit

The toolkit injects calibrated non-idealities—drawn from real measurements across a million phase-change memory devices—directly into the forward pass during training. That means you bake robustness against analog noise into the model weights while everything still feels like normal PyTorch.

Key highlights

  • Drop-in analog layers (AnalogLinear, convolutions, LSTM) compatible with standard PyTorch training loops.
  • Calibrated statistical models based on hardware measurements from a 1-million-device PCM chip.
  • CUDA-capable C++ backend simulating crossbar noise, device-to-device variation, and pulse-train updates.
  • Auto-conversion utility to swap standard layers in pre-trained models for analog-aware equivalents.
  • Integration with the cloud-based AIHW Composer for no-code experiment execution.

Caveats

  • Explicitly marked beta; the README warns of potential issues and breaking changes in upcoming versions.
  • The examples and notebooks require additional dependencies beyond the core package.

Verdict

Worth exploring if you’re researching analog in-memory computing or need to validate whether your model can survive PCM/RRAM noise. Skip it if you want production-ready analog deployment or a general-purpose PyTorch accelerator.

Frequently asked

What is IBM/aihwkit?
It exists so you can train PyTorch models against the noise and non-idealities of analog in-memory hardware before the silicon even exists.
Is aihwkit open source?
Yes — IBM/aihwkit is open source, released under the MIT license.
What language is aihwkit written in?
IBM/aihwkit is primarily written in Jupyter Notebook.
How popular is aihwkit?
IBM/aihwkit has 503 stars on GitHub.
Where can I find aihwkit?
IBM/aihwkit is on GitHub at https://github.com/IBM/aihwkit.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.