We successfully developed a TabNet model to predict venlafaxine doses using real-world data. This model demonstrated substantial predictive accuracy, offering a personalized dosing regimen for venlafaxine. These findings provide valuable guidance for the clinical use of the drug.