I believe you will have to clear Canadian immigration and customs, even with no checked baggage. Both the
connecting flights guide from Aéroports de Montréal and Air Canada's
guide to connecting via Montreal (I know you're not flying AC, but I wanted to look at a second source just in case) indicate that for international-to-international transit, passengers have to clear Canadian passport control and customs in all cases.
I think that in general, there is no sterile transit for international-to-international flight in any Canadian airport, but I'm not 100% sure on this. (That's "international" in the Canadian airport sense, i.e. not including flights to the United States.)