Critical Heat Flux (CHF) plays a pivotal role in ensuring reliability and safety within boiling two-phase flow systems. Despite the development of numerous CHF prediction tools using conventional empirical correlations, machine learning, and deep learning methods, the complex mechanisms underlying CHF continue to challenge the development of a unified, accurate, and robust prediction model. The complexity is further exacerbated by varying experimental dataset developed over the decades of CHF research. In response to these challenges, the present study leverages state-of-the-art AI method, including ANN, CNN, Transformer model, and transfer learning techniques. The proposed AI-based CHF prediction model, particularly the Transformer model employing self-attention mechanisms, dynamically assigns importance to different parts of the input data. The approach significantly improves the model's capability for CHF prediction. The results indicate that the predictive performance of the Transformer-based AI model exceeds that of the Look-Up Table (LUT) method and a benchmark model from the OECD-NEA based on the database encompasses 24,579 CHF data point conducted in vertical, uniformly heated, water-cooled tubes from 59 distinct sources over the past 60 years. The five-input AI model achieved the best predictive performance: Mean P/M of 1.008, Std. P/M of 0.122, RMSPE of 12.3%, MAPE of 7.22%, NRMSE of 9.91%, and Q2 of 1.26%. Moreover, the AI-based CHF prediction model's prediction behaviors are examined and compared with the LUT method. This comparison confirms the model's resistance to overfitting. Finally, by utilizing transfer learning, the model's ability to predict CHF in tubes is extended to annulus and plate geometries. The CHF prediction results of transfer learning to annulus geometry are as follows: Mean P/M of 1.012, Std. P/M of 0.134, RMSPE of 13.4%, MAPE of 8.51%, NRMSE of 10.42%, and Q2 of 8.31%, showcasing the flexibility and robustness of AI-based CHF prediction model towards different flow channels.