In cancer, intra- and inter-patient heterogeneity presents a significant challenge for therapeutic management, as patients with apparently similar profiles often exhibit divergent responses to the same therapies. This heterogeneity is primarily attributed to genetic and molecular variations among individuals and their tumors. Understanding the impact of these differences on treatment outcomes is widely believed to be a key step for developing effective precision medicine strategies. However, the complexity of most biological pathways makes it difficult to predict the effect of genetic variation on cells and tissues, let alone predict a patient's response to therapy. As a result, high-throughput genetic and chemical perturbation screens have emerged as valuable tools for precision medicine-related tasks, such as disease modeling, target discovery, cellular programming, and pathway reconstruction. This approach is fundamentally limited, however, because the number of possible combinations of cell types, cell states, perturbation targets, and perturbation types is huge and cannot be exhaustively tested experimentally. This calls for computational approaches that can simulate such experiments in silico, guiding in vitro experiments towards perturbations that are more likely to produce the desired effect. Here we describe OmniPert, a novel generative AI tool, which utilizes a deep learning, transformer-based architecture to model the effects of genetic and chemical perturbations on single-cell transcriptomes. Trained on millions of diverse cellular profiles, this approach allows for more granular analysis of cellular responses, thereby facilitating downstream applications in cell-specific gene-gene and gene-drug interaction networks, biomarker and drug target discovery, drug repurposing, and in silico perturbation reverse-engineering. In the context of oncology, OmniPert promises to facilitate the discovery of novel cell type- and state-specific targets, ultimately contributing to more effective and personalized cancer treatments.