Actually, nobody seems to have answered your question yet, so, here goes.
Helium, like all gasses, is compressible. That’s what it means when you have a gas. The atoms are scattered around somewhat randomly, unlike fluids, which have only limited compressibility, or solids which generally have even less. (I’m talking generalizations here that apply in the normal everyday universe, so let’s not get into things like neutronium.)
When you say 1 liter of helium versus ½ liter with the same mass of gas, that means that the 1 liter balloon has twice the volume and hence ½ the density of the other baloon. As other posters have pointed out, lifting power is a function of density. Helium is a lighter gas than air, which is made up of heavier elements, mostly nitrogen and oxygen. With less density, the 1 liter baloon will lift more than the ½ liter baloon.
Taking the example of the gas compressed into a container, although the container sits on the ground just fine, if you fill up a baloon big enough with the helium it will lift the container up, up, and away.
Scuba divers are familiar with a somewhat analogous phenomenon. A “cylinder” (i.e. breathing tank) full of compressed air is actually negatively buoyant, meaning that it will sink in water. Use up most of the air and it may actually be positively buoyant, meaning it will float.
Hope this teaches you how not to be an air head.