Machine learning: From basics to GPU-related INT8( 3rd Jan 2025)

Preface: If a living thing wants to survive, his life involve competition. For example, hunting and defense. During this process, he started learning. that’s the nature of it.

Remember this is the basic principle. When non-human beings on Earth can enter into the learning process. He will be humanity’s rival. In fact, who will rule the earth depends entirely on the wisdom of the opponent?

Integer Arithmetic for machine learning: INT8 uses 8 bits, which allows for 256 possible values, while INT4 uses 4 bits, which allows for 16 possible values. In comparison, floating-point precision, such as FP32, uses 32 bits to represent a wide range of values.

The advantage of int over float is computational speed. Integers are represented in memory as a fixed value. Floats, on the other hand are stored as a mathematical construct, mantissa and exponent so there is computation involved just in assessing the value.

Integers are the simplest numerical data types (Numeric data types). Because of this, their storage space is much less, and their processing is much faster than floating point types.

An integer (known also as int) is a whole number without a decimal part. It can be positive, negative, or zero. Examples of integers are -3, 0, 5, 100, and so on. The integer data type is used to represent values such as counting, indexing, or storing quantities that can only be whole numbers.

Float (floating-point number) is a number that includes a decimal part. Examples of floating-point numbers are -3.14, 2.71828, 0.5, 1.0, and so on. The float data type is used to represent values that can have a decimal part or require high precision, such as measurements, calculations involving decimal values, or scientific computations.

Summary: Integer represents whole numbers without a decimal part, while float represents floating-point numbers with a decimal part. Integer has exact precision and a larger range, whereas float has limited precision and can represent numbers with a decimal part.

Technical article: Is Integer Arithmetic Enough for Deep Learning Training? Please refer to link –  https://proceedings.neurips.cc/paper_files/paper/2022/file/af835bd1b5b689c3f9d075ae5a15bf3e-Paper-Conference.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.