An excellent introduction to #quantization used for #LLMs 👌🏽:

“Quantization From The Ground Up”, Sam Rose, Ngrok (https://ngrok.com/blog/quantization).

On HN: https://news.ycombinator.com/item?id=47519295

#AI #Math #FloatingPoint #NumericalAnalysis #Numbers #NeuralNetworks #Precision #Accuracy

Quantization from the ground up | ngrok blog

A complete guide to what quantization is, how it works, and how it's used to compress large language models

ngrok blog

`Various software efforts embrace the idea that object oriented programming enables a convenient implementation of the chain rule, facilitating so-called automatic differentiation via backpropagation. Such frameworks have no mechanism for simplifying the expressions (obtained via the chain rule) before evaluating them. As we illustrate below, the resulting errors tend to be unbounded.`

https://arxiv.org/abs/2305.03863

#calculus #software #numericalAnalysis #automaticDifferentiation #uncertainty

Software-based Automatic Differentiation is Flawed

Various software efforts embrace the idea that object oriented programming enables a convenient implementation of the chain rule, facilitating so-called automatic differentiation via backpropagation. Such frameworks have no mechanism for simplifying the expressions (obtained via the chain rule) before evaluating them. As we illustrate below, the resulting errors tend to be unbounded.

arXiv.org
It's OK to compare floating-points for equality

lisyarus blog

Alright, future engineers!

Euler's Method: Approximates solutions to Ordinary Differential Equations (ODEs) by taking small steps along the tangent. Ex: `y_new = y_old + h * f(x_old, y_old)`. Pro-Tip: Simple, but smaller 'h' improves accuracy (at cost of computation)!
#ODEs #NumericalAnalysis #STEM #StudyNotes

Truncation error is the error from approximating an exact solution (e.g., infinite series) with a finite one. Ex: `e^x ≈ 1 + x + x^2/2!` (we 'truncated' it!). Pro-Tip: Use more terms or smaller step sizes to reduce this error!

#NumericalAnalysis #ErrorBounds #STEM #StudyNotes

📄 Comparing Models of Rapidly Rotating Relativistic Stars Constructed b…

Quicklook:
Stergioulas, Nikolaos et al. (1995) · The Astrophysical Journal
Reads: 100 · Citations: 521
DOI: 10.1086/175605

🔗 https://ui.adsabs.harvard.edu/abs/1995ApJ...444..306S/abstract

#Astronomy #Astrophysics #ComputationalAstrophysics #ComputerizedSimulation #NumericalAnalysis

Comparing Models of Rapidly Rotating Relativistic Stars Constructed by Two Numerical Methods

We present the first direct comparison of codes based on two different numerical methods for constructing rapidly rotating relativistic stars. A code based on the Komatsu-Eriguchi-Hachisu (KEH) method (Komatsu et al. 1989), written by Stergioulas, is compared to the Butterworth-Ipser code (BI), as modified by Friedman, Ipser and Parker. We compare models obtained by each method and evaluate the accuracy and efficiency of the two codes. The agreement is surprisingly good. A relatively large discrepancy recently reported (Eriguchi et al. 1994) is found to arise from the use of two different versions of the equation of state. We find, for a given equation of state, that equilibrium models with maximum values of mass, baryon mass, and angular momentum are (generically) all distinct and either all unstable to collapse or are all stable. Our implementation of the KEH method will be available as a public domain program for interested users.

ADS

📄 A Comparison of Numerical Methods for the Study of Star Cluster Dynam…

Quicklook:
Aarseth, S. J. et al. (1974) · Astronomy and Astrophysics
Reads: 5 · Citations: 254
DOI: N/A

🔗 https://ui.adsabs.harvard.edu/abs/1974A&A....37..183A/abstract

#Astronomy #Astrophysics #AstronomicalModels #ComputerizedSimulation #NumericalAnalysis

A Comparison of Numerical Methods for the Study of Star Cluster Dynamics

We compare the results of three different numerical methods for computing the evolution of a spherical star cluster from a given initial state, under the influence of internal relaxation: the N-body integration, the Monte Carlo method, and the fluid-dynamical approach. The general features of the evolution are very similar in all cases. The rates of evolution differ somewhat; for stars of equal masses, taking the N-body integrations as a reference, the Monte Carlo models evolve too fast by a factor 1.5, and the fluid-dynamical models by a factor 2 to 3.

ADS

Your college professor teaches you "A-stable methods are required for stiff ODEs". But PSA, the most commonly used stiff ODE solvers (adaptive order BDF methods) are not A-stable. #sciml #numericalanalysis #diffeq

https://www.youtube.com/shorts/hmKVQ2B46i4

The most commonly used stiff ODE solver isn't A-stable?!?!?

YouTube

New preprint https://arxiv.org/abs/2511.06957

A #perspective discussing Moreau-Yosida (MY) techniques in #densityfunctionaltheory.
MY regularisation has enabled to import tools from #convexanalysis into #dft
providing a new mathematical understanding of the most important atomistic simulation approach
and new robust algorithms for Kohn-Sham #dft.

Thanks to my co-authors from the #hylleraas centre and #oslomet for insightful discussions.

#condensedmatter #quantumchemistry #numericalanalysis #dftk

Perspective on Moreau-Yosida Regularization in Density-Functional Theory

Within density-functional theory, Moreau-Yosida regularization enables both a reformulation of the theory and a mathematically well-defined definition of the Kohn-Sham approach. It is further employed in density-potential inversion schemes and, through the choice of topology for the density and potential space, can be directly linked to classical field theories. This perspective collects various appearances of the regularization technique within density-functional theory alongside possibilities for their future development.

arXiv.org
The Numerical Analysis of Differentiable Simulation: Automatic Differentiation Can Be Incorrect - Stochastic Lifestyle

ISCL Seminar Series The Numerical Analysis of Differentiable Simulation: How Automatic Differentiation of Physics Can Give Incorrect Derivatives Scientific machine learning (SciML) relies heavily on automatic differentiation (AD), the process of constructing gradients which include machine learning integrated into mechanistic models for the purpose of gradient-based optimization. While these differentiable programming approaches pitch an idea of “simply put the simulator into a loss function and use AD”, it turns out there are a lot more subtle details to consider in practice. In this talk we will dive into the numerical analysis of differentiable simulation and ask the question: how numerically stable and robust is AD? We will use examples from the Python-based Jax (diffrax) and PyTorch (torchdiffeq) libraries in order to demonstrate how canonical formulations ... READ MORE

Stochastic Lifestyle