FP4 is a 4-bit floating point format that represents a significant reduction from traditional 32-bit and 64-bit floating point standards. This compact format enables more efficient storage and computation in resource-constrained environments like edge devices and AI accelerators.
johndcook-com
30 items from johndcook-com
This post examines the NF4 4-bit floating point format and higher precision analogs used for quantizing LLM weights. NF4 and FP4 are common 4-bit data types in bitsandbytes, often found in weights downloaded from Hugging Face.
Newton's diameter theorem concerns plotting solutions to polynomial equations and finding midpoints of intersections with parallel lines. The theorem states that these midpoints lie on a line when the polynomial degree is odd, but not necessarily when it is even.
Embedded regular expression modifiers address environmental complications by placing modifiers within the regex itself, rather than requiring separate syntax. This helps overcome one of the hardest parts of using regex: dealing with minor syntax variations between implementations.
The comm utility performs set operations like intersection and difference on sorted lists at the command line, though its syntax can be hard to remember. It requires input files to be sorted for proper operation.
Dmitri Mendeleev, known for creating the periodic table, also discovered a mathematical theorem about polynomials and their derivatives. The theorem originated from his empirical research on interpolation problems.
The post discusses mathematical inequalities discovered by Dmitri Mendeleev and generalized by Andrey Markov for real polynomials, along with Bernstein's theorem for trigonometric polynomials. It connects these classical results in approximation theory.
The article explores how much precision can be extracted from tabulated data by interpolating between known values. It discusses techniques for estimating function values between table entries and the limitations of such methods.
Lebesgue constants appear in interpolation error bounds, where the error depends on spacing between points and tabulation errors. The constant varies based on the function being interpolated and the interpolation method used.
The article explains how to compute sine and cosine of complex arguments using only real functions. It provides mathematical formulas and Python code examples for evaluating trigonometric functions with complex inputs when only real-number libraries are available.
A shopper tried using an AI shopping assistant on a major e-commerce site to answer an obscure product question but received an irrelevant response. The AI tool failed to address the specific query, highlighting limitations in current AI shopping assistants.
Peter Vogel posted an image of a Morse code decoding decision tree. The tree's compact shape is unusual since decision trees typically have branches on separate horizontal levels with diagonal lines descending from nodes.
Quantum Y2K
3.0The author expresses skepticism about quantum computing becoming practical soon, but warns that if it does before we're prepared, it could collapse the world's financial system. Everyone agrees preparation is necessary despite doubts about its near-term practicality.
Pentagonal numbers can be obtained by truncating triangular numbers. The diagram for the nth pentagonal number can be transformed into the base of the (2n-1)st triangular number's illustration. Adding the (n-1)st triangular number diagram to the bottom would complete the triangular representation.
The Artemis II mission launched to orbit the moon, similar to Apollo 8's preparatory mission in 1968. Like Apollo 13, it will swing around the moon rather than entering lunar orbit.
An old geometry book revealed a hyperbolic analog of Napier's mnemonic for spherical trigonometry. The author was surprised to discover this connection, noting that while hyperbolic analogs exist for many things, this particular one was previously unknown to them.
The term "perilune" refers to the point in a spacecraft's orbit when it is closest to the moon. This term is sometimes called "periselene," with both terms having different linguistic origins.
The article examines how updating an average grade can be viewed as a simple case of Bayesian statistics and Kalman filtering. It explores the mathematical relationship between these approaches when calculating cumulative averages from test scores.
Running AI locally on your own hardware is the best way to maintain HIPAA compliance, as it avoids transferring protected health information to remote servers. While HIPAA-compliant cloud options exist, they are restrictive and expensive.
Landauer's principle establishes a fundamental energy limit for erasing information, requiring at least log(2) kB T per bit. This thermodynamic constraint applies regardless of how information is physically stored, setting a universal lower bound for computational energy costs.
The Artemis I mission lasted 25 days, much longer than the upcoming Artemis II's 10 days, allowing it to take an unusual orbital path. The unmanned nature of Artemis I enabled this extended duration and more complex trajectory.
Andrica's conjecture states that the square roots of consecutive prime numbers are less than 1 apart. This has been empirically verified for primes up to 2 × 10^19.
A random fractal is generated by repeatedly picking a random side of a hexagon and forming a triangle with a point c, then updating c to be the center of that new triangle.
The latitude of the Great Pyramid of Giza is exactly 29.9792458° N, which matches the speed of light in vacuum: 299,792,458 m/s. This numerical coincidence has been noted in online discussions.
The article examines the distribution of digits in decimal representations of fractions, focusing on patterns that may not be widely known despite being in basic areas of mathematics.
Orthodox Easter occurs this week while Western churches celebrated Easter last week. The dates differ because Eastern Orthodox churches use the Julian calendar to calculate Easter, while Western churches use the Gregorian calendar. The gap between the two Easters can be up to five weeks apart.
The article explains how the date of Easter is determined as the first Sunday after the first full moon following the Spring equinox. This connects the Roman calendar to the Jewish lunisolar calendar through astronomical references.
A recent arXiv paper demonstrates that all elementary functions can be derived from just the exponential function and the constant 1. The research shows how to bootstrap basic arithmetic operations like addition, subtraction, multiplication, and division from this minimal foundation.
The article discusses Artzt parabolas, which are parabolas passing through pairs of vertices with tangents parallel to the sides. It explores the general form of conic sections and the specific conditions for finding such parabolas.
Knowing your distance to a satellite places you on a circle formed by the intersection of Earth's surface and a sphere centered on the satellite. This geometric principle is fundamental to how GPS determines location.