New construction guaranteed to need passive smoke detection system and evacuation warning.
Existing most likely required in some form or another. Depends on: construction type, height, number of units, paths of egress, and if the building has fire sprinklers or not. Approvals are usually handled at the county/city level, so I'd start there if you have specific questions.
Not in MA but here's our experience with the application of IRC2018 ....
Our local bldg inspector initiated IRC2018 fire safety requirements for all multi's under his jurisdiction. We had a 6 unit that did not meet these enhanced fire code requirements. No grandfathering allowed.
They completed a detailed inspection of all units & egress. To avoid major rehab & the installation of layers of fire retardant drywall, new fire doors etc etc they insisted on a complete fire sprinkler system. Other towns nearby only require it for a 3rd floor apartment occupancy.
They did allow me to design & install the entire system complete with inter connected smoke/CO detectors. It took me several months working around all the nooks & crannies of a pre 1960's building & there were numerous visits & inspections. I had to then have a commercial architect sign off on the design & installation.
Next we had to install a 24/7 first responder fire alarm monitoring system ($100/month) through a security firm that also required high speed internet to monitor the alarms & sprinkler system. The latter was then inspected & approved by the local Fire Chief. Finally all the permits were signed off by the Bldg Inspector.
Tenants love the safety it provides, as does our insurance carrier.