You'll need to review your locally adopted version of 907 (building code), specifically 907.2.9, at least that's what it is in my code. Mine says:
[F] 907.2.9 Group R-2, R-2.1 and R-2.2. Fire alarm
systems and smoke alarms shall be installed in Group R-2
and R-2.1 occupancies as required in Sections 907.2.9.1
and 907.2.9.4.1. Group R-2.2 shall be equipped throughout
with an automatic fire alarm system and shall have a
manual fire alarm pull station at the 24-hour staff watch
office.
[F] 907.2.9.1 Manual fire alarm system. A manual
fire alarm system that activates the occupant notification
system in accordance with Section 907.5 shall be
installed in Group R-2 occupancies where any of the
following conditions apply:
1. Any dwelling unit or sleeping unit is located
three or more stories above the lowest level of
exit discharge.
2. Any dwelling unit or sleeping unit is located
more than one story below the highest level of
exit discharge of exits serving the dwelling unit
or sleeping unit.
3. The building contains more than 16 dwelling
units or sleeping units.
4. Congregate residences with more than 16 occupants.
Exceptions:
1. A fire alarm system is not required in buildings
not more than two stories in height where
all dwelling units or sleeping units and contiguous
attic and crawl spaces are separated from
each other and public or common areas by not
less than I -hour fire partitions and each dwelling
unit or sleeping unit has an exit directly to
a public way, egress court or yard.
2. Manual fire alarm boxes are not required
where the building is equipped throughout
with an automatic sprinkler system installed in
accordance with Section 903.3.1.1 or
903.3.1.2 and the occupant notification appliances
will automatically activate throughout
the notification zones upon a sprinkler water
flow.
3. A fire alarm system is not required in buildings
that do not have interior corridors serving
dwelling units and are protected by an
approved automatic sprinkler system installed
in accordance with Section 903.3.1.1 or
903.3.1.2, provided that dwelling units either
have a means of egress door opening directly
to an exterior exit access that leads directly to
the exits or are served by open-ended corridors
designed in accordance with Section
1027.6, Exception 3.