BeF2 ∶ 4Be = 2,2 = 1s2 , 2s2
Be has 2 valence electrons. These two electrons are used to form bonds with two fluorine atoms So, it contains two bps but no lp.
The structure of BeF2 is shown as below:
F − Be − F
So, its shape is linear.
SF2 : 16S = 2,8,6
= 1s2 , 2s22p6 ,3s23p4
S has 6 valence electrons. Out of these, two valence electrons are used to form bonds with two F-atoms So, it contains two bps and two Ips.
The structure of SF2 is shown as below:

So, its shape is angular due to lp-Ip repulsion.