I want to say:
XXX actually only requires that YYY to be non-negative.
But I feel weird about this sentence. Should I say:
XXX only actually requires that....
XXX actually requires only that....
Which one is better?
Placing 'only' in front of 'actually' would change the meaning, since 'only' would then modify the 'actually' instead of 'requires'. As to the position of 'only' before or after 'requires', it's virtually indifferent.
Edited after the discussion in comments: ought to have written "since 'only' would then modify the 'actually' instead of 'requires ...'. (better?)
If what you want to say is:
1) that XXX has only one requirement, 2) and that the requirement is a condition 3) and the condition is that YYY be non-negative,
and you also want to qualify the above observation with "actually",
then the following would be the most unambiguous way to put it:
"Actually, XXX requires only that YYY be non-negative."
This way you avoid using the to-infinitive, which opens the statement to such interpretations as 1) to be non-negative, XXX only requires YYY; 2) XXX requires YYY only to be non-negative - meaning YYY can be either positive or neutral or in any other state as long as it is not negative.
And putting "only" after the verb eliminates this interpretation: it is only XXX (out of a list of XXX and others) that requires YYY to be non-negative.
Placing "only" just before the subjunctive clause makes it absolutely clear that it modifies the clause.