Virtual metrology (VM) is a technology to predict metrology variables using information about the state of the process for every workpiece. An advanced dual-phase VM scheme possessing the properties of data preprocessing, dual-phase conjecturing, reliance-level evaluating, and similarity-level appraising was proposed by the author. This dual-phase VM scheme is applicable for all the typical VM applications. Among those applications, the one for workpiece-to-workpiece (W2W) advanced process control (APC) is the most critical. For easy implementation and deployment, a generic-virtual-metrology (GVM) framework shall be designed. The purpose of this paper is to develop the GVM framework. By applying this GVM framework, different VM functional modules can be easily implemented and applied for various kinds of VM applications, especially the W2W APC.