The way I understand it is yes, it is on a loan by loan basis. For the ease of explanation, if you qualify as a "small creditor" based on asset size and number of loans, you can originate General QMs and you can originate Small Creditor QMs (I realize that there are other QMs). What the rule says is that if you sell the Small Creditor QM that you originate (which the GSEs won't buy anyway), unless it meets one of the following criteria, it is no longer considered a QM, so the safe harbor goes away:
It is sold more than three years after consummation.
It is sold to another creditor that meets the criteria
regarding number of originations and asset size, at any time.
It is sold pursuant to a supervisory action or agreement, at any time.
It is transferred as part of a merger or acquisition of or by the creditor, at any time
You can originate General QMs and sell them to the GSEs, even if you are a small creditor.