In this study we address simulation of initial distribution of fluid composition in hydrocarbon reservoirs, particularly in scenarios where slow vertical segregation in a low-permeability near-critical reservoir results in an incomplete relaxation to the quasi-equilibrium state. To effectively analyze these complex scenarios, we propose an extended compositional gradient model that takes into account incomplete system relaxation. Practical application of the method involves solution of the forward problem of compositional profiling, with the model parameters adjusted according to real fluid samples. We formulate the inverse problem of parameter identification for the extended compositional gradient model and solve it using gradient-free optimization methods. The adjusted parameters are specific enthalpies of fluid components and the relaxation parameter. The overarching goal of parameter identification is to closely match the predictions of the model with real data, thereby enhancing the reliability of forecasts regarding distribution of fluid composition. We believe that the results of this study will significantly influence both understanding and simulation techniques for distribution of hydrocarbon components in natural reservoirs, particularly in situations characterized by incomplete system relaxation.