Fast-axis collimation (FAC) lens arrays play a crucial role in laser systems, offering precise beam shaping and focusing for applications such as laser marking, and optical communication. Achieving high precision in these applications requires a FAC lens array with a long Rayleigh range. While precision glass molding with nickel-phosphorus (Ni-P) microlayer molds has revolutionized the mass production of FAC lens arrays, the extreme conditions during the molding process can lead to poor profile accuracy. To address this issue, we developed an optical collimation system to derive the final characteristic parameters and obtain the beam waist radius and Rayleigh range of the collimated laser. Additionally, we conducted a thorough analysis of the inhomogeneous thermal expansion process of the microlayer mold and established a mathematical solution for thermal compensation to modify the mold's shape. We validated the proposed method by fabricating an FAC lens array mold and measuring the profile error and waist radius of a molded FAC lens array. We also calculated the profile error of this method using a finite element (FE) model in ABAQUS. The results indicate that incorporating the inhomogeneous thermal expansion reduces the shape error of the FAC lens array from 0.577 μm to 0.135 μm. Moreover, using inhomogeneous thermal compensation significantly improves the Rayleigh range of the FAC lens array from 1.285 μm to 9.8 × 104 μm.