A fierce blaze has torn through a pub in Sydney's inner west, forcing an adjoining boarding house to be evacuated.

Fire crews arrived at the General Gordon Hotel in Sydenham just after 1.15pm on Monday and found the fire on the second storey, a Fire and Rescue NSW spokesman said.

More than 70 firefighters battled the flames for more than an hour before the fire was brought under control around 3pm, and they continue to work to extinguish the flames with the help of two aerial platforms.

An exclusion zone was set up in the area due to a number of gas cylinders being present on the premises.