Search arXiv⌕ Search

arXiv subjects

Nianxiong Tan

Publications and source records attributed to Nianxiong Tan.

2 recordsLinked to original sources

State-Dependent Hybrid Computing for Robust and Efficient LLaMA 3.2-1B Inference Under Noisy Compute Models

Large language models (LLMs) rely on compute-intensive matrix operations, making efficient inference increasingly difficult as sequence length and model size grow. Analog computation can improve efficiency, but may also degrade model accuracy. This paper proposes a dynamic hybrid computing architecture that adaptively selects between a noisy analog and digital execution at runtime based on noise level, context length, token entropy, and activation statistics. Rather than using a fixed layer-wise execution strategy, the proposed method performs state-dependent routing that better balances output quality and compute cost. By using a Gaussian noise model to simulate compute-in-memory (CIM) hardware noise on WikiText-2 with LLaMA 3.2-1B, we observe that the proposed method reduces a normalized compute-cost proxy by 45\% relative to FP16 while limiting perplexity degradation to approximately 8.2\%. These results indicate that runtime-aware precision routing is a promising strategy for improving efficiency under noisy analog computation, although validation on hardware-calibrated analog CIM remains a future work.

cs.AI↗

Predicting the Output Structure of Sparse Matrix Multiplication with Sampled Compression Ratio

Sparse general matrix multiplication (SpGEMM) is a fundamental building block in numerous scientific applications. One critical task of SpGEMM is to compute or predict the structure of the output matrix (i.e., the number of nonzero elements per output row) for efficient memory allocation and load balance, which impact the overall performance of SpGEMM. Existing work either precisely calculates the output structure or adopts upper-bound or sampling-based methods to predict the output structure. However, these methods either take much execution time or are not accurate enough. In this paper, we propose a novel sampling-based method with better accuracy and low costs compared to the existing sampling-based method. The proposed method first predicts the compression ratio of SpGEMM by leveraging the number of intermediate products (denoted as FLOP) and the number of nonzero elements (denoted as NNZ) of the same sampled result matrix. And then, the predicted output structure is obtained by dividing the FLOP per output row by the predicted compression ratio. We also propose a reference design of the existing sampling-based method with optimized computing overheads to demonstrate the better accuracy of the proposed method. We construct 625 test cases with various matrix dimensions and sparse structures to evaluate the prediction accuracy. Experimental results show that the absolute relative errors of the proposed method and the reference design are 1.56\% and 8.12\%, respectively, on average, and 25\% and 156\%, respectively, in the worst case.

cs.DC↗