Kazmir beat Florida on May 21, striking out 11 in eight shutout innings.
"This time we were patient," Cabrera said. "We hit 'our' pitches."
Ricky Nolasco (6-4) allowed three runs and seven hits, walked one and struck out five in 6 1/3 innings. He left after giving up three solo home runs in the seventh.
Kazmir (9-5) allowed six runs and six hits in five innings. He walked three and struck out eight while failing to become the youngest pitcher to reach 10 wins by June 27 since Greg Maddux did it at 22 years, 2 months on June 7, 1988.
"The ball felt good going off my hand, but I was not following through on some pitches," Kazmir said. "I was battling myself. Even to the pitcher, I was fighting myself to get three strikes over."
Olivo and Cabrera combined to drive in all eight runs for Florida, Olivo with a career-high five RBI.
Olivo hit a three-run homer off Kazmir in the fourth and a two-run shot off Edwin Jackson, his eighth, in the sixth. It was Olivo's second career multihomer game.
"If you watch BP, Olivo has power," Marlins manager Joe Girardi said. "When he doesn't over swing, he hits the ball hard."
Cabrera's two-run homer, a 447-foot shot to left, gave the Marlins a 6-0 lead in the fifth. The ball hit an advertisement attached to the base of the upper deck.
It was Cabrera's 12th home run and gave him 52 RBI.
"Cabrera, he's the next Edgar Martinez," Devil Rays manager Joe Maddon said, alluding to the former Seattle slugger.
Tampa Bay's Aubrey Huff and Greg Norton hit consecutive homers leading off the seventh. Russell Branyan added another with one out.
"It's unusual seeing seven home runs hit in this ballpark," Girardi said. "I hope I don't see it often -- especially four by the other team."
Olivo's home run in the fourth gave Florida a 4-0 lead.
Cody Ross began the fourth inning with a double to deep center. When Jeremy Hermida popped a bunt toward third base that landed on the grass, Kazmir overran the ball. Ross took third on Hermida's single.
"That was a big play. If Kazmir catches that ball it makes the inning entirely different," Maddon said.
After Wes Helms struck out, No. 8 hitter Olivo lined the first pitch 417 feet into the seats in left.
"I thought they were going to walk me, but when I saw the catcher sitting, I said. 'OK,"' Olivo said.
Cabrera knocked in Florida's first run when he hit into a fielder's choice in the third.
Tampa Bay got within 8-4 when Julio Lugo led off the eighth with his eighth home run.
- The Devil Rays traded LHP Mark Hendrickson, C Toby Hall and $1 million to the Dodgers for RHP Jae Seo, C Dioner Navarro and a player to be named.
- Florida is 15-4 at home since beginning the season 2-13 at Dolphin Stadium.
- Olivo's previous multihomer game was against Kansas City on Aug. 27, 2004, while with Seattle.
- The Devil Rays hit three home runs in an inning for the sixth time in team history.