It is possible to keep some dwarfs in a tank this small (generally a minimum of 2 gals for dwarfs space-wise), but as aquascaper has already pointed out, it is rather impractical to maintain a tank of this size with anything that produces even a reasonably small amount of waste. Personally a tank like this would even be an extremely difficult challenge for an experienced seahorse keeper (I have known it to be done with small tanks like these, but personally I would steer clear of them, it's not worth it). The fact that seahorses can produce alot of waste doesn't help the matter any either.
If you really want to keep dwarfs though (lucky duck, they are illegal over here
), I would encourage you to stick with it, do some research and take a look at my stocking list here:
Micro
Generally these seahorses reach an adult size of about 4 centimeters
H. bargibanti
H. lichtensteinii
H. minotaur
H. zostrae
Small
Generally these seahorses reach an adult size between 5 and 9 centimeters
H. breviceps
H. fisheri
H. mohnikei
H. sindonis
H. zebra
Medium
Generally these seahorses reach an adult size between 10 and 16 centimeters
H. angustus
H. barbouri
H. borboniensis
H. camelopardalis
H. capensis
H. comes
H. coronatus
H. fuscus
H. hippocampus
H. histrix
H. jayakari
H. kuda
H. spinosissimus
H. trimaculatus
H. whitei
Large
Generally these seahorses reach an adult size of 17 centimeters and upwards
H. abdominalis
H. algiricus
H. erectus
H. guttulatus
H. ingens
H. kelloggi
H. reidi
H. subelongatus
The general rule of "a bigger tank is always better" differs a little with seahorses compared to most fish. With smaller species an overly large tank quickly becomes rather impractical, both for the seahorses and the tankviewer, to the point where it would be better to invest in larger seahorse species. In general the seahorses on the list above under "micros" should be substituted for "small" species after the tank size gets to around 25 gals. "Smalls" should be changed to "mediums" after around 75 gals. On the other side of the coin, minimum tank size for a "medium" seahorse is around 20 gals and for a "large" it's about 29 gals.
The minimum sizes listed above are only for housing seahorses though and not indicative of breeding needs. Generally to breed seahorses you will require a tank that is at least 2 - 2.5 times the height of the seahorses in question. Also note that the above suggestions for the medium and large seahorses are more of a minimum tank height rather than minimum tank size and generally could house between 2 to 4 seahorses (many people would say you could keep up to 6 - 8 but I believe in understocking, especially when new to the hobby) comfortably, depending on filtration, etc of course.
This will give you a very brief idea (it needs to be expanded and elaborated upon a bit atm - after which I will post it in the saltwater fish section here to make it easier to find. Think of it as a rough draft) and general rule of thumb about what is ideal for each species of seahorse out there. Oh, and don't hesitate to fire off any questions you are having trouble finding answers to
All in all though, do yourself a favour and give the 2.5 Gal tank a miss in favour of something along the lines of at least a 15 Gal when it comes to dwarfs. The parameters will be alot easier to keep on top of, more dwarfs can be stocked and your life will be alot easier - well, as easy as life can be when keeping a nano; ask Steelhealr, I'm sure he can verify the pitfalls, trials and tribulations of nano keeping alot better than I