Tom Pelissero of USA Today reported Thursday that Mallet's deal is for one year at $2 million, and he received $1 million to sign.
Mallett appeared in four games while backing up Joe Flacco in 2016. He went 3-of-6 for 26 yards and an interception.
Mallett arrived in Baltimore in December 2015. The team signed him as further insurance after injuries to Flacco and Matt Schaub. In two starts, he had 566 passing yards, two touchdowns and two interceptions.
Earlier in the month, Ravens head coach John Harbaugh said he hoped the 28-year-old would return to the team, per the Houston Chronicle's Aaron Wilson: "We need a backup quarterback. Ryan is not under contract, so we're talking to Ryan. We want Ryan back."
Re-signing Mallett won't move the needle too much among the fanbase, but it makes sense for the Ravens, as he has had a little over a year to become comfortable in the offense.
Should Baltimore have to replace Flacco at some point in 2017, Harbaugh will feel more comfortable turning to somebody who has a strong knowledge of the scheme and playbook.