Two conditions on the same promise
Both of them are about why, not how much.
مَنْ يَقُمْ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ
Man yaqum laylata-l-qadri īmānan wa-ḥtisāban ghufira lahu mā taqaddama min dhanbih
“Whoever stands the Night of Decree out of faith and seeking the reward is forgiven what has gone before of his sin.”
Where this comes from
The same two conditions attach to fasting Ramadan and to standing its nights. Neither one specifies a length. Both specify a reason.
The full narration
Narrated Abu Huraira: Allah's Messenger (ﷺ) said, "Whoever establishes the prayers on the night of Qadr out of sincere faith and hoping to attain Allah's rewards (not to show off) then all his past sins will be forgiven
Source
Ṣaḥīḥ al-Bukhārī · 35
Ṣaḥīḥ
- Agreed upon as authentic (al-Bukhārī / Muslim)