SAN FRANCISCO Giancarlo Stanton homered twice, the second coming after A.J. Ellis' tiebreaking two-run home run in the 11th inning, and the Miami Marlins held on to beat the San Francisco Giants 10-8 on Sunday to complete a sweep.