TorchQuery Update: Focus on Neural Healing and Tensor Integrity

Hey everyone, quick update on TorchQuery!

I’ve been continuing to develop TorchQuery with a focus on Neural Healing and Tensor Integrity. The goal is simple: help researchers and engineers detect, repair, and manage problematic tensor values such as NaNs, Infs, and other forms of tensor corruption without leaving the PyTorch workflow.

TorchQuery provides fast, vectorized tensor-healing operations that work directly on CPU and GPU tensors, making it easy to recover from numerical instability during experimentation and training.

Here’s a simple example:

import torch
import torchquery as tq

# Simulate a weight matrix with a corrupted NaN value
weights = torch.randn(1024, 1024, device='cuda')
weights[512, 512] = float('nan')

# Repair invalid values directly on the tensor
healed_weights = tq.heal(weights)

print("Tensor healed successfully on device:", healed_weights.device)

The project is still evolving, and I’m actively exploring additional tensor integrity, validation, and recovery features. Feedback, benchmarks, bug reports, and feature suggestions are always welcome.

Thanks to everyone who has been following the project and sharing ideas along the way.