Yes, you can deduct what you actually paid.
Note that between you and your ex, you can't deduct more than the total interest paid, so you and your ex need to coordinate. You also need to agree on a method to allocate who paid what. You might agree that you each paid half the interest from January to June, or you might agree that you paid 75% and your ex paid 25%, or you might agree on some other number. If you don't agree, and you claim a combined amount more than the actual interest, the IRS may investigate the discrepancy and there's no way to know how they would allocate the payment.