A novel hierarchical multimode molecular stress function (HMMSF) model for linear polymer melts is proposed, which implements the basic ideas of (i) hierarchical relaxation, (ii) dynamic dilution, and (iii) interchain tube pressure. The capability of this approach is demonstrated in modeling the extensional viscosity data of monodisperse, bidisperse, and polydisperse linear polymer melts. Predictions of the HMMSF model, which are solely based on the linear-viscoelastic relaxation modulus and a single free model parameter, the segmental equilibration time, are compared to elongational viscosity data of monodisperse polystyrene melts and solutions as well as to the elongational viscosity data of a bidisperse blend of two monodisperse polystyrenes, and good agreement between model and experimental data is observed. By using a simplified relation between the Rouse stretch-relaxation times and the relaxation times of the melts, the modeling is extended to the uniaxial, equibiaxial, and planar extensional viscosity data of a high-density polyethylene, the uniaxial and equibiaxial extensional viscosity data of a polydisperse polystyrene, the elongational viscosity data of three high-density polyethylenes, and a linear low-density polyethylene. For polydisperse melts, the modeling is again based exclusively on the linear-viscoelastic relaxation modulus with only one material parameter, the dilution modulus, which quantifies the onset of dynamic dilution.